@realsee/dnalogel 2.20.6 → 2.20.7

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 (307) hide show
  1. package/dist/index.cjs.js +26 -26
  2. package/dist/index.js +470 -470
  3. package/dist/index.umd.js +26 -26
  4. package/docs/classes/CSS3DRender.html +30 -30
  5. package/docs/classes/CruisePluginController.html +25 -25
  6. package/docs/classes/GuideLineItem.GuideLineItem.html +19 -19
  7. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +34 -34
  8. package/docs/classes/Magnifier.html +19 -19
  9. package/docs/classes/ModelRoomLabelController.html +10 -10
  10. package/docs/classes/Object3DHelperController.html +24 -24
  11. package/docs/classes/PaintBrush.html +14 -14
  12. package/docs/classes/PanoMeasurePluginLine.html +22 -22
  13. package/docs/classes/PanoMeasurePluginModel.html +21 -21
  14. package/docs/classes/PanoMeasurePluginPoint.html +13 -13
  15. package/docs/classes/PanoMeasurePluginPolyline.html +25 -25
  16. package/docs/classes/PanoTagPluginController.html +46 -46
  17. package/docs/classes/Util.BetterTween.html +8 -8
  18. package/docs/classes/Util.FivePointSelector.html +11 -11
  19. package/docs/classes/Util.Interval.html +11 -11
  20. package/docs/classes/Util.Magnifier.html +16 -16
  21. package/docs/classes/Util.PointDomHelper.html +10 -10
  22. package/docs/classes/Util.PointHelper.html +10 -10
  23. package/docs/classes/Util.Rectangle.html +12 -12
  24. package/docs/enums/CameraMovementEffect.html +6 -6
  25. package/docs/enums/ContentType.html +19 -19
  26. package/docs/enums/DIRECTION.html +8 -8
  27. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +8 -8
  28. package/docs/enums/DimensionType.html +6 -6
  29. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +7 -7
  30. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +8 -8
  31. package/docs/enums/PaintBrushTypeEnum.html +7 -7
  32. package/docs/enums/PointType.html +6 -6
  33. package/docs/enums/Rotation.html +7 -7
  34. package/docs/functions/CSS3DRenderPlugin.html +3 -3
  35. package/docs/functions/CameraMovementPlugin.html +3 -3
  36. package/docs/functions/CruisePlugin.html +3 -3
  37. package/docs/functions/GuideLinePlugin.html +4 -4
  38. package/docs/functions/ItemLabelPlugin.html +3 -3
  39. package/docs/functions/MapviewFloorplanPlugin.html +3 -3
  40. package/docs/functions/ModelChassisCompassPlugin.html +3 -3
  41. package/docs/functions/ModelEntryDoorGuidePlugin.html +3 -3
  42. package/docs/functions/ModelFloorplanPlugin.html +3 -3
  43. package/docs/functions/ModelItemLabelPlugin.html +3 -3
  44. package/docs/functions/ModelRoomLabelPlugin.html +3 -3
  45. package/docs/functions/ModelTVVideoPlugin.html +3 -3
  46. package/docs/functions/ModelViewPlugin.html +3 -3
  47. package/docs/functions/Object3DHelperPlugin.html +3 -3
  48. package/docs/functions/PanoCompassPlugin.html +3 -3
  49. package/docs/functions/PanoCursorRaycasterPlugin.html +3 -3
  50. package/docs/functions/PanoDoorLabelPlugin.html +3 -3
  51. package/docs/functions/PanoFloorplanRadarPlugin.html +3 -3
  52. package/docs/functions/PanoMeasurePlugin.html +3 -3
  53. package/docs/functions/PanoRulerPlugin.html +3 -3
  54. package/docs/functions/PanoRulerProPlugin.html +3 -3
  55. package/docs/functions/PanoSpatialTagPlugin.html +3 -3
  56. package/docs/functions/PanoTagPlugin.html +3 -3
  57. package/docs/functions/PanoVideoPlugin.html +3 -3
  58. package/docs/functions/TopviewFloorplanPlugin.html +3 -3
  59. package/docs/functions/Util.getCoordsFromClient.html +4 -4
  60. package/docs/functions/Util.getCoordsFromElement.html +4 -4
  61. package/docs/functions/Util.getFrameTime.html +4 -4
  62. package/docs/functions/Util.getIntersectFromRelativePosition.html +4 -4
  63. package/docs/functions/Util.getRaycasterFromFivePointer.html +4 -4
  64. package/docs/functions/Util.isAbsoluteURL.html +4 -4
  65. package/docs/functions/Util.isModelLike.html +4 -4
  66. package/docs/functions/Util.isNil.html +4 -4
  67. package/docs/functions/Util.isPanoramaLike.html +4 -4
  68. package/docs/functions/Util.nextFrame.html +4 -4
  69. package/docs/functions/Util.notNil.html +4 -4
  70. package/docs/functions/Util.requestAnimationFrameInterval.html +4 -4
  71. package/docs/functions/Util.tweenProgress.html +4 -4
  72. package/docs/functions/Util.uuid.html +4 -4
  73. package/docs/functions/pluginFlag.html +4 -4
  74. package/docs/index.html +4 -4
  75. package/docs/interfaces/AddTagConfig.html +5 -5
  76. package/docs/interfaces/CSS3DRenderPluginEventMap.html +10 -10
  77. package/docs/interfaces/CSS3DRenderPluginState.html +7 -7
  78. package/docs/interfaces/CameraMovementPluginExportType.html +6 -6
  79. package/docs/interfaces/CruisePluginTypes.Config.html +7 -7
  80. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +11 -11
  81. package/docs/interfaces/CruisePluginTypes.EventMap.html +19 -19
  82. package/docs/interfaces/CruisePluginTypes.MoveAction.html +11 -11
  83. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +13 -13
  84. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +13 -13
  85. package/docs/interfaces/CruisePluginTypes.PluginData.html +8 -8
  86. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +6 -6
  87. package/docs/interfaces/CruisePluginTypes.PluginState.html +10 -10
  88. package/docs/interfaces/EventMap.html +14 -14
  89. package/docs/interfaces/FloorplanBounding.html +7 -7
  90. package/docs/interfaces/FloorplanData.html +9 -9
  91. package/docs/interfaces/FloorplanEntrance.html +10 -10
  92. package/docs/interfaces/FloorplanExtraObject.html +9 -9
  93. package/docs/interfaces/FloorplanExtraObject3D.html +7 -7
  94. package/docs/interfaces/FloorplanFloorData.html +8 -8
  95. package/docs/interfaces/FloorplanImagePosition.html +6 -6
  96. package/docs/interfaces/FloorplanObserver.html +8 -8
  97. package/docs/interfaces/FloorplanOutlineItem.html +8 -8
  98. package/docs/interfaces/FloorplanPosition.html +6 -6
  99. package/docs/interfaces/FloorplanRoomItem.html +12 -12
  100. package/docs/interfaces/FloorplanRoomLabelItem.html +6 -6
  101. package/docs/interfaces/FloorplanServerBounding.html +7 -7
  102. package/docs/interfaces/FloorplanServerComputedData.html +9 -9
  103. package/docs/interfaces/FloorplanServerData.html +6 -6
  104. package/docs/interfaces/FloorplanServerDoorItem.html +9 -9
  105. package/docs/interfaces/FloorplanServerDoorPosition.html +7 -7
  106. package/docs/interfaces/FloorplanServerEntrance.html +10 -10
  107. package/docs/interfaces/FloorplanServerFloorData.html +8 -8
  108. package/docs/interfaces/FloorplanServerImagePosition.html +6 -6
  109. package/docs/interfaces/FloorplanServerObserver.html +8 -8
  110. package/docs/interfaces/FloorplanServerOutlineItem.html +8 -8
  111. package/docs/interfaces/FloorplanServerPosition.html +6 -6
  112. package/docs/interfaces/FloorplanServerRoomItem.html +13 -13
  113. package/docs/interfaces/FloorplanServerRoomLabelItem.html +6 -6
  114. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +7 -7
  115. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +9 -9
  116. package/docs/interfaces/GuideLinePluginType.EventMap.html +12 -12
  117. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +7 -7
  118. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +5 -5
  119. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +12 -12
  120. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +7 -7
  121. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +17 -17
  122. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +6 -6
  123. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +17 -17
  124. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +4 -4
  125. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +6 -6
  126. package/docs/interfaces/GuideLinePluginType.PluginState.html +7 -7
  127. package/docs/interfaces/GuideLinePluginType.Route.html +10 -10
  128. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +8 -8
  129. package/docs/interfaces/HelperOffset.html +7 -7
  130. package/docs/interfaces/ImagePlaneGroup.html +5 -5
  131. package/docs/interfaces/ItemLabelPluginData.html +5 -5
  132. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +10 -10
  133. package/docs/interfaces/ItemLabelPluginParametersType.html +8 -8
  134. package/docs/interfaces/MinMax.html +6 -6
  135. package/docs/interfaces/ModelChassisCompassPluginData.html +6 -6
  136. package/docs/interfaces/ModelChassisCompassPluginExportType.html +7 -7
  137. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +6 -6
  138. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +7 -7
  139. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +7 -7
  140. package/docs/interfaces/ModelItemLabelPluginData.html +5 -5
  141. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +10 -10
  142. package/docs/interfaces/ModelItemLabelPluginParametersType.html +6 -6
  143. package/docs/interfaces/ModelRoomLabelPluginData.html +5 -5
  144. package/docs/interfaces/ModelTVVideoPluginData.html +8 -8
  145. package/docs/interfaces/ModelTVVideoPluginExportType.html +7 -7
  146. package/docs/interfaces/ModelTVVideoPluginParameterType.html +5 -5
  147. package/docs/interfaces/ModelViewPluginExportType.html +10 -10
  148. package/docs/interfaces/Object3DHelperState.html +7 -7
  149. package/docs/interfaces/ObjectHelperControllers.html +8 -8
  150. package/docs/interfaces/PaintBrushAction.html +11 -11
  151. package/docs/interfaces/PaintBrushConfigs.html +11 -11
  152. package/docs/interfaces/PaintBrushState.html +9 -9
  153. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +9 -9
  154. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +4 -4
  155. package/docs/interfaces/PanoMeasureParameterType.html +13 -13
  156. package/docs/interfaces/PanoMeasurePluginLineJson.html +7 -7
  157. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +6 -6
  158. package/docs/interfaces/PanoMeasurePluginPointJson.html +6 -6
  159. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +7 -7
  160. package/docs/interfaces/PanoRulerPluginExportType.html +9 -9
  161. package/docs/interfaces/PanoRulerPluginOptions.html +6 -6
  162. package/docs/interfaces/PanoRulerPluginParameterType.html +7 -7
  163. package/docs/interfaces/PanoRulerProPluginExportType.html +8 -8
  164. package/docs/interfaces/PanoRulerProPluginOptions.html +6 -6
  165. package/docs/interfaces/PanoRulerProPluginParameterType.html +6 -6
  166. package/docs/interfaces/PanoRulerProPluginState.html +7 -7
  167. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +4 -4
  168. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +4 -4
  169. package/docs/interfaces/PanoSpatialTagPluginData.html +10 -10
  170. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +9 -9
  171. package/docs/interfaces/PanoSpatialTagPluginExportType.html +12 -12
  172. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +9 -9
  173. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +12 -12
  174. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +10 -10
  175. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +9 -9
  176. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +5 -5
  177. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +7 -7
  178. package/docs/interfaces/PanoVideoPluginType.PluginData.html +5 -5
  179. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +8 -8
  180. package/docs/interfaces/PanoVideoPluginType.PluginState.html +5 -5
  181. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +7 -7
  182. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +9 -9
  183. package/docs/interfaces/Point.html +7 -7
  184. package/docs/interfaces/Room.html +8 -8
  185. package/docs/interfaces/RoomInfo.html +6 -6
  186. package/docs/interfaces/RoomLabel.html +13 -13
  187. package/docs/interfaces/RoomRules.html +4 -4
  188. package/docs/interfaces/Rooms.html +4 -4
  189. package/docs/interfaces/Scissor.html +8 -8
  190. package/docs/interfaces/State.html +7 -7
  191. package/docs/interfaces/TagCacheInterface.html +11 -11
  192. package/docs/interfaces/TagConfig.html +12 -12
  193. package/docs/interfaces/TagGLTFObjectGroup.html +5 -5
  194. package/docs/interfaces/TagIconUrl.html +11 -11
  195. package/docs/interfaces/TagObjectGroup.html +5 -5
  196. package/docs/interfaces/TagStyle.html +5 -5
  197. package/docs/interfaces/Tags.html +8 -8
  198. package/docs/interfaces/TemporaryState.html +5 -5
  199. package/docs/interfaces/Util.MagnifierParameter.html +10 -10
  200. package/docs/interfaces/Util.MouseGroupParameter.html +7 -7
  201. package/docs/modules/CruisePluginTypes.html +4 -4
  202. package/docs/modules/GuideLineItem.html +4 -4
  203. package/docs/modules/GuideLineModeItem.html +4 -4
  204. package/docs/modules/GuideLinePluginType.html +4 -4
  205. package/docs/modules/PanoVideoPluginType.html +4 -4
  206. package/docs/modules/Util.html +4 -4
  207. package/docs/modules.html +4 -4
  208. package/docs/types/ArrayPosition.html +4 -4
  209. package/docs/types/AudioAppearance.html +4 -4
  210. package/docs/types/AudioTagTypeConfigKey.html +4 -4
  211. package/docs/types/CSS3DRenderExportType.html +4 -4
  212. package/docs/types/CSS3DRenderPluginExportType.html +4 -4
  213. package/docs/types/CSS3DRenderPluginParameterType.html +4 -4
  214. package/docs/types/ClassFunctionParameters.html +4 -4
  215. package/docs/types/Color.html +4 -4
  216. package/docs/types/ContentTypeConfigKey.html +4 -4
  217. package/docs/types/ContentTypeConfigKeySplit.html +4 -4
  218. package/docs/types/ContentTypeMap.html +4 -4
  219. package/docs/types/Create3DDomContainerReturnType.html +4 -4
  220. package/docs/types/Create3DElementReturnType.html +4 -4
  221. package/docs/types/CruisePluginExportType.html +4 -4
  222. package/docs/types/CruisePluginTypes.CruiseData.html +4 -4
  223. package/docs/types/CruisePluginTypes.MoveEffect.html +4 -4
  224. package/docs/types/DeprecatedMediaPlaneProperty.html +4 -4
  225. package/docs/types/DeprecatedTagProperty.html +4 -4
  226. package/docs/types/Direction-1.html +4 -4
  227. package/docs/types/Direction4.html +4 -4
  228. package/docs/types/ElementRenderer.html +4 -4
  229. package/docs/types/FloorplanRuleLabels.html +4 -4
  230. package/docs/types/FloorplanServerRuleLabels.html +4 -4
  231. package/docs/types/GuideLinePluginExportType.html +4 -4
  232. package/docs/types/GuideLinePluginType.GuideLineItem.html +4 -4
  233. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +4 -4
  234. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +4 -4
  235. package/docs/types/GuideLinePluginType.GuideLineStyle.html +4 -4
  236. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +4 -4
  237. package/docs/types/GuideLinePluginType.PathItem.html +4 -4
  238. package/docs/types/GuideLinePluginType.PluginData.html +4 -4
  239. package/docs/types/HelperEventMap.html +4 -4
  240. package/docs/types/LoadTagConfig.html +4 -4
  241. package/docs/types/MapviewFloorplanPluginParameterType.html +4 -4
  242. package/docs/types/MapviewFloorplanPluginReturnType.html +4 -4
  243. package/docs/types/MediaData.html +4 -4
  244. package/docs/types/MediaStore.html +4 -4
  245. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +4 -4
  246. package/docs/types/ModelFloorplanPluginParameterType.html +4 -4
  247. package/docs/types/ModelFloorplanPluginReturnType.html +4 -4
  248. package/docs/types/ModelRoomLabelPluginParameters.html +4 -4
  249. package/docs/types/ModelRoomLabelPluginReturnType.html +4 -4
  250. package/docs/types/MoveArgs.html +4 -4
  251. package/docs/types/MoveOpts.html +4 -4
  252. package/docs/types/Object3DHelperEventMap.html +4 -4
  253. package/docs/types/ObjectFit.html +4 -4
  254. package/docs/types/PaintBrushEventMap.html +4 -4
  255. package/docs/types/PanoCompassPluginData.html +4 -4
  256. package/docs/types/PanoCompassPluginExportType.html +4 -4
  257. package/docs/types/PanoCompassPluginParameterType.html +4 -4
  258. package/docs/types/PanoFloorplanRadarPluginParameterType.html +4 -4
  259. package/docs/types/PanoFloorplanRadarPluginReturnType.html +4 -4
  260. package/docs/types/PanoIndex.html +4 -4
  261. package/docs/types/PanoMeasurePluginEvent.html +4 -4
  262. package/docs/types/PanoMeasureReturnType.html +4 -4
  263. package/docs/types/PanoSpatialTagPluginId.html +4 -4
  264. package/docs/types/PanoTagPluginExportInterface.html +4 -4
  265. package/docs/types/PanoTagPluginParamsInterface.html +4 -4
  266. package/docs/types/PanoVideoPluginParameterType.html +4 -4
  267. package/docs/types/PanoVideoPluginReturnType.html +4 -4
  268. package/docs/types/PartialObjectDeep.html +4 -4
  269. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +4 -4
  270. package/docs/types/PlaneTag.html +4 -4
  271. package/docs/types/Point2DTag.html +4 -4
  272. package/docs/types/Point3DTag.html +4 -4
  273. package/docs/types/PointTag.html +4 -4
  274. package/docs/types/PointTagInstance.html +4 -4
  275. package/docs/types/Position.html +4 -4
  276. package/docs/types/RotateArgs.html +4 -4
  277. package/docs/types/RotateOpts.html +4 -4
  278. package/docs/types/RuleLabelsKey.html +4 -4
  279. package/docs/types/RuleLabelsValue.html +4 -4
  280. package/docs/types/StickType.html +4 -4
  281. package/docs/types/Tag.html +4 -4
  282. package/docs/types/Tag2D.html +4 -4
  283. package/docs/types/Tag3D.html +4 -4
  284. package/docs/types/TagContentType.html +4 -4
  285. package/docs/types/TagDimensionType.html +4 -4
  286. package/docs/types/TagElement.html +4 -4
  287. package/docs/types/TagEvents.html +4 -4
  288. package/docs/types/TagGLTFObject.html +4 -4
  289. package/docs/types/TagHooks.html +4 -4
  290. package/docs/types/TagId.html +4 -4
  291. package/docs/types/TagInstance.html +4 -4
  292. package/docs/types/TagPointType.html +4 -4
  293. package/docs/types/TagRendererMap.html +4 -4
  294. package/docs/types/TopviewFloorplanPluginParameterType.html +4 -4
  295. package/docs/types/TopviewFloorplanPluginReturnType.html +4 -4
  296. package/docs/types/WorkCode.html +4 -4
  297. package/docs/variables/FLOOR_TYPE_MAP.html +4 -4
  298. package/docs/variables/PLUGIN.html +4 -4
  299. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +4 -4
  300. package/docs/variables/ROOM_TYPE_MAP.html +4 -4
  301. package/docs/variables/itemLabelPluginServerParams.html +4 -4
  302. package/docs/variables/modelItemLabelPluginServerParams.html +4 -4
  303. package/docs/variables/modelRoomLabelPluginServerParams.html +4 -4
  304. package/libs/GuideLinePlugin/Components/Tag.js +60 -60
  305. package/libs/base/BasePlugin.js +1 -1
  306. package/libs/shared-utils/logger.js +1 -1
  307. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Au=Object.defineProperty,bu=Object.defineProperties;var yu=Object.getOwnPropertyDescriptors;var Da=Object.getOwnPropertySymbols;var wu=Object.prototype.hasOwnProperty,Pu=Object.prototype.propertyIsEnumerable;var ar=(i,t,e)=>t in i?Au(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,F=(i,t)=>{for(var e in t||(t={}))wu.call(t,e)&&ar(i,e,t[e]);if(Da)for(var e of Da(t))Pu.call(t,e)&&ar(i,e,t[e]);return i},ye=(i,t)=>bu(i,yu(t));var f=(i,t,e)=>(ar(i,typeof t!="symbol"?t+"":t,e),e);var Y=(i,t,e)=>new Promise((n,o)=>{var s=l=>{try{a(e.next(l))}catch(c){o(c)}},r=l=>{try{a(e.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,r);a((e=e.apply(i,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ze=require("@realsee/five"),R=require("three"),Qo=require("three/examples/jsm/renderers/CSS3DRenderer"),Ki=require("hammerjs"),yd=require("@realsee/five/line"),wd=require("three/examples/jsm/loaders/FBXLoader"),Ma=require("animejs"),Cu=require("@realsee/five/gltf-loader");function Eu(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const I=Eu(R);function Iu(){console.info("%c %c@realsee/dnalogel %cv2.20.6",["background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')","background-repeat: no-repeat","background-position: 0 center","padding-left: 8px"].join(";"),"","background-color: #12ce9b;color:black;padding:0 6px;border-radius: 3px")}function ku(){const i=typeof OffscreenCanvas!="undefined",t=i&&new OffscreenCanvas(1,1).getContext("webgl")!==null;i&&!t&&Object.assign(window,{OffscreenCanvas:function(e,n){const o=document.createElement("canvas");return o.width=e,o.height=n,o}})}function Pd(){}const Sa=()=>Promise.resolve(),La={__queue:Promise.resolve()};function xu(i=Sa){La.__queue=La.__queue.then(i).catch(Sa)}function Ao(i,t,e){const n=i.x,o=i.y,s=Math.floor(n/t*1e4)/1e4,r=Math.floor(o/e*1e4)/1e4;return{x:s,y:r}}function lr(i,t,e){const{x:n,y:o}=i,s=n*t,r=o*e;return{x:s,y:r}}function bo(i){if(i.length<2)return{};const t=i.slice(-2),e=t[0],n={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2};return{control:e,end:n}}function Du(i,t,e=Pd){new Promise(n=>{setTimeout(()=>{e(),n(!0)},t*i)})}const Mu=window,Ta=window.requestAnimationFrame||Mu.webkitRequestAnimationFrame||(i=>setTimeout(i,16));function Vo(i,t=0){t<=0?Ta(i):Ta(()=>Vo(i,t-1))}var kt=Object.freeze({Linear:Object.freeze({None:function(i){return i},In:function(i){return this.None(i)},Out:function(i){return this.None(i)},InOut:function(i){return this.None(i)}}),Quadratic:Object.freeze({In:function(i){return i*i},Out:function(i){return i*(2-i)},InOut:function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)}}),Cubic:Object.freeze({In:function(i){return i*i*i},Out:function(i){return--i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)}}),Quartic:Object.freeze({In:function(i){return i*i*i*i},Out:function(i){return 1- --i*i*i*i},InOut:function(i){return(i*=2)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2)}}),Quintic:Object.freeze({In:function(i){return i*i*i*i*i},Out:function(i){return--i*i*i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2)}}),Sinusoidal:Object.freeze({In:function(i){return 1-Math.sin((1-i)*Math.PI/2)},Out:function(i){return Math.sin(i*Math.PI/2)},InOut:function(i){return .5*(1-Math.sin(Math.PI*(.5-i)))}}),Exponential:Object.freeze({In:function(i){return i===0?0:Math.pow(1024,i-1)},Out:function(i){return i===1?1:1-Math.pow(2,-10*i)},InOut:function(i){return i===0?0:i===1?1:(i*=2)<1?.5*Math.pow(1024,i-1):.5*(-Math.pow(2,-10*(i-1))+2)}}),Circular:Object.freeze({In:function(i){return 1-Math.sqrt(1-i*i)},Out:function(i){return Math.sqrt(1- --i*i)},InOut:function(i){return(i*=2)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1)}}),Elastic:Object.freeze({In:function(i){return i===0?0:i===1?1:-Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI)},Out:function(i){return i===0?0:i===1?1:Math.pow(2,-10*i)*Math.sin((i-.1)*5*Math.PI)+1},InOut:function(i){return i===0?0:i===1?1:(i*=2,i<1?-.5*Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI):.5*Math.pow(2,-10*(i-1))*Math.sin((i-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(i){var t=1.70158;return i===1?1:i*i*((t+1)*i-t)},Out:function(i){var t=1.70158;return i===0?0:--i*i*((t+1)*i+t)+1},InOut:function(i){var t=2.5949095;return(i*=2)<1?.5*(i*i*((t+1)*i-t)):.5*((i-=2)*i*((t+1)*i+t)+2)}}),Bounce:Object.freeze({In:function(i){return 1-kt.Bounce.Out(1-i)},Out:function(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},InOut:function(i){return i<.5?kt.Bounce.In(i*2)*.5:kt.Bounce.Out(i*2-1)*.5+.5}}),generatePow:function(i){return i===void 0&&(i=4),i=i<Number.EPSILON?Number.EPSILON:i,i=i>1e4?1e4:i,{In:function(t){return Math.pow(t,i)},Out:function(t){return 1-Math.pow(1-t,i)},InOut:function(t){return t<.5?Math.pow(t*2,i)/2:(1-Math.pow(2-t*2,i))/2+.5}}}}),Un=function(){return performance.now()},Cd=function(){function i(){this._tweens={},this._tweensAddedDuringUpdate={}}return i.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},i.prototype.removeAll=function(){this._tweens={}},i.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},i.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},i.prototype.update=function(t,e){t===void 0&&(t=Un()),e===void 0&&(e=!1);var n=Object.keys(this._tweens);if(n.length===0)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<n.length;o++){var s=this._tweens[n[o]],r=!e;s&&s.update(t,r)===!1&&!e&&delete this._tweens[n[o]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},i}(),wn={Linear:function(i,t){var e=i.length-1,n=e*t,o=Math.floor(n),s=wn.Utils.Linear;return t<0?s(i[0],i[1],n):t>1?s(i[e],i[e-1],e-n):s(i[o],i[o+1>e?e:o+1],n-o)},Bezier:function(i,t){for(var e=0,n=i.length-1,o=Math.pow,s=wn.Utils.Bernstein,r=0;r<=n;r++)e+=o(1-t,n-r)*o(t,r)*i[r]*s(n,r);return e},CatmullRom:function(i,t){var e=i.length-1,n=e*t,o=Math.floor(n),s=wn.Utils.CatmullRom;return i[0]===i[e]?(t<0&&(o=Math.floor(n=e*(1+t))),s(i[(o-1+e)%e],i[o],i[(o+1)%e],i[(o+2)%e],n-o)):t<0?i[0]-(s(i[0],i[0],i[1],i[1],-n)-i[0]):t>1?i[e]-(s(i[e],i[e],i[e-1],i[e-1],n-e)-i[e]):s(i[o?o-1:0],i[o],i[e<o+1?e:o+1],i[e<o+2?e:o+2],n-o)},Utils:{Linear:function(i,t,e){return(t-i)*e+i},Bernstein:function(i,t){var e=wn.Utils.Factorial;return e(i)/e(t)/e(i-t)},Factorial:function(){var i=[1];return function(t){var e=1;if(i[t])return i[t];for(var n=t;n>1;n--)e*=n;return i[t]=e,e}}(),CatmullRom:function(i,t,e,n,o){var s=(e-i)*.5,r=(n-t)*.5,a=o*o,l=o*a;return(2*t-2*e+s+r)*l+(-3*t+3*e-2*s-r)*a+s*o+t}}},ea=function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i}(),Tr=new Cd,is=function(){function i(t,e){e===void 0&&(e=Tr),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=kt.Linear.None,this._interpolationFunction=wn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=ea.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return i.prototype.getId=function(){return this._id},i.prototype.isPlaying=function(){return this._isPlaying},i.prototype.isPaused=function(){return this._isPaused},i.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e,this},i.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t,this},i.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},i.prototype.start=function(t,e){if(t===void 0&&(t=Un()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var s in this._valuesEnd)o[s]=this._valuesEnd[s];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},i.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},i.prototype._setupProperties=function(t,e,n,o,s){for(var r in n){var a=t[r],l=Array.isArray(a),c=l?"array":typeof a,d=!l&&Array.isArray(n[r]);if(!(c==="undefined"||c==="function")){if(d){var h=n[r];if(h.length===0)continue;for(var u=[a],m=0,v=h.length;m<v;m+=1){var g=this._handleRelativeValue(a,h[m]);if(isNaN(g)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}u.push(g)}d&&(n[r]=u)}if((c==="object"||l)&&a&&!d){e[r]=l?[]:{};var A=a;for(var b in A)e[r][b]=A[b];o[r]=l?[]:{};var h=n[r];if(!this._isDynamic){var y={};for(var b in h)y[b]=h[b];n[r]=h=y}this._setupProperties(A,e[r],h,o[r],s)}else(typeof e[r]=="undefined"||s)&&(e[r]=a),l||(e[r]*=1),d?o[r]=n[r].slice().reverse():o[r]=e[r]||0}}},i.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},i.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},i.prototype.pause=function(t){return t===void 0&&(t=Un()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},i.prototype.resume=function(t){return t===void 0&&(t=Un()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},i.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},i.prototype.group=function(t){return t===void 0&&(t=Tr),this._group=t,this},i.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},i.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},i.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},i.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},i.prototype.easing=function(t){return t===void 0&&(t=kt.Linear.None),this._easingFunction=t,this},i.prototype.interpolation=function(t){return t===void 0&&(t=wn.Linear),this._interpolationFunction=t,this},i.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},i.prototype.onStart=function(t){return this._onStartCallback=t,this},i.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},i.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},i.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},i.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},i.prototype.onStop=function(t){return this._onStopCallback=t,this},i.prototype.update=function(t,e){if(t===void 0&&(t=Un()),e===void 0&&(e=!0),this._isPaused)return!0;var n,o,s=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>s)return!1;e&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),o=(t-this._startTime)/this._duration,o=this._duration===0||o>1?1:o;var r=this._easingFunction(o);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,r),this._onUpdateCallback&&this._onUpdateCallback(this._object,o),o===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,l=this._chainedTweens.length;a<l;a++)this._chainedTweens[a].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},i.prototype._updateProperties=function(t,e,n,o){for(var s in n)if(e[s]!==void 0){var r=e[s]||0,a=n[s],l=Array.isArray(t[s]),c=Array.isArray(a),d=!l&&c;d?t[s]=this._interpolationFunction(a,o):typeof a=="object"&&a?this._updateProperties(t[s],r,a,o):(a=this._handleRelativeValue(r,a),typeof a=="number"&&(t[s]=r+(a-r)*o))}},i.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},i.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},i}(),Su="20.0.3",Lu=ea.nextId,Bt=Tr,Tu=Bt.getAll.bind(Bt),zu=Bt.removeAll.bind(Bt),ju=Bt.add.bind(Bt),Ed=Bt.remove.bind(Bt),_u=Bt.update.bind(Bt),za={Easing:kt,Group:Cd,Interpolation:wn,now:Un,Sequence:ea,nextId:Lu,Tween:is,VERSION:Su,getAll:Tu,removeAll:zu,add:ju,remove:Ed,update:_u};function Vu(i,t,e,n=kt.Linear.None){const o=new is(i).to(t,e).easing(n).start();function s(r){o.update(r)&&requestAnimationFrame(s)}return requestAnimationFrame(s),o}var Xt=(i=>(i.Drawline="Drawline",i.Undo="Undo",i.Exit="Exit",i))(Xt||{});const Hi=Symbol("$$PAINT_BRUSH_EVENT$$");function yo(i){return i[Hi]||(i[Hi]={}),i[Hi]}function Ou(i){i[Hi]||delete i[Hi]}let Bu=class{hasListener(t){const e=yo(this);return e&&e[t]&&e[t].length>0}on(t,e,n){const o=yo(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Ou(this);return}const n=yo(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=yo(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}};function $t(){return((1+Math.random())*65536|0).toString(16).substring(1)}function dt(){return($t()+$t()+"-"+$t()+"-4"+$t().substr(0,3)+"-"+$t()+"-"+$t()+$t()+$t()).toLowerCase()}const Ru=`
1
+ "use strict";var Au=Object.defineProperty,bu=Object.defineProperties;var yu=Object.getOwnPropertyDescriptors;var Da=Object.getOwnPropertySymbols;var wu=Object.prototype.hasOwnProperty,Pu=Object.prototype.propertyIsEnumerable;var ar=(i,t,e)=>t in i?Au(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,F=(i,t)=>{for(var e in t||(t={}))wu.call(t,e)&&ar(i,e,t[e]);if(Da)for(var e of Da(t))Pu.call(t,e)&&ar(i,e,t[e]);return i},ye=(i,t)=>bu(i,yu(t));var f=(i,t,e)=>(ar(i,typeof t!="symbol"?t+"":t,e),e);var Y=(i,t,e)=>new Promise((n,o)=>{var s=l=>{try{a(e.next(l))}catch(c){o(c)}},r=l=>{try{a(e.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(s,r);a((e=e.apply(i,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ze=require("@realsee/five"),R=require("three"),Qo=require("three/examples/jsm/renderers/CSS3DRenderer"),Ki=require("hammerjs"),yd=require("@realsee/five/line"),wd=require("three/examples/jsm/loaders/FBXLoader"),Ma=require("animejs"),Cu=require("@realsee/five/gltf-loader");function Eu(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const I=Eu(R);function Iu(){console.info("%c %c@realsee/dnalogel %cv2.20.7",["background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')","background-repeat: no-repeat","background-position: 0 center","padding-left: 8px"].join(";"),"","background-color: #12ce9b;color:black;padding:0 6px;border-radius: 3px")}function ku(){const i=typeof OffscreenCanvas!="undefined",t=i&&new OffscreenCanvas(1,1).getContext("webgl")!==null;i&&!t&&Object.assign(window,{OffscreenCanvas:function(e,n){const o=document.createElement("canvas");return o.width=e,o.height=n,o}})}function Pd(){}const Sa=()=>Promise.resolve(),La={__queue:Promise.resolve()};function xu(i=Sa){La.__queue=La.__queue.then(i).catch(Sa)}function Ao(i,t,e){const n=i.x,o=i.y,s=Math.floor(n/t*1e4)/1e4,r=Math.floor(o/e*1e4)/1e4;return{x:s,y:r}}function lr(i,t,e){const{x:n,y:o}=i,s=n*t,r=o*e;return{x:s,y:r}}function bo(i){if(i.length<2)return{};const t=i.slice(-2),e=t[0],n={x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2};return{control:e,end:n}}function Du(i,t,e=Pd){new Promise(n=>{setTimeout(()=>{e(),n(!0)},t*i)})}const Mu=window,Ta=window.requestAnimationFrame||Mu.webkitRequestAnimationFrame||(i=>setTimeout(i,16));function jo(i,t=0){t<=0?Ta(i):Ta(()=>jo(i,t-1))}var kt=Object.freeze({Linear:Object.freeze({None:function(i){return i},In:function(i){return this.None(i)},Out:function(i){return this.None(i)},InOut:function(i){return this.None(i)}}),Quadratic:Object.freeze({In:function(i){return i*i},Out:function(i){return i*(2-i)},InOut:function(i){return(i*=2)<1?.5*i*i:-.5*(--i*(i-2)-1)}}),Cubic:Object.freeze({In:function(i){return i*i*i},Out:function(i){return--i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i:.5*((i-=2)*i*i+2)}}),Quartic:Object.freeze({In:function(i){return i*i*i*i},Out:function(i){return 1- --i*i*i*i},InOut:function(i){return(i*=2)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2)}}),Quintic:Object.freeze({In:function(i){return i*i*i*i*i},Out:function(i){return--i*i*i*i*i+1},InOut:function(i){return(i*=2)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2)}}),Sinusoidal:Object.freeze({In:function(i){return 1-Math.sin((1-i)*Math.PI/2)},Out:function(i){return Math.sin(i*Math.PI/2)},InOut:function(i){return .5*(1-Math.sin(Math.PI*(.5-i)))}}),Exponential:Object.freeze({In:function(i){return i===0?0:Math.pow(1024,i-1)},Out:function(i){return i===1?1:1-Math.pow(2,-10*i)},InOut:function(i){return i===0?0:i===1?1:(i*=2)<1?.5*Math.pow(1024,i-1):.5*(-Math.pow(2,-10*(i-1))+2)}}),Circular:Object.freeze({In:function(i){return 1-Math.sqrt(1-i*i)},Out:function(i){return Math.sqrt(1- --i*i)},InOut:function(i){return(i*=2)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1)}}),Elastic:Object.freeze({In:function(i){return i===0?0:i===1?1:-Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI)},Out:function(i){return i===0?0:i===1?1:Math.pow(2,-10*i)*Math.sin((i-.1)*5*Math.PI)+1},InOut:function(i){return i===0?0:i===1?1:(i*=2,i<1?-.5*Math.pow(2,10*(i-1))*Math.sin((i-1.1)*5*Math.PI):.5*Math.pow(2,-10*(i-1))*Math.sin((i-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(i){var t=1.70158;return i===1?1:i*i*((t+1)*i-t)},Out:function(i){var t=1.70158;return i===0?0:--i*i*((t+1)*i+t)+1},InOut:function(i){var t=2.5949095;return(i*=2)<1?.5*(i*i*((t+1)*i-t)):.5*((i-=2)*i*((t+1)*i+t)+2)}}),Bounce:Object.freeze({In:function(i){return 1-kt.Bounce.Out(1-i)},Out:function(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},InOut:function(i){return i<.5?kt.Bounce.In(i*2)*.5:kt.Bounce.Out(i*2-1)*.5+.5}}),generatePow:function(i){return i===void 0&&(i=4),i=i<Number.EPSILON?Number.EPSILON:i,i=i>1e4?1e4:i,{In:function(t){return Math.pow(t,i)},Out:function(t){return 1-Math.pow(1-t,i)},InOut:function(t){return t<.5?Math.pow(t*2,i)/2:(1-Math.pow(2-t*2,i))/2+.5}}}}),Un=function(){return performance.now()},Cd=function(){function i(){this._tweens={},this._tweensAddedDuringUpdate={}}return i.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map(function(e){return t._tweens[e]})},i.prototype.removeAll=function(){this._tweens={}},i.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},i.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},i.prototype.update=function(t,e){t===void 0&&(t=Un()),e===void 0&&(e=!1);var n=Object.keys(this._tweens);if(n.length===0)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var o=0;o<n.length;o++){var s=this._tweens[n[o]],r=!e;s&&s.update(t,r)===!1&&!e&&delete this._tweens[n[o]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},i}(),wn={Linear:function(i,t){var e=i.length-1,n=e*t,o=Math.floor(n),s=wn.Utils.Linear;return t<0?s(i[0],i[1],n):t>1?s(i[e],i[e-1],e-n):s(i[o],i[o+1>e?e:o+1],n-o)},Bezier:function(i,t){for(var e=0,n=i.length-1,o=Math.pow,s=wn.Utils.Bernstein,r=0;r<=n;r++)e+=o(1-t,n-r)*o(t,r)*i[r]*s(n,r);return e},CatmullRom:function(i,t){var e=i.length-1,n=e*t,o=Math.floor(n),s=wn.Utils.CatmullRom;return i[0]===i[e]?(t<0&&(o=Math.floor(n=e*(1+t))),s(i[(o-1+e)%e],i[o],i[(o+1)%e],i[(o+2)%e],n-o)):t<0?i[0]-(s(i[0],i[0],i[1],i[1],-n)-i[0]):t>1?i[e]-(s(i[e],i[e],i[e-1],i[e-1],n-e)-i[e]):s(i[o?o-1:0],i[o],i[e<o+1?e:o+1],i[e<o+2?e:o+2],n-o)},Utils:{Linear:function(i,t,e){return(t-i)*e+i},Bernstein:function(i,t){var e=wn.Utils.Factorial;return e(i)/e(t)/e(i-t)},Factorial:function(){var i=[1];return function(t){var e=1;if(i[t])return i[t];for(var n=t;n>1;n--)e*=n;return i[t]=e,e}}(),CatmullRom:function(i,t,e,n,o){var s=(e-i)*.5,r=(n-t)*.5,a=o*o,l=o*a;return(2*t-2*e+s+r)*l+(-3*t+3*e-2*s-r)*a+s*o+t}}},ea=function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i}(),Tr=new Cd,is=function(){function i(t,e){e===void 0&&(e=Tr),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=kt.Linear.None,this._interpolationFunction=wn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=ea.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1}return i.prototype.getId=function(){return this._id},i.prototype.isPlaying=function(){return this._isPlaying},i.prototype.isPaused=function(){return this._isPaused},i.prototype.to=function(t,e){if(e===void 0&&(e=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=t,this._propertiesAreSetUp=!1,this._duration=e,this},i.prototype.duration=function(t){return t===void 0&&(t=1e3),this._duration=t,this},i.prototype.dynamic=function(t){return t===void 0&&(t=!1),this._isDynamic=t,this},i.prototype.start=function(t,e){if(t===void 0&&(t=Un()),e===void 0&&(e=!1),this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var n in this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||e){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var s in this._valuesEnd)o[s]=this._valuesEnd[s];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,e)}return this},i.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},i.prototype._setupProperties=function(t,e,n,o,s){for(var r in n){var a=t[r],l=Array.isArray(a),c=l?"array":typeof a,d=!l&&Array.isArray(n[r]);if(!(c==="undefined"||c==="function")){if(d){var h=n[r];if(h.length===0)continue;for(var u=[a],m=0,v=h.length;m<v;m+=1){var g=this._handleRelativeValue(a,h[m]);if(isNaN(g)){d=!1,console.warn("Found invalid interpolation list. Skipping.");break}u.push(g)}d&&(n[r]=u)}if((c==="object"||l)&&a&&!d){e[r]=l?[]:{};var A=a;for(var b in A)e[r][b]=A[b];o[r]=l?[]:{};var h=n[r];if(!this._isDynamic){var y={};for(var b in h)y[b]=h[b];n[r]=h=y}this._setupProperties(A,e[r],h,o[r],s)}else(typeof e[r]=="undefined"||s)&&(e[r]=a),l||(e[r]*=1),d?o[r]=n[r].slice().reverse():o[r]=e[r]||0}}},i.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},i.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},i.prototype.pause=function(t){return t===void 0&&(t=Un()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this),this)},i.prototype.resume=function(t){return t===void 0&&(t=Un()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this)},i.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},i.prototype.group=function(t){return t===void 0&&(t=Tr),this._group=t,this},i.prototype.delay=function(t){return t===void 0&&(t=0),this._delayTime=t,this},i.prototype.repeat=function(t){return t===void 0&&(t=0),this._initialRepeat=t,this._repeat=t,this},i.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},i.prototype.yoyo=function(t){return t===void 0&&(t=!1),this._yoyo=t,this},i.prototype.easing=function(t){return t===void 0&&(t=kt.Linear.None),this._easingFunction=t,this},i.prototype.interpolation=function(t){return t===void 0&&(t=wn.Linear),this._interpolationFunction=t,this},i.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},i.prototype.onStart=function(t){return this._onStartCallback=t,this},i.prototype.onEveryStart=function(t){return this._onEveryStartCallback=t,this},i.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},i.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},i.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},i.prototype.onStop=function(t){return this._onStopCallback=t,this},i.prototype.update=function(t,e){if(t===void 0&&(t=Un()),e===void 0&&(e=!0),this._isPaused)return!0;var n,o,s=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>s)return!1;e&&this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0),o=(t-this._startTime)/this._duration,o=this._duration===0||o>1?1:o;var r=this._easingFunction(o);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,r),this._onUpdateCallback&&this._onUpdateCallback(this._object,o),o===1)if(this._repeat>0){isFinite(this._repeat)&&this._repeat--;for(n in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[n]=="string"&&(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._repeatDelayTime!==void 0?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,l=this._chainedTweens.length;a<l;a++)this._chainedTweens[a].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},i.prototype._updateProperties=function(t,e,n,o){for(var s in n)if(e[s]!==void 0){var r=e[s]||0,a=n[s],l=Array.isArray(t[s]),c=Array.isArray(a),d=!l&&c;d?t[s]=this._interpolationFunction(a,o):typeof a=="object"&&a?this._updateProperties(t[s],r,a,o):(a=this._handleRelativeValue(r,a),typeof a=="number"&&(t[s]=r+(a-r)*o))}},i.prototype._handleRelativeValue=function(t,e){return typeof e!="string"?e:e.charAt(0)==="+"||e.charAt(0)==="-"?t+parseFloat(e):parseFloat(e)},i.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],n=this._valuesEnd[t];typeof n=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(n):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=e},i}(),Su="20.0.3",Lu=ea.nextId,Bt=Tr,Tu=Bt.getAll.bind(Bt),zu=Bt.removeAll.bind(Bt),_u=Bt.add.bind(Bt),Ed=Bt.remove.bind(Bt),Vu=Bt.update.bind(Bt),za={Easing:kt,Group:Cd,Interpolation:wn,now:Un,Sequence:ea,nextId:Lu,Tween:is,VERSION:Su,getAll:Tu,removeAll:zu,add:_u,remove:Ed,update:Vu};function ju(i,t,e,n=kt.Linear.None){const o=new is(i).to(t,e).easing(n).start();function s(r){o.update(r)&&requestAnimationFrame(s)}return requestAnimationFrame(s),o}var Xt=(i=>(i.Drawline="Drawline",i.Undo="Undo",i.Exit="Exit",i))(Xt||{});const Hi=Symbol("$$PAINT_BRUSH_EVENT$$");function yo(i){return i[Hi]||(i[Hi]={}),i[Hi]}function Ou(i){i[Hi]||delete i[Hi]}let Bu=class{hasListener(t){const e=yo(this);return e&&e[t]&&e[t].length>0}on(t,e,n){const o=yo(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Ou(this);return}const n=yo(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=yo(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}};function $t(){return((1+Math.random())*65536|0).toString(16).substring(1)}function dt(){return($t()+$t()+"-"+$t()+"-4"+$t().substr(0,3)+"-"+$t()+"-"+$t()+$t()+$t()).toLowerCase()}const Ru=`
2
2
  <style type="text/css">
3
3
 
4
4
  #_gl_paintBrush {
@@ -98,7 +98,7 @@ transition: all 500ms;
98
98
  }
99
99
 
100
100
  </style>
101
- `;let Qu=class extends Bu{constructor(e){super();f(this,"configs");f(this,"clientWidth");f(this,"clientHeight");f(this,"ready",!1);f(this,"uuid",dt());f(this,"tween");f(this,"tweening",!1);f(this,"container");f(this,"canvas");f(this,"data",{});f(this,"tempLine",{});this.configs=e,this.clientWidth=document.body.clientWidth,this.clientHeight=document.body.clientHeight,this.container=this.ifInsertToDOM(),this.canvas={},this.initCtrl()}get color(){return this.configs.currentColor}get state(){return this.data}get dpr(){return this.configs.DPR||1}ifInsertToDOM(){if(this.container)return this.container;if(this.configs.container)this.configs.container.id="_gl_paintBrush",this.container=this.configs.container;else if(document.getElementById("_gl_paintBrush"))this.container=document.getElementById("_gl_paintBrush");else{const e=document.createElement("div");e.id="_gl_paintBrush",document.body.appendChild(e),this.container=e}return this.container.innerHTML=Ru,this.container}initCanvas(e){const n=document.createElement("canvas");n.className=e,n.width=this.clientWidth,n.height=this.clientHeight;const o=n.getContext("2d");if(o)return o.lineWidth=5*this.dpr,o.lineCap="round",o.lineJoin="round",this.container.appendChild(n),n}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const n=document.createElement("div");n.className="_paintBrush-ctrlinner";const o=document.createElement("a");o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",o.addEventListener("click",a=>{var u;if(a.stopPropagation(),this.configs.onClickUndo&&this.configs.onClickUndo(),!this.canvas[this.uuid]||!this.data[this.uuid]||this.data[this.uuid].length===0)return;const l=this.data[this.uuid].pop();l&&this.emitStateChange({type:Xt.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(u=this.canvas[this.uuid])==null?void 0:u.getContext("2d");if(!this.canvas[this.uuid])return;const{width:d,height:h}=this.canvas[this.uuid];c&&c.clearRect(0,0,d,h),this.data[this.uuid].forEach(m=>this.handleDrawLine(this.uuid,m,{withUndo:!0}))});const s=document.createElement("a");return s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",s.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[o,s].forEach(a=>{const l=document.createElement("i");l.className="brush-icon";const c=document.createElement("span");c.className="brush-txt",c.innerText=a.className.endsWith("undo")?this.configs.onUndoText:this.configs.onExitText,a.appendChild(l),a.appendChild(c)}),n.appendChild(o),n.appendChild(s),e.appendChild(n),this.container.appendChild(e),e}openBrush(){if(this.ready)return;this.canvas[this.uuid]||(this.canvas[this.uuid]=this.initCanvas("_paintBrush-canvas")),this.container.className="brushing";const e=this.canvas[this.uuid];e.getContext("2d").clearRect(0,0,e.width,e.height),this.openBrushHandle(),this.ready=!0,this.emit("readyChange",!0)}closeBrush(){this.ready&&(this.container.className="",this.data={},this.tempLine={},Object.keys(this.canvas).forEach(e=>{this.canvas[e].ontouchstart=()=>!1,this.canvas[e].ontouchmove=()=>!1,this.canvas[e].ontouchend=()=>!1,this.canvas[e].ontouchcancel=()=>!1;const n=this.canvas[e].getContext("2d");n&&n.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:Xt.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const n=this.canvas[this.uuid];if(!n)return;const o=n.getContext("2d");o&&(this.configs.currentColor=e,o.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const n=e.getContext("2d");if(!n)return;const o=this.color||"#6D92FF";n.strokeStyle=o;let s=null,r=[],a,l=[],c=0;const d=(h,u,m)=>{const v=this.color||"#ff0000";n.strokeStyle=v,n.beginPath(),n.moveTo(h.x,h.y),n.quadraticCurveTo(u.x,u.y,m.x,m.y),n.stroke()};e.onmousedown=h=>{h.preventDefault(),c=Date.now();const u=h.clientX,m=h.clientY;r=[],r.push({x:u,y:m}),s={x:u,y:m},a=Ao({x:u,y:m},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=h=>{if(h.preventDefault(),!s)return;const u=Number(h.clientX),m=Number(h.clientY);if(Math.abs(u-s.x)<5&&Math.abs(m-s.y)<5||(r.push({x:u,y:m}),l.push(Ao({x:u,y:m},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:v,end:g}=bo(r);!v||!g||(d(s,v,g),s=g)},e.onmouseup=h=>{if(h.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const u=Date.now()-c,m={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:u<1280?u:u<2e3?1280:0};this.data[this.uuid].push(m),Vo(()=>{this.emitStateChange({type:Xt.Drawline,color:this.color,ready:this.ready,state:m,uuid:this.uuid})})},e.ontouchstart=h=>{h.preventDefault(),c=Date.now();const u=h.touches[0].clientX,m=h.touches[0].clientY;r=[],r.push({x:u,y:m}),s={x:u,y:m},a=Ao({x:u,y:m},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=h=>{if(h.preventDefault(),!s)return;const u=Number(h.touches[0].clientX),m=Number(h.touches[0].clientY);if(Math.abs(u-s.x)<5&&Math.abs(m-s.y)<5||(r.push({x:u,y:m}),l.push(Ao({x:u,y:m},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:v,end:g}=bo(r);!v||!g||(d(s,v,g),s=g)},e.ontouchend=e.ontouchcancel=h=>{if(h.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const u=Date.now()-c,m={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:u<1280?u:u<2e3?1280:0};this.data[this.uuid].push(m),Vo(()=>{this.emitStateChange({type:Xt.Drawline,color:this.color,ready:this.ready,state:m,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==Xt.Drawline){this.emit("stateChange",e,n);return}const o=Date.now(),s=e.state;if(!s||!s.line)return;const r=Math.ceil(s.line.length/100);for(let a=0;a<r;a++){const l={uuid:this.uuid,color:this.color,ready:this.ready,type:e.type,state:{uuid:this.uuid,move:s.move,duration:s.duration,color:this.color,line:s.line.slice(a*100,(a+1)*100)},timestamp:o,end:a===r-1};Du(a,20,()=>{this.emit("stateChange",l,n)})}}action(e){const{ready:n,type:o,uuid:s}=e;if(!n&&this.ready){this.closeBrush();return}if(n&&!this.ready){this.openBrush();return}if(this.ready)switch(o){case Xt.Drawline:const{state:r,timestamp:a,end:l}=e;if(!a||!r)return;this.tempLine[a]=[].concat(this.tempLine[a]||[],r.line),l&&(Object.assign(r,{line:this.tempLine[a]}),this.handleDrawLine(s,r,{},()=>delete this.tempLine[a]));break;case Xt.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=Pd){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||xu(()=>new Promise(r=>{if(o||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(n)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:d=0,uuid:h}=n,u=lr(n.move||{},this.clientWidth,this.clientHeight);let m=[u];if(a.strokeStyle=c,a.beginPath(),a.moveTo(u.x,u.y),d&&!o){let v=[];const g=this;g.tween=Vu({step:0},{step:l.length-1},d).onUpdate(({step:A})=>{var y;if(g.tweening=!0,!g.ready)return a.clearRect(0,0,g.canvas[h].width,g.canvas[h].height),(y=g.tween)==null?void 0:y.stop();const b=Math.floor(A);if(!v.find(E=>E===b)){if(v.push(b),m.push(lr(l[b],g.clientWidth,g.clientHeight)),m.length<3)return;const{control:E,end:k}=bo(m);if(!E||!k)return;a.quadraticCurveTo(E.x,E.y,k.x,k.y),a.stroke()}}).onComplete(A=>{g.tween=void 0,g.tweening=!1,v=[],m=[],s&&s(),r()})}else{for(let v=0;v<l.length;v++){if(m.push(lr(l[v],this.clientWidth,this.clientHeight)),m.length<3)continue;const{control:g,end:A}=bo(m);!g||!A||a.quadraticCurveTo(g.x,g.y,A.x,A.y)}a.stroke(),m=[],s&&s(),r()}}))}handleUndo(e){if(!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const n=()=>{var s;const o=(s=this.canvas[e])==null?void 0:s.getContext("2d");o&&o.clearRect(0,0,this.canvas[e].width,this.canvas[e].height),this.data[e].forEach(r=>this.handleDrawLine(e,r,{withUndo:!0}))};if(this.tween&&this.tweening){this.tween.stop(),Vo(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}};class Hu{constructor(t={}){f(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"回退",onExitText:"关闭"},t);this.controller=new Qu(e)}on(t,e){this.controller.on(t,e)}off(t,e){this.controller.off(t,e)}once(t,e){this.controller.once(t,e)}show(){this.controller.openBrush()}action(t){this.controller.action(t)}get state(){return this.controller.state}get configs(){return this.controller.configs}dispose(){return this.controller.destroyBrush()}setCurrentColor(t){this.controller.updateCurrentColor(t)}}const Gu=(i,t)=>{var Q,G;let e=(G=(Q=t==null?void 0:t.initialState)==null?void 0:Q.enabled)!=null?G:!0,n=!1,o=!0,s=null;const a=F(F({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),l=new I.Scene,c=new ze.Camera(60);let d=new I.Object3D,h,u;{const B=new I.DirectionalLight(16777215,.5);B.position.copy(new I.Vector3(1,1,1)),l.add(B)}{const B=new I.DirectionalLight(16777215,.3);l.add(B)}{const B=new I.AmbientLight(16777215,.3);l.add(B)}l.add(d);const m=()=>{if(n)return;h=S(i.model,c.fov,c.aspect),u=i.model.bounding.getCenter(new I.Vector3),l.remove(d),d=W(i.model),l.add(d),n=!0,j();function B(q){const U=q.clone();return U.uniforms.modelAlpha.value=1,U.uniforms.map.value&&(U.uniforms.map.value.needsUpdate=!0),U}function W(q){if(q instanceof I.Mesh){const U=q.geometry,Z=Array.isArray(q.material)?q.material.map(B):B(q.material);return new I.Mesh(U,Z)}else if(q instanceof I.Group){const U=new I.Group;return q.children.forEach(Z=>U.add(W(Z))),U}else{const U=new I.Object3D;return q.children.forEach(Z=>U.add(W(Z))),U}}},v=()=>{if(i.renderer)return s||(s=new I.WebGLRenderer({antialias:!1,alpha:!0}),s.setPixelRatio(i.renderer.getPixelRatio()),s.outputEncoding=I.sRGBEncoding,s.setClearColor(1579548,0),s.autoClear=!0),s},g=()=>{d.traverse(B=>{B instanceof I.Mesh&&[].concat(B.material).forEach(q=>q.dispose())}),l.remove(d),d=new I.Object3D,l.add(d),n=!1,j()},A=()=>{e&&(n||m())},b=()=>{e||(e=!0,l.add(d),!n&&i.model.loaded&&m(),j())},y=()=>{e&&(l.remove(d),o=!0,M(),e=!1)},E=(B,W={})=>{const q=v();if(!q)return;B.appendChild(q.domElement),k(W);const U=window.getComputedStyle(B).position;U!=="relative"&&U!=="absolute"&&U!=="fixed"&&U!=="sticky"&&(B.style.position="relative")},k=(B={})=>{if(!s)return;const q=s.domElement.parentNode;if(q!=null&&q.nodeName){const{width:U=q.offsetWidth,height:Z=q.offsetHeight}=B;s.setSize(U,Z),c.aspect=U/Z,c.updateProjectionMatrix()}j()};function S(B,W,q){const U=B.bounding,Z=Math.pow(Math.pow(U.max.x-U.min.x+1,2)+Math.pow(U.max.y-U.min.y+1,2)+Math.pow(U.max.z-U.min.z+1,2),1/2);let re=Z/2/Math.tan(Math.PI*W/360);return q<1&&(re=re/q),isNaN(re)?Z:re}function C(B){return i.work.observers[B].standingPosition.clone()}const j=()=>{if(!e||!h||!u)return;const B=i.getPose();B.fov=c.fov,B.offset=u,B.distance=h,typeof a.lockedLatitude=="number"&&(B.latitude=a.lockedLatitude),typeof a.lockedLongitude=="number"&&(B.longitude=a.lockedLongitude),typeof a.lockedPanoIndex=="number"&&(B.offset=C(a.lockedPanoIndex)),a.lookAtCurrentCamera&&(B.offset=i.camera.position.clone().setY(i.camera.position.y+1)),c.setFromPose(B),o=!0},M=()=>{!e||o!==!0||!s||!s.domElement.parentNode||s.domElement.parentNode.offsetWidth===0||(s.render(l,c),o=!1)},X=()=>{s&&s.dispose(),s=null},J=B=>{Object.assign(a,B),j()},H=()=>({enabled:e});return Object.assign(window,{camera:c}),i.on("modelLoaded",A),i.on("modelWillLoad",g),i.on("cameraDirectionUpdate",j),i.on("dispose",X),i.on("renderFrame",M),i.on("cameraPositionUpdate",j),{appendTo:E,refresh:k,changeConfigs:J,enable:b,disable:y,getCurrentState:H}};function on(...i){const t=[];return i.forEach(e=>{e.isCSS3DObjectPlus?t.push(e):t.push(...on(...e.children))}),t}function Ho(i,t){const e=Math.round(i);return e%2===0?e:e+(t!=null&&t.floor?-1:1)}function Fu(i,t,e=!0){if(!i)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const n=()=>{const s=Ho(i.clientWidth,{floor:!0}),r=Ho(i.clientHeight,{floor:!0});t(s,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>n(),unobserve:()=>{}};const o=new ResizeObserver(n);return e&&n(),{observe:()=>o.observe(i),unobserve:()=>o.unobserve(i)}}class ja extends Qo.CSS3DRenderer{constructor(){super();f(this,"wrapper");f(this,"requestAnimationFrameId");f(this,"resizeDisoper");this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none"}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if(e.contains(this.domElement))return;const n=this.wrapper;return n&&n.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const n=(r,a)=>this.setSize(r,a),{observe:o,unobserve:s}=Fu(e,n,!0);o(),this.resizeDisoper=s,this.wrapper=e}renderEveryFrame(e,n){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return;const o=()=>{this.requestAnimationFrameId=requestAnimationFrame(o),e.visible&&on(e).length!==0&&this.render(e,n)};o()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function Wu(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const Gi=Wu("$$EVENT$$");function wo(i){return i[Gi]||(i[Gi]={}),i[Gi]}function Nu(i){i[Gi]||delete i[Gi]}class li{hasListener(t){const e=wo(this);return!!(e!=null&&e[t]&&e[t].length>0)}on(t,e,n){const o=wo(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Nu(this);return}const n=wo(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=wo(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}const Xu=({x:i,y:t,z:e})=>new R.Vector3(i,t,e),xt=i=>new R.Vector3().fromArray(i),Ni=i=>i instanceof R.Vector3?i:Array.isArray(i)?xt(i):Xu(i);class Yu extends I.Mesh{constructor(e,n){const o=new I.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:I.DoubleSide}),s=new I.PlaneGeometry(e,n);super(s,o);f(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}function xn(...i){const t=new R.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}const Id=1,Uu=`CSS3DObjectPlus@${Id}`,qu=.00216,Ju=.003;class Zu extends Qo.CSS3DObject{constructor(e){var S,C,j;const n=e.container,o=e.cornerPoints,s=(S=e.ratio)!=null?S:Ju,r=(C=e.dpr)!=null?C:1,a=(j=e.pointerEvents)!=null?j:"auto",l=Math.max(qu,s),c=o[0].distanceTo(o[1]),d=o[1].distanceTo(o[2]),h=Ho(c/s*r),u=Ho(d/s*r),m=xn(...o);let v;if(l===s)n.style.width=`${h}px`,n.style.height=`${u}px`,v=n;else{const M=document.createElement("div");M.style.width=`${h}px`,M.style.height=`${u}px`,M.style.pointerEvents="none";const X=s/l;n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.width=`${X*h}px`,n.style.height=`${X*u}px`,M.appendChild(n),v=M}super(v);f(this,"version",Id);f(this,"isCSS3DObjectPlus",!0);f(this,"container");f(this,"width");f(this,"height");f(this,"domWidthPx");f(this,"domHeightPx");f(this,"cornerPoints");f(this,"centerPosition");f(this,"ratio");f(this,"mode","front");f(this,"hooks",new li);f(this,"opacityMesh");f(this,"selfVisible",!0);f(this,"parentVisibleListenerDisposer");f(this,"createOpacityMesh",e=>{const{domWidthPx:n,domHeightPx:o}=e,s=new Yu(n,o);return s.position.copy(e.position),s.rotation.copy(e.rotation),s.scale.copy(e.scale),s});f(this,"addParentVisibleListener",()=>{var e;if((e=this.parent)!=null&&e.isCSS3DGroup){const n=this.parent,o=s=>{this.setVisible(s&&this.selfVisible,{setSelfVisible:!1})};n.hooks.on("visibleChange",o),this.parentVisibleListenerDisposer=()=>n.hooks.off("visibleChange",o)}});f(this,"removeParentVisibleListener",()=>{var e;(e=this.parentVisibleListenerDisposer)==null||e.call(this)});if(n.style.pointerEvents=a,this.scale.set(l,l,l),this.cornerPoints=o,this.ratio=s,this.container=n,e.mode&&(this.mode=e.mode),l===s)this.width=c,this.height=d,this.domWidthPx=h,this.domHeightPx=u,this.centerPosition=m;else{const M=s/l;this.width=M*c,this.height=M*d,this.domWidthPx=M*h,this.domHeightPx=M*u,this.centerPosition=new R.Vector3().subVectors(m,o[0]).multiplyScalar(M).add(o[0])}n.classList.add(`${Uu}__container`);const g=new R.Vector3().subVectors(o[1],o[0]),A=new R.Vector3().subVectors(o[3],o[0]),b=new R.Vector3().crossVectors(g,A).normalize();this.lookAt(b);const y=this.up.clone().applyQuaternion(this.quaternion),E=A.clone(),k=new R.Vector3().crossVectors(y,E).normalize();this.rotateOnWorldAxis(k,y.angleTo(E)),this.position.copy(m),this.addEventListener("added",()=>{var M;this.mode==="front"&&((M=this.opacityMesh)==null||M.removeFromParent()),this.addParentVisibleListener()}),this.addEventListener("removed",()=>{var M;(M=this.opacityMesh)==null||M.removeFromParent(),this.removeParentVisibleListener()})}setVisible(e,n={setSelfVisible:!0}){n.setSelfVisible&&(this.selfVisible=e),this.visible=e,this.opacityMesh&&(this.opacityMesh.visible=e)}removeFromParent(){var n;const e=this.parent;return e!==null&&e.remove(this),(n=this.opacityMesh)==null||n.removeFromParent(),this}removeOpacityMesh(){var e;return(e=this.opacityMesh)==null||e.removeFromParent(),this.opacityMesh=void 0,this}dispose(){var e;this.container.remove(),this.removeFromParent(),(e=this.opacityMesh)==null||e.removeFromParent()}getOpacityMesh(){if(this.opacityMesh)return this.opacityMesh;{const e=this.createOpacityMesh(this);return this.opacityMesh=e,e}}applyMatrix4(e){var n;super.applyMatrix4(e),(n=this.opacityMesh)==null||n.applyMatrix4(e)}applyQuaternion(e){var n;return super.applyQuaternion(e),(n=this.opacityMesh)==null||n.applyQuaternion(e),this}applyScaleMatrix4(e){var n;this.scale.applyMatrix4(e),(n=this.opacityMesh)==null||n.scale.applyMatrix4(e)}}class Ku extends I.Scene{constructor(){super()}add(...t){return super.add(...t),on(...t).forEach(e=>{e.mode="front"}),this}}class $u extends I.Scene{constructor(e){super();f(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),on(...e).forEach(n=>{n.mode="behind",this.scene.add(n.getOpacityMesh())}),this}remove(...e){return on(...e).forEach(n=>{var o;(o=n.opacityMesh)==null||o.removeFromParent(),n.opacityMesh=null}),super.remove(...e),this}}class kd extends I.Group{constructor(e){super();f(this,"isCSS3DGroup",!0);f(this,"mode");f(this,"CSS3DObjectLength",0);f(this,"hooks",new li);this.mode=e}add(...e){return on(...e).forEach(n=>{n.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.hooks.emit("visibleChange",e)}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=on(this).length}}class ef extends kd{constructor(){super("front")}}class tf extends kd{constructor(e){super("behind");f(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return on(...e).forEach(n=>{this.scene.add(n.getOpacityMesh())}),super.add(...e),this}}const nf=3,zr="CSS3DRenderer",Bi=`${zr}@${nf}`,Gn=()=>{console.error(`${Bi} is disposed`)},We={css3DObjects:[],frontModeStore:{css3DRenderer:new ja},behindModeStore:{css3DRenderer:new ja}};function _a(i){return We.css3DObjects.find(t=>t.id===i)}function of(i){We.frontModeStore.css3DRenderer.setWrapper(i)}function sf(i){We.behindModeStore.css3DRenderer.setWrapper(i)}class ti{constructor(t){f(this,"hooks",new li);f(this,"state",{enabled:!0,visible:!0,disposed:!1});f(this,"_scene");f(this,"store",{frontModeGroup:new ef});f(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return Gn();const o=(()=>{const k={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(k,n)})(),s=e.map(Ni);if((s==null?void 0:s.length)<4)return console.error(`${Bi}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:h}=o;let u=!1;const m=this.createObject(s,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:h});We.css3DObjects.push(m),o.scene&&this.setScene(o.scene);const v=()=>{if(u)return;const k=m.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();k&&k.add(m)},g=()=>{u||(v(),this.render(t),this.hooks.emit("render"))},A=k=>this.setVisibleById(m.id,k),b=k=>this.setEnabledById(m.id,k),y=()=>(u=!0,m.removeFromParent(),!0),E=l==="front"?We.frontModeStore.css3DRenderer:We.behindModeStore.css3DRenderer;return c&&g(),{id:m.uuid,container:d,css3DObject:m,render:c?void 0:g,show:()=>A(!0),hide:()=>A(!1),setVisible:A,enable:()=>b(!0),disable:()=>b(!1),setEnabled:b,dispose:y,appendToElement:k=>E.setWrapper(k)}});f(this,"setVisibleById",(t,e)=>{var n;(n=_a(t))==null||n.setVisible(e)});f(this,"setEnabledById",(t,e)=>{const n=_a(t);if(!n)return;const o=n.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});o&&(e?o.add(n):o.remove(n))});f(this,"createObject",(t,e)=>{const n=new Zu(F({cornerPoints:t},e));return n.element.classList.add(`${zr}__container`),n.element.id=`${zr}__container--${n.uuid}`,n});t&&this.setScene(t)}get scene(){return this._scene||console.error("scene doesn't exist!, please call setScene(scene) first"),this._scene}static get frontModeCSS3DRenderer(){return We.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return We.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return We.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return We.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Gn();const n=F({},this.state);this.state=Object.assign(this.state,t),n.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),n.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),n.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return Y(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Gn();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return Y(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Gn();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Gn();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Gn();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var n;const e=(n=We.frontModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const o=new Ku;We.frontModeStore.css3DScene=o}return We.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var n,o;const e=(n=We.behindModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const s=(o=We.behindModeStore.scene)!=null?o:this.scene;if(!s){console.error(`${Bi}: scene is required when mode is behind`);return}const r=new $u(s);We.behindModeStore.css3DScene=r,We.behindModeStore.scene=s}return We.behindModeStore.css3DScene}getFrontCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){const e=this.getFrontCSS3DScene({createSceneIfNotExists:t});return t&&e&&(e.getObjectById(this.store.frontModeGroup.id)||e.add(this.store.frontModeGroup)),this.store.frontModeGroup}getBehindCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){var n;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const o=(n=this.store.behindModeGroup)!=null?n:new tf(this.scene);this.store.behindModeGroup=o,e.getObjectById(o.id)||e.add(o)}return this.store.behindModeGroup}render(t){var e,n;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const o=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${Bi}: css3DScene is required when mode is front`);We.frontModeStore.css3DRenderer.renderEveryFrame(o,t)}if(((n=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?n:0)>0){const o=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${Bi}: css3DScene is required when mode is behind`);We.behindModeStore.css3DRenderer.renderEveryFrame(o,t)}}handleShow(){return Y(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return Y(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!1),(t=this.store.behindModeGroup)==null||t.setVisible(!1)})}handleEnable(){var t,e;(t=this.getFrontCSS3DScene())==null||t.add(this.store.frontModeGroup),this.store.behindModeGroup&&((e=this.getBehindCSS3DScene())==null||e.add(this.store.behindModeGroup))}handleDisable(){var t,e,n;this.store.frontModeGroup.children.forEach(o=>{o instanceof Qo.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.remove()}),(t=this.store.behindModeGroup)==null||t.children.forEach(o=>{o instanceof Qo.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.remove()}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((n=this.getBehindCSS3DScene())==null||n.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}f(ti,"setFrontModeContainer",of),f(ti,"setBehindModeContainer",sf);function xd(i){return Y(this,null,function*(){return new Promise(t=>{var e;if((e=i.model)!=null&&e.loaded){t();return}else i.once("modelLoaded",()=>t())})})}const It=document.createElement("div");It.classList.add("behindFiveElement");It.style.position="absolute";It.style.top="0";It.style.left="0";It.style.width="100%";It.style.height="100%";It.style.pointerEvents="none";function Dd(i){var n,o,s,r,a;const t=(a=(o=cr(i.getElement()))!=null?o:cr((n=i.getElement())==null?void 0:n.parentElement))!=null?a:cr((r=(s=i.getElement())==null?void 0:s.parentElement)==null?void 0:r.parentElement),e=t==null?void 0:t.parentElement;if(e)return e.contains(It)||t.parentElement.insertBefore(It,t),It;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/tree/main/plugins/src/CSS3DRenderPlugin/README.md")}function cr(i){var a;if(!i)return;const t=(a=i.style.position)!=null?a:getComputedStyle(i).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(i),n=e.backgroundColor,o=e.backgroundImage;if(!(n!=="transparent"&&n!=="rgba(0, 0, 0, 0)"&&n!==""||o!=="none"&&o!==""))return i}class jr{constructor(t=0,e=0){f(this,"min");f(this,"max");f(this,"isInterval",!0);this.min=t,this.max=e}fromArray(t){return this.min=t[0],this.max=t[1],this}isOverlap(t){return Math.min(this.max,t.max)<Math.max(this.min,t.min)}contains(t){return this.min<t.min&&this.max>t.max}}class rf{constructor(t,e){f(this,"min");f(this,"max");f(this,"xInterval");f(this,"yInterval");f(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new jr(this.min.x,this.max.x),this.yInterval=new jr(this.min.y,this.max.y)}isOverlapWithRectangle(t){return!this.xInterval.isOverlap(t.xInterval)&&!this.yInterval.isOverlap(t.yInterval)}containsRect(t){return this.xInterval.contains(t.xInterval)&&this.yInterval.contains(t.yInterval)}}function ta(i){return i==="Panorama"||i==="DepthPanorama"||i==="VRPanorama"||i==="XRPanorama"}function Md(i){return!ta(i)}function Po(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function af(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Po(i,a*4+0,l*4+0),Po(i,a*4+1,l*4+1),Po(i,a*4+2,l*4+2),Po(i,a*4+3,l*4+3)}}}let Sd=class{constructor(t,e){f(this,"width");f(this,"height");f(this,"containerDom");f(this,"hooks",new ze.Subscribe);f(this,"canvas",document.createElement("canvas"));f(this,"five");f(this,"scale");f(this,"config");f(this,"offset",{x:0,y:0});f(this,"context");f(this,"renderCenter",new I.Vector3);f(this,"hammer");f(this,"state",{enabled:!1});f(this,"onPan",t=>{if(!this.containerDom||this.hooks.emit("wantsPanGesture",t))return;const n=this.offset.x+t.deltaX,o=this.offset.y+t.deltaY;this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});f(this,"onPanEnd",t=>{this.offset={x:this.offset.x+t.deltaX,y:this.offset.y+t.deltaY},this.canvas.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render 未初始化");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new Ki(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){var t;if(!this.state.enabled)return this.state.enabled=!0,(t=this.containerDom)==null||t.append(this.canvas),this}disable(){if(this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){var e;return this.containerDom&&((e=this.containerDom)==null||e.removeChild(this.canvas)),this.containerDom=t,this.state.enabled&&t.append(this.canvas),this}clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.containerDom.clientWidth,s=-(n.x-1)/2*this.containerDom.clientWidth,r=-(n.y-1)/2*this.containerDom.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):r<183?(this.canvas.style.top="90px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new I.Vector2),a=1,l=n/t,c=o/t,d=a*t,h=(s.x+1)/2*r.x,u=(s.y+1)/2*r.y,m=this.five.getPixels(h-l/2,u-l/2,l,c,d),v=Math.floor(n*a),g=Math.floor(o*a);af(m,v,g);const A=new ImageData(v,g);A.data.set(m),e.putImageData(A,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}};function lf(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new I.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function Ld(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new I.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function cf(i,t){const e=i.getElement();if(!e)return;const n=Ld(t,e),o=new I.Raycaster;return o.setFromCamera(n,i.camera),o}function df(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new I.Vector2().fromArray([o,s]),a=new I.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const hf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQ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IQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",uf=`
101
+ `;let Qu=class extends Bu{constructor(e){super();f(this,"configs");f(this,"clientWidth");f(this,"clientHeight");f(this,"ready",!1);f(this,"uuid",dt());f(this,"tween");f(this,"tweening",!1);f(this,"container");f(this,"canvas");f(this,"data",{});f(this,"tempLine",{});this.configs=e,this.clientWidth=document.body.clientWidth,this.clientHeight=document.body.clientHeight,this.container=this.ifInsertToDOM(),this.canvas={},this.initCtrl()}get color(){return this.configs.currentColor}get state(){return this.data}get dpr(){return this.configs.DPR||1}ifInsertToDOM(){if(this.container)return this.container;if(this.configs.container)this.configs.container.id="_gl_paintBrush",this.container=this.configs.container;else if(document.getElementById("_gl_paintBrush"))this.container=document.getElementById("_gl_paintBrush");else{const e=document.createElement("div");e.id="_gl_paintBrush",document.body.appendChild(e),this.container=e}return this.container.innerHTML=Ru,this.container}initCanvas(e){const n=document.createElement("canvas");n.className=e,n.width=this.clientWidth,n.height=this.clientHeight;const o=n.getContext("2d");if(o)return o.lineWidth=5*this.dpr,o.lineCap="round",o.lineJoin="round",this.container.appendChild(n),n}initCtrl(){const e=document.createElement("div");e.className="_paintBrush-ctrl";const n=document.createElement("div");n.className="_paintBrush-ctrlinner";const o=document.createElement("a");o.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--undo",o.addEventListener("click",a=>{var u;if(a.stopPropagation(),this.configs.onClickUndo&&this.configs.onClickUndo(),!this.canvas[this.uuid]||!this.data[this.uuid]||this.data[this.uuid].length===0)return;const l=this.data[this.uuid].pop();l&&this.emitStateChange({type:Xt.Undo,color:this.color,ready:this.ready,state:l,uuid:this.uuid});const c=(u=this.canvas[this.uuid])==null?void 0:u.getContext("2d");if(!this.canvas[this.uuid])return;const{width:d,height:h}=this.canvas[this.uuid];c&&c.clearRect(0,0,d,h),this.data[this.uuid].forEach(m=>this.handleDrawLine(this.uuid,m,{withUndo:!0}))});const s=document.createElement("a");return s.className="_paintBrush-ctrlitem _paintBrush-ctrlitem--close",s.addEventListener("click",a=>{a.stopPropagation(),this.closeBrush(),this.configs.onClickClose&&this.configs.onClickClose()}),[o,s].forEach(a=>{const l=document.createElement("i");l.className="brush-icon";const c=document.createElement("span");c.className="brush-txt",c.innerText=a.className.endsWith("undo")?this.configs.onUndoText:this.configs.onExitText,a.appendChild(l),a.appendChild(c)}),n.appendChild(o),n.appendChild(s),e.appendChild(n),this.container.appendChild(e),e}openBrush(){if(this.ready)return;this.canvas[this.uuid]||(this.canvas[this.uuid]=this.initCanvas("_paintBrush-canvas")),this.container.className="brushing";const e=this.canvas[this.uuid];e.getContext("2d").clearRect(0,0,e.width,e.height),this.openBrushHandle(),this.ready=!0,this.emit("readyChange",!0)}closeBrush(){this.ready&&(this.container.className="",this.data={},this.tempLine={},Object.keys(this.canvas).forEach(e=>{this.canvas[e].ontouchstart=()=>!1,this.canvas[e].ontouchmove=()=>!1,this.canvas[e].ontouchend=()=>!1,this.canvas[e].ontouchcancel=()=>!1;const n=this.canvas[e].getContext("2d");n&&n.clearRect(0,0,this.canvas[e].width,this.canvas[e].height)}),this.ready=!1,this.emit("readyChange",!1),this.emitStateChange({type:Xt.Exit,color:this.color,ready:!1,uuid:this.uuid}))}updateCurrentColor(e){const n=this.canvas[this.uuid];if(!n)return;const o=n.getContext("2d");o&&(this.configs.currentColor=e,o.strokeStyle=e)}openBrushHandle(){const e=this.canvas[this.uuid];if(!e)return;const n=e.getContext("2d");if(!n)return;const o=this.color||"#6D92FF";n.strokeStyle=o;let s=null,r=[],a,l=[],c=0;const d=(h,u,m)=>{const v=this.color||"#ff0000";n.strokeStyle=v,n.beginPath(),n.moveTo(h.x,h.y),n.quadraticCurveTo(u.x,u.y,m.x,m.y),n.stroke()};e.onmousedown=h=>{h.preventDefault(),c=Date.now();const u=h.clientX,m=h.clientY;r=[],r.push({x:u,y:m}),s={x:u,y:m},a=Ao({x:u,y:m},this.clientWidth,this.clientHeight),l=[]},e.onmousemove=h=>{if(h.preventDefault(),!s)return;const u=Number(h.clientX),m=Number(h.clientY);if(Math.abs(u-s.x)<5&&Math.abs(m-s.y)<5||(r.push({x:u,y:m}),l.push(Ao({x:u,y:m},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:v,end:g}=bo(r);!v||!g||(d(s,v,g),s=g)},e.onmouseup=h=>{if(h.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const u=Date.now()-c,m={move:Object.assign({},a),uuid:this.uuid,line:[...l],color:this.color,duration:u<1280?u:u<2e3?1280:0};this.data[this.uuid].push(m),jo(()=>{this.emitStateChange({type:Xt.Drawline,color:this.color,ready:this.ready,state:m,uuid:this.uuid})})},e.ontouchstart=h=>{h.preventDefault(),c=Date.now();const u=h.touches[0].clientX,m=h.touches[0].clientY;r=[],r.push({x:u,y:m}),s={x:u,y:m},a=Ao({x:u,y:m},this.clientWidth,this.clientHeight),l=[]},e.ontouchmove=h=>{if(h.preventDefault(),!s)return;const u=Number(h.touches[0].clientX),m=Number(h.touches[0].clientY);if(Math.abs(u-s.x)<5&&Math.abs(m-s.y)<5||(r.push({x:u,y:m}),l.push(Ao({x:u,y:m},this.clientWidth,this.clientHeight)),r.length<3))return;const{control:v,end:g}=bo(r);!v||!g||(d(s,v,g),s=g)},e.ontouchend=e.ontouchcancel=h=>{if(h.preventDefault(),s=null,r.length<3)return;this.data[this.uuid]||(this.data[this.uuid]=[]);const u=Date.now()-c,m={move:Object.assign({},a),line:[...l],uuid:this.uuid,color:this.color,duration:u<1280?u:u<2e3?1280:0};this.data[this.uuid].push(m),jo(()=>{this.emitStateChange({type:Xt.Drawline,color:this.color,ready:this.ready,state:m,uuid:this.uuid})})}}emitStateChange(e,n=!0){if(e.type!==Xt.Drawline){this.emit("stateChange",e,n);return}const o=Date.now(),s=e.state;if(!s||!s.line)return;const r=Math.ceil(s.line.length/100);for(let a=0;a<r;a++){const l={uuid:this.uuid,color:this.color,ready:this.ready,type:e.type,state:{uuid:this.uuid,move:s.move,duration:s.duration,color:this.color,line:s.line.slice(a*100,(a+1)*100)},timestamp:o,end:a===r-1};Du(a,20,()=>{this.emit("stateChange",l,n)})}}action(e){const{ready:n,type:o,uuid:s}=e;if(!n&&this.ready){this.closeBrush();return}if(n&&!this.ready){this.openBrush();return}if(this.ready)switch(o){case Xt.Drawline:const{state:r,timestamp:a,end:l}=e;if(!a||!r)return;this.tempLine[a]=[].concat(this.tempLine[a]||[],r.line),l&&(Object.assign(r,{line:this.tempLine[a]}),this.handleDrawLine(s,r,{},()=>delete this.tempLine[a]));break;case Xt.Undo:this.handleUndo(s);break}}handleDrawLine(e,n,{withUndo:o=!1},s=Pd){!n||Object.prototype.toString.call(n)!="[object Object]"||Object.keys(n).length===0||xu(()=>new Promise(r=>{if(o||(this.canvas[e]||(this.canvas[e]=this.initCanvas("_paintBrush-canvas--sync")),this.data[e]||(this.data[e]=[]),this.data[e].push(n)),!this.canvas[e])return;const a=this.canvas[e].getContext("2d");if(!a)return;const{line:l=[],color:c="black",duration:d=0,uuid:h}=n,u=lr(n.move||{},this.clientWidth,this.clientHeight);let m=[u];if(a.strokeStyle=c,a.beginPath(),a.moveTo(u.x,u.y),d&&!o){let v=[];const g=this;g.tween=ju({step:0},{step:l.length-1},d).onUpdate(({step:A})=>{var y;if(g.tweening=!0,!g.ready)return a.clearRect(0,0,g.canvas[h].width,g.canvas[h].height),(y=g.tween)==null?void 0:y.stop();const b=Math.floor(A);if(!v.find(E=>E===b)){if(v.push(b),m.push(lr(l[b],g.clientWidth,g.clientHeight)),m.length<3)return;const{control:E,end:k}=bo(m);if(!E||!k)return;a.quadraticCurveTo(E.x,E.y,k.x,k.y),a.stroke()}}).onComplete(A=>{g.tween=void 0,g.tweening=!1,v=[],m=[],s&&s(),r()})}else{for(let v=0;v<l.length;v++){if(m.push(lr(l[v],this.clientWidth,this.clientHeight)),m.length<3)continue;const{control:g,end:A}=bo(m);!g||!A||a.quadraticCurveTo(g.x,g.y,A.x,A.y)}a.stroke(),m=[],s&&s(),r()}}))}handleUndo(e){if(!this.canvas[e]||!this.data[e]||this.data[e].length===0)return;this.data[e].pop();const n=()=>{var s;const o=(s=this.canvas[e])==null?void 0:s.getContext("2d");o&&o.clearRect(0,0,this.canvas[e].width,this.canvas[e].height),this.data[e].forEach(r=>this.handleDrawLine(e,r,{withUndo:!0}))};if(this.tween&&this.tweening){this.tween.stop(),jo(n,60);return}n()}destroyBrush(){this.closeBrush(),this.ready=!1,this.emit("readyChange",!0)}};class Hu{constructor(t={}){f(this,"controller");const e=Object.assign({currentColor:"#f44336",onUndoText:"回退",onExitText:"关闭"},t);this.controller=new Qu(e)}on(t,e){this.controller.on(t,e)}off(t,e){this.controller.off(t,e)}once(t,e){this.controller.once(t,e)}show(){this.controller.openBrush()}action(t){this.controller.action(t)}get state(){return this.controller.state}get configs(){return this.controller.configs}dispose(){return this.controller.destroyBrush()}setCurrentColor(t){this.controller.updateCurrentColor(t)}}const Gu=(i,t)=>{var Q,G;let e=(G=(Q=t==null?void 0:t.initialState)==null?void 0:Q.enabled)!=null?G:!0,n=!1,o=!0,s=null;const a=F(F({},{lookAtCurrentCamera:!1,lockedPanoIndex:null,lockedLatitude:null,lockedLongitude:null}),t==null?void 0:t.config),l=new I.Scene,c=new ze.Camera(60);let d=new I.Object3D,h,u;{const B=new I.DirectionalLight(16777215,.5);B.position.copy(new I.Vector3(1,1,1)),l.add(B)}{const B=new I.DirectionalLight(16777215,.3);l.add(B)}{const B=new I.AmbientLight(16777215,.3);l.add(B)}l.add(d);const m=()=>{if(n)return;h=S(i.model,c.fov,c.aspect),u=i.model.bounding.getCenter(new I.Vector3),l.remove(d),d=W(i.model),l.add(d),n=!0,_();function B(q){const U=q.clone();return U.uniforms.modelAlpha.value=1,U.uniforms.map.value&&(U.uniforms.map.value.needsUpdate=!0),U}function W(q){if(q instanceof I.Mesh){const U=q.geometry,Z=Array.isArray(q.material)?q.material.map(B):B(q.material);return new I.Mesh(U,Z)}else if(q instanceof I.Group){const U=new I.Group;return q.children.forEach(Z=>U.add(W(Z))),U}else{const U=new I.Object3D;return q.children.forEach(Z=>U.add(W(Z))),U}}},v=()=>{if(i.renderer)return s||(s=new I.WebGLRenderer({antialias:!1,alpha:!0}),s.setPixelRatio(i.renderer.getPixelRatio()),s.outputEncoding=I.sRGBEncoding,s.setClearColor(1579548,0),s.autoClear=!0),s},g=()=>{d.traverse(B=>{B instanceof I.Mesh&&[].concat(B.material).forEach(q=>q.dispose())}),l.remove(d),d=new I.Object3D,l.add(d),n=!1,_()},A=()=>{e&&(n||m())},b=()=>{e||(e=!0,l.add(d),!n&&i.model.loaded&&m(),_())},y=()=>{e&&(l.remove(d),o=!0,M(),e=!1)},E=(B,W={})=>{const q=v();if(!q)return;B.appendChild(q.domElement),k(W);const U=window.getComputedStyle(B).position;U!=="relative"&&U!=="absolute"&&U!=="fixed"&&U!=="sticky"&&(B.style.position="relative")},k=(B={})=>{if(!s)return;const q=s.domElement.parentNode;if(q!=null&&q.nodeName){const{width:U=q.offsetWidth,height:Z=q.offsetHeight}=B;s.setSize(U,Z),c.aspect=U/Z,c.updateProjectionMatrix()}_()};function S(B,W,q){const U=B.bounding,Z=Math.pow(Math.pow(U.max.x-U.min.x+1,2)+Math.pow(U.max.y-U.min.y+1,2)+Math.pow(U.max.z-U.min.z+1,2),1/2);let re=Z/2/Math.tan(Math.PI*W/360);return q<1&&(re=re/q),isNaN(re)?Z:re}function C(B){return i.work.observers[B].standingPosition.clone()}const _=()=>{if(!e||!h||!u)return;const B=i.getPose();B.fov=c.fov,B.offset=u,B.distance=h,typeof a.lockedLatitude=="number"&&(B.latitude=a.lockedLatitude),typeof a.lockedLongitude=="number"&&(B.longitude=a.lockedLongitude),typeof a.lockedPanoIndex=="number"&&(B.offset=C(a.lockedPanoIndex)),a.lookAtCurrentCamera&&(B.offset=i.camera.position.clone().setY(i.camera.position.y+1)),c.setFromPose(B),o=!0},M=()=>{!e||o!==!0||!s||!s.domElement.parentNode||s.domElement.parentNode.offsetWidth===0||(s.render(l,c),o=!1)},X=()=>{s&&s.dispose(),s=null},J=B=>{Object.assign(a,B),_()},H=()=>({enabled:e});return Object.assign(window,{camera:c}),i.on("modelLoaded",A),i.on("modelWillLoad",g),i.on("cameraDirectionUpdate",_),i.on("dispose",X),i.on("renderFrame",M),i.on("cameraPositionUpdate",_),{appendTo:E,refresh:k,changeConfigs:J,enable:b,disable:y,getCurrentState:H}};function on(...i){const t=[];return i.forEach(e=>{e.isCSS3DObjectPlus?t.push(e):t.push(...on(...e.children))}),t}function Ho(i,t){const e=Math.round(i);return e%2===0?e:e+(t!=null&&t.floor?-1:1)}function Fu(i,t,e=!0){if(!i)return console.error("createResizeObserver: element is undefined"),{observe:()=>{},unobserve:()=>{}};const n=()=>{const s=Ho(i.clientWidth,{floor:!0}),r=Ho(i.clientHeight,{floor:!0});t(s,r)};if(typeof ResizeObserver=="undefined"||!ResizeObserver)return console.warn("createResizeObserver: ResizeObserver is undefined"),{observe:()=>n(),unobserve:()=>{}};const o=new ResizeObserver(n);return e&&n(),{observe:()=>o.observe(i),unobserve:()=>o.unobserve(i)}}class _a extends Qo.CSS3DRenderer{constructor(){super();f(this,"wrapper");f(this,"requestAnimationFrameId");f(this,"resizeDisoper");this.domElement.style.position="absolute",this.domElement.style.top="0",this.domElement.style.left="0",this.domElement.style.userSelect="none",this.domElement.style.pointerEvents="none"}setWrapper(e){if(!e)throw new Error("CSS3DRenderer: wrapper is required");if(e.contains(this.domElement))return;const n=this.wrapper;return n&&n.contains(this.domElement)&&this.domElement.remove(),this.appendToElement(e),this.wrapper=e,this}appendToElement(e){e.appendChild(this.domElement);const n=(r,a)=>this.setSize(r,a),{observe:o,unobserve:s}=Fu(e,n,!0);o(),this.resizeDisoper=s,this.wrapper=e}renderEveryFrame(e,n){if(this.wrapper||console.warn("wrapper is not find, creating a html element and call setWrapper(wrapper)",this,e),this.requestAnimationFrameId)return;const o=()=>{this.requestAnimationFrameId=requestAnimationFrame(o),e.visible&&on(e).length!==0&&this.render(e,n)};o()}stopRender(){this.requestAnimationFrameId&&cancelAnimationFrame(this.requestAnimationFrameId)}dispose(){var e;this.stopRender(),(e=this.resizeDisoper)==null||e.call(this),this.domElement.remove()}}function Wu(i){return typeof Symbol=="undefined"?`$Symbol<${i}>$`:Symbol(i)}const Gi=Wu("$$EVENT$$");function wo(i){return i[Gi]||(i[Gi]={}),i[Gi]}function Nu(i){i[Gi]||delete i[Gi]}class li{hasListener(t){const e=wo(this);return!!(e!=null&&e[t]&&e[t].length>0)}on(t,e,n){const o=wo(this);return o[t]||(o[t]=[]),o[t].push([e,n||!1]),()=>this.off(t,e)}once(t,e){return this.on(t,e,!0)}off(t,e){if(t===void 0){Nu(this);return}const n=wo(this);if(n[t]||(n[t]=[]),e===void 0){n[t].length=0;return}let o=0;for(;o<n[t].length&&n[t][o][0]!==e;o++);o<n[t].length&&n[t].splice(o,1)}emit(t,...e){let n=!1;const s=wo(this)[t]||[];for(let r of s.slice()){const[a,l=!1]=r,c=a(...e);l&&this.off(t,a),c===!1&&(n=!0)}return n}}const Xu=({x:i,y:t,z:e})=>new R.Vector3(i,t,e),xt=i=>new R.Vector3().fromArray(i),Ni=i=>i instanceof R.Vector3?i:Array.isArray(i)?xt(i):Xu(i);class Yu extends I.Mesh{constructor(e,n){const o=new I.MeshBasicMaterial({opacity:0,color:0,transparent:!1,side:I.DoubleSide}),s=new I.PlaneGeometry(e,n);super(s,o);f(this,"name","opacity-mesh")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}function xn(...i){const t=new R.Vector3;return i.forEach(e=>{t.add(e)}),t.divideScalar(i.length),t}const Id=1,Uu=`CSS3DObjectPlus@${Id}`,qu=.00216,Ju=.003;class Zu extends Qo.CSS3DObject{constructor(e){var S,C,_;const n=e.container,o=e.cornerPoints,s=(S=e.ratio)!=null?S:Ju,r=(C=e.dpr)!=null?C:1,a=(_=e.pointerEvents)!=null?_:"auto",l=Math.max(qu,s),c=o[0].distanceTo(o[1]),d=o[1].distanceTo(o[2]),h=Ho(c/s*r),u=Ho(d/s*r),m=xn(...o);let v;if(l===s)n.style.width=`${h}px`,n.style.height=`${u}px`,v=n;else{const M=document.createElement("div");M.style.width=`${h}px`,M.style.height=`${u}px`,M.style.pointerEvents="none";const X=s/l;n.style.position="absolute",n.style.left="0",n.style.top="0",n.style.width=`${X*h}px`,n.style.height=`${X*u}px`,M.appendChild(n),v=M}super(v);f(this,"version",Id);f(this,"isCSS3DObjectPlus",!0);f(this,"container");f(this,"width");f(this,"height");f(this,"domWidthPx");f(this,"domHeightPx");f(this,"cornerPoints");f(this,"centerPosition");f(this,"ratio");f(this,"mode","front");f(this,"hooks",new li);f(this,"opacityMesh");f(this,"selfVisible",!0);f(this,"parentVisibleListenerDisposer");f(this,"createOpacityMesh",e=>{const{domWidthPx:n,domHeightPx:o}=e,s=new Yu(n,o);return s.position.copy(e.position),s.rotation.copy(e.rotation),s.scale.copy(e.scale),s});f(this,"addParentVisibleListener",()=>{var e;if((e=this.parent)!=null&&e.isCSS3DGroup){const n=this.parent,o=s=>{this.setVisible(s&&this.selfVisible,{setSelfVisible:!1})};n.hooks.on("visibleChange",o),this.parentVisibleListenerDisposer=()=>n.hooks.off("visibleChange",o)}});f(this,"removeParentVisibleListener",()=>{var e;(e=this.parentVisibleListenerDisposer)==null||e.call(this)});if(n.style.pointerEvents=a,this.scale.set(l,l,l),this.cornerPoints=o,this.ratio=s,this.container=n,e.mode&&(this.mode=e.mode),l===s)this.width=c,this.height=d,this.domWidthPx=h,this.domHeightPx=u,this.centerPosition=m;else{const M=s/l;this.width=M*c,this.height=M*d,this.domWidthPx=M*h,this.domHeightPx=M*u,this.centerPosition=new R.Vector3().subVectors(m,o[0]).multiplyScalar(M).add(o[0])}n.classList.add(`${Uu}__container`);const g=new R.Vector3().subVectors(o[1],o[0]),A=new R.Vector3().subVectors(o[3],o[0]),b=new R.Vector3().crossVectors(g,A).normalize();this.lookAt(b);const y=this.up.clone().applyQuaternion(this.quaternion),E=A.clone(),k=new R.Vector3().crossVectors(y,E).normalize();this.rotateOnWorldAxis(k,y.angleTo(E)),this.position.copy(m),this.addEventListener("added",()=>{var M;this.mode==="front"&&((M=this.opacityMesh)==null||M.removeFromParent()),this.addParentVisibleListener()}),this.addEventListener("removed",()=>{var M;(M=this.opacityMesh)==null||M.removeFromParent(),this.removeParentVisibleListener()})}setVisible(e,n={setSelfVisible:!0}){n.setSelfVisible&&(this.selfVisible=e),this.visible=e,this.opacityMesh&&(this.opacityMesh.visible=e)}removeFromParent(){var n;const e=this.parent;return e!==null&&e.remove(this),(n=this.opacityMesh)==null||n.removeFromParent(),this}removeOpacityMesh(){var e;return(e=this.opacityMesh)==null||e.removeFromParent(),this.opacityMesh=void 0,this}dispose(){var e;this.container.remove(),this.removeFromParent(),(e=this.opacityMesh)==null||e.removeFromParent()}getOpacityMesh(){if(this.opacityMesh)return this.opacityMesh;{const e=this.createOpacityMesh(this);return this.opacityMesh=e,e}}applyMatrix4(e){var n;super.applyMatrix4(e),(n=this.opacityMesh)==null||n.applyMatrix4(e)}applyQuaternion(e){var n;return super.applyQuaternion(e),(n=this.opacityMesh)==null||n.applyQuaternion(e),this}applyScaleMatrix4(e){var n;this.scale.applyMatrix4(e),(n=this.opacityMesh)==null||n.scale.applyMatrix4(e)}}class Ku extends I.Scene{constructor(){super()}add(...t){return super.add(...t),on(...t).forEach(e=>{e.mode="front"}),this}}class $u extends I.Scene{constructor(e){super();f(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return super.add(...e),on(...e).forEach(n=>{n.mode="behind",this.scene.add(n.getOpacityMesh())}),this}remove(...e){return on(...e).forEach(n=>{var o;(o=n.opacityMesh)==null||o.removeFromParent(),n.opacityMesh=null}),super.remove(...e),this}}class kd extends I.Group{constructor(e){super();f(this,"isCSS3DGroup",!0);f(this,"mode");f(this,"CSS3DObjectLength",0);f(this,"hooks",new li);this.mode=e}add(...e){return on(...e).forEach(n=>{n.mode=this.mode}),super.add(...e),this.updateLength(),this}setVisible(e){this.visible=e,this.hooks.emit("visibleChange",e)}remove(...e){return super.remove(...e),this.updateLength(),this}updateLength(){this.CSS3DObjectLength=on(this).length}}class ef extends kd{constructor(){super("front")}}class tf extends kd{constructor(e){super("behind");f(this,"scene");if(!e)throw new Error("CSS3DBehindScene: scene is required");this.scene=e}add(...e){return on(...e).forEach(n=>{this.scene.add(n.getOpacityMesh())}),super.add(...e),this}}const nf=3,zr="CSS3DRenderer",Bi=`${zr}@${nf}`,Gn=()=>{console.error(`${Bi} is disposed`)},We={css3DObjects:[],frontModeStore:{css3DRenderer:new _a},behindModeStore:{css3DRenderer:new _a}};function Va(i){return We.css3DObjects.find(t=>t.id===i)}function of(i){We.frontModeStore.css3DRenderer.setWrapper(i)}function sf(i){We.behindModeStore.css3DRenderer.setWrapper(i)}class ti{constructor(t){f(this,"hooks",new li);f(this,"state",{enabled:!0,visible:!0,disposed:!1});f(this,"_scene");f(this,"store",{frontModeGroup:new ef});f(this,"create3DElement",(t,e,n)=>{if(this.state.disposed)return Gn();const o=(()=>{const k={ratio:.00216,devicePixelRatio:1,mode:"front",autoRender:!0,container:document.createElement("div"),pointerEvents:"none"};return Object.assign(k,n)})(),s=e.map(Ni);if((s==null?void 0:s.length)<4)return console.error(`${Bi}: requires 4 point but params may have fewer`);const{ratio:r,devicePixelRatio:a,mode:l,autoRender:c,container:d,pointerEvents:h}=o;let u=!1;const m=this.createObject(s,{ratio:r,dpr:a,container:d,mode:l,pointerEvents:h});We.css3DObjects.push(m),o.scene&&this.setScene(o.scene);const v=()=>{if(u)return;const k=m.mode==="front"?this.getFrontCSS3DObjectGroup():this.getBehindCSS3DObjectGroup();k&&k.add(m)},g=()=>{u||(v(),this.render(t),this.hooks.emit("render"))},A=k=>this.setVisibleById(m.id,k),b=k=>this.setEnabledById(m.id,k),y=()=>(u=!0,m.removeFromParent(),!0),E=l==="front"?We.frontModeStore.css3DRenderer:We.behindModeStore.css3DRenderer;return c&&g(),{id:m.uuid,container:d,css3DObject:m,render:c?void 0:g,show:()=>A(!0),hide:()=>A(!1),setVisible:A,enable:()=>b(!0),disable:()=>b(!1),setEnabled:b,dispose:y,appendToElement:k=>E.setWrapper(k)}});f(this,"setVisibleById",(t,e)=>{var n;(n=Va(t))==null||n.setVisible(e)});f(this,"setEnabledById",(t,e)=>{const n=Va(t);if(!n)return;const o=n.mode==="front"?this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}):this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1});o&&(e?o.add(n):o.remove(n))});f(this,"createObject",(t,e)=>{const n=new Zu(F({cornerPoints:t},e));return n.element.classList.add(`${zr}__container`),n.element.id=`${zr}__container--${n.uuid}`,n});t&&this.setScene(t)}get scene(){return this._scene||console.error("scene doesn't exist!, please call setScene(scene) first"),this._scene}static get frontModeCSS3DRenderer(){return We.frontModeStore.css3DRenderer}static get behindModeCSS3DRenderer(){return We.behindModeStore.css3DRenderer}get frontModeCSS3DRenderer(){return We.frontModeStore.css3DRenderer}get behindModeCSS3DRenderer(){return We.behindModeStore.css3DRenderer}setScene(t){this._scene=t}getCurrentState(){return this.state}setState(t,e={userAction:!0}){if(this.state.disposed)return Gn();const n=F({},this.state);this.state=Object.assign(this.state,t),n.visible!==this.state.visible&&(t.visible?this.handleShow():this.handleHide()),n.enabled!==this.state.enabled&&(t.enabled?this.handleEnable():this.handleDisable()),n.disposed!==this.state.disposed&&this.handleDispose(),this.hooks.emit("stateChange",{state:this.state,prevState:n,userAction:e.userAction})}dispose(){this.setState({disposed:!0}),this.hooks.emit("dispose")}show(){return Y(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Gn();this.setState({visible:!0},{userAction:t}),this.hooks.emit("show",{userAction:t})})}hide(){return Y(this,arguments,function*({userAction:t}={userAction:!0}){if(this.state.disposed)return Gn();this.setState({visible:!1},{userAction:t}),this.hooks.emit("hide",{userAction:t})})}enable({userAction:t}={userAction:!0}){if(this.state.disposed)return Gn();this.setState({enabled:!0},{userAction:t}),this.hooks.emit("enable",{userAction:t})}disable({userAction:t}={userAction:!0}){if(this.state.disposed)return Gn();this.setState({enabled:!1},{userAction:t}),this.hooks.emit("disable",{userAction:t})}getFrontCSS3DScene({createSceneIfNotExists:t=!1}={}){var n;const e=(n=We.frontModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const o=new Ku;We.frontModeStore.css3DScene=o}return We.frontModeStore.css3DScene}getBehindCSS3DScene({createSceneIfNotExists:t=!1}={}){var n,o;const e=(n=We.behindModeStore)==null?void 0:n.css3DScene;if(e)return e;if(t){const s=(o=We.behindModeStore.scene)!=null?o:this.scene;if(!s){console.error(`${Bi}: scene is required when mode is behind`);return}const r=new $u(s);We.behindModeStore.css3DScene=r,We.behindModeStore.scene=s}return We.behindModeStore.css3DScene}getFrontCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){const e=this.getFrontCSS3DScene({createSceneIfNotExists:t});return t&&e&&(e.getObjectById(this.store.frontModeGroup.id)||e.add(this.store.frontModeGroup)),this.store.frontModeGroup}getBehindCSS3DObjectGroup({addGroupIfNotExists:t=!0}={}){var n;const e=this.getBehindCSS3DScene({createSceneIfNotExists:t});if(t&&e&&this.scene){const o=(n=this.store.behindModeGroup)!=null?n:new tf(this.scene);this.store.behindModeGroup=o,e.getObjectById(o.id)||e.add(o)}return this.store.behindModeGroup}render(t){var e,n;if(this.getFrontCSS3DObjectGroup({addGroupIfNotExists:!1}).CSS3DObjectLength>0){const o=this.getFrontCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${Bi}: css3DScene is required when mode is front`);We.frontModeStore.css3DRenderer.renderEveryFrame(o,t)}if(((n=(e=this.getBehindCSS3DObjectGroup({addGroupIfNotExists:!1}))==null?void 0:e.CSS3DObjectLength)!=null?n:0)>0){const o=this.getBehindCSS3DScene({createSceneIfNotExists:!0});if(!o)return console.error(`${Bi}: css3DScene is required when mode is behind`);We.behindModeStore.css3DRenderer.renderEveryFrame(o,t)}}handleShow(){return Y(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!0),(t=this.store.behindModeGroup)==null||t.setVisible(!0)})}handleHide(){return Y(this,null,function*(){var t;this.store.frontModeGroup.setVisible(!1),(t=this.store.behindModeGroup)==null||t.setVisible(!1)})}handleEnable(){var t,e;(t=this.getFrontCSS3DScene())==null||t.add(this.store.frontModeGroup),this.store.behindModeGroup&&((e=this.getBehindCSS3DScene())==null||e.add(this.store.behindModeGroup))}handleDisable(){var t,e,n;this.store.frontModeGroup.children.forEach(o=>{o instanceof Qo.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.remove()}),(t=this.store.behindModeGroup)==null||t.children.forEach(o=>{o instanceof Qo.CSS3DObject&&o.element instanceof Element&&o.element.parentNode!==null&&o.element.remove()}),(e=this.getFrontCSS3DScene())==null||e.remove(this.store.frontModeGroup),this.store.behindModeGroup&&((n=this.getBehindCSS3DScene())==null||n.remove(this.store.behindModeGroup))}handleDispose(){this.handleDisable()}}f(ti,"setFrontModeContainer",of),f(ti,"setBehindModeContainer",sf);function xd(i){return Y(this,null,function*(){return new Promise(t=>{var e;if((e=i.model)!=null&&e.loaded){t();return}else i.once("modelLoaded",()=>t())})})}const It=document.createElement("div");It.classList.add("behindFiveElement");It.style.position="absolute";It.style.top="0";It.style.left="0";It.style.width="100%";It.style.height="100%";It.style.pointerEvents="none";function Dd(i){var n,o,s,r,a;const t=(a=(o=cr(i.getElement()))!=null?o:cr((n=i.getElement())==null?void 0:n.parentElement))!=null?a:cr((r=(s=i.getElement())==null?void 0:s.parentElement)==null?void 0:r.parentElement),e=t==null?void 0:t.parentElement;if(e)return e.contains(It)||t.parentElement.insertBefore(It,t),It;console.error("Can not find a valid element to insert behindFiveElement. How to fix it: https://github.com/realsee-developer/dnalogel/tree/main/plugins/src/CSS3DRenderPlugin/README.md")}function cr(i){var a;if(!i)return;const t=(a=i.style.position)!=null?a:getComputedStyle(i).position;if(t!=="fixed"&&t!=="absolute"&&t!=="relative")return;const e=getComputedStyle(i),n=e.backgroundColor,o=e.backgroundImage;if(!(n!=="transparent"&&n!=="rgba(0, 0, 0, 0)"&&n!==""||o!=="none"&&o!==""))return i}class _r{constructor(t=0,e=0){f(this,"min");f(this,"max");f(this,"isInterval",!0);this.min=t,this.max=e}fromArray(t){return this.min=t[0],this.max=t[1],this}isOverlap(t){return Math.min(this.max,t.max)<Math.max(this.min,t.min)}contains(t){return this.min<t.min&&this.max>t.max}}class rf{constructor(t,e){f(this,"min");f(this,"max");f(this,"xInterval");f(this,"yInterval");f(this,"isRectangle",!0);this.min=t,this.max=e,this.xInterval=new _r(this.min.x,this.max.x),this.yInterval=new _r(this.min.y,this.max.y)}isOverlapWithRectangle(t){return!this.xInterval.isOverlap(t.xInterval)&&!this.yInterval.isOverlap(t.yInterval)}containsRect(t){return this.xInterval.contains(t.xInterval)&&this.yInterval.contains(t.yInterval)}}function ta(i){return i==="Panorama"||i==="DepthPanorama"||i==="VRPanorama"||i==="XRPanorama"}function Md(i){return!ta(i)}function Po(i,t,e){const n=i[t],o=i[e];!n||!o||(i[t]=o,i[e]=n)}function af(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Po(i,a*4+0,l*4+0),Po(i,a*4+1,l*4+1),Po(i,a*4+2,l*4+2),Po(i,a*4+3,l*4+3)}}}let Sd=class{constructor(t,e){f(this,"width");f(this,"height");f(this,"containerDom");f(this,"hooks",new ze.Subscribe);f(this,"canvas",document.createElement("canvas"));f(this,"five");f(this,"scale");f(this,"config");f(this,"offset",{x:0,y:0});f(this,"context");f(this,"renderCenter",new I.Vector3);f(this,"hammer");f(this,"state",{enabled:!1});f(this,"onPan",t=>{if(!this.containerDom||this.hooks.emit("wantsPanGesture",t))return;const n=this.offset.x+t.deltaX,o=this.offset.y+t.deltaY;this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)",this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});f(this,"onPanEnd",t=>{this.offset={x:this.offset.x+t.deltaX,y:this.offset.y+t.deltaY},this.canvas.style.boxShadow="none"});var o,s,r;if(!t.renderer)throw new Error("Five Render 未初始化");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new Ki(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panend",this.onPanEnd)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){var t;if(!this.state.enabled)return this.state.enabled=!0,(t=this.containerDom)==null||t.append(this.canvas),this}disable(){if(this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){var e;return this.containerDom&&((e=this.containerDom)==null||e.removeChild(this.canvas)),this.containerDom=t,this.state.enabled&&t.append(this.canvas),this}clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,n=this.renderCenter.clone().project(this.five.camera),o=(n.x+1)/2*this.containerDom.clientWidth,s=-(n.x-1)/2*this.containerDom.clientWidth,r=-(n.y-1)/2*this.containerDom.clientHeight;o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):r<183?(this.canvas.style.top="90px",this.canvas.style.left=-t/2+"px"):s<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${o}px, ${r}px, 10px)`,this.offset={x:o,y:r}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.renderCenter.clone().project(this.five.camera),r=this.five.renderer.getSize(new I.Vector2),a=1,l=n/t,c=o/t,d=a*t,h=(s.x+1)/2*r.x,u=(s.y+1)/2*r.y,m=this.five.getPixels(h-l/2,u-l/2,l,c,d),v=Math.floor(n*a),g=Math.floor(o*a);af(m,v,g);const A=new ImageData(v,g);A.data.set(m),e.putImageData(A,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}};function lf(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return new I.Vector2().set((i.x-s)/e*2-1,-(i.y-o)/n*2+1)}function Ld(i,t){const{offsetWidth:e,offsetHeight:n}=t;return new I.Vector2().set(i.x/e*2-1,-i.y/n*2+1)}function cf(i,t){const e=i.getElement();if(!e)return;const n=Ld(t,e),o=new I.Raycaster;return o.setFromCamera(n,i.camera),o}function df(i,t){const{x:e,y:n}=t,o=e*2-1,s=n*2-1,r=new I.Vector2().fromArray([o,s]),a=new I.Raycaster;return a.setFromCamera(r,i.camera),i.model.intersectRaycaster(a)[0]}const hf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA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KQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",uf=`
102
102
  varying vec2 vUv;
103
103
  void main() {
104
104
  vUv = uv;
@@ -174,15 +174,15 @@ void main() {
174
174
  <div class='range-piece__content'></div>
175
175
  <div class="range-piece__aim"></div>
176
176
  </div>
177
- `;class jd{constructor(t){f(this,"five");f(this,"contentElement",document.createElement("div"));f(this,"animeIns");f(this,"container");f(this,"css3DObject");f(this,"disposeCss3DObject");f(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=as(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new I.Vector3().fromArray(r)));if(s){const{container:r,dispose:a,css3DObject:l}=s;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${zd})`,this.contentElement.style.backgroundSize="100%",this.contentElement.style.backgroundRepeat="no-repeat"}enable(){var t;this.state.enabled||(this.state.enabled=!0,(t=this.container)==null||t.appendChild(this.contentElement))}disable(){this.state.enabled&&(this.state.enabled=!1,this.contentElement.remove())}updateWithIntersect(t){if(!t.face||!this.css3DObject)return;const e=new I.Vector3().addVectors(t.point,t.face.normal);this.css3DObject.position.copy(t.point),this.css3DObject.lookAt(e),this.five.needsRender=!0}doAnimation(){var t;(t=this.animeIns)==null||t.dispose(),new os({progress:0}).to({progress:[1,0]}).duration(500).easing(kt.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class bf{constructor(t,e){f(this,"five");f(this,"hooks",new ze.Subscribe);f(this,"magnifier",null);f(this,"pointHelper",null);f(this,"pointDomHelper",null);f(this,"contentDom",document.createElement("div"));f(this,"state",{enabled:!1});f(this,"group",new I.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new Sd(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new Td:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new jd(t):null,this.group.name="five-point-selector",this.five.scene.add(this.group),this.contentDom.classList.add("five-point-selector-content"),this.contentDom.style.position="absolute",this.contentDom.style.top="0",this.contentDom.style.left="0",this.contentDom.style.width="100%",this.contentDom.style.height="100%",this.contentDom.style.pointerEvents="none"}enable(){var t,e;this.state.enabled||(this.state.enabled=!0,this.pointHelper&&this.group.add(this.pointHelper),(t=this.magnifier)==null||t.enable(),(e=this.pointDomHelper)==null||e.enable(),this.five.needsRender=!0,this.hooks.emit("enabled"))}disable(){var t,e;this.state.enabled&&(this.state.enabled=!1,this.pointHelper&&this.group.remove(this.pointHelper),(t=this.magnifier)==null||t.disable(),(e=this.pointDomHelper)==null||e.disable(),this.hooks.emit("disabled"))}dispose(){this.hooks.off(),this.disable(),this.magnifier=null,this.pointHelper=null,this.pointDomHelper=null}updateWithIntersect(t){var s;this.hooks.emit("pointChanged",{panoIndex:this.five.getCurrentState().panoIndex,position:t.point.toArray(),normal:(s=t.face)==null?void 0:s.normal.toArray()});const e=this.magnifier;e&&e.renderWithPoint(t.point);const n=this.pointHelper;n&&n.updateWithIntersect(t);const o=this.pointDomHelper;o&&o.updateWithIntersect(t),this.five.needsRender=!0}}function yf(i){return!ci(i)}function ci(i){return i!=null}function na(i){return i.indexOf("//")===0||/^[0-9a-z]+\:\/\//i.test(i)}class os extends is{constructor(){super(...arguments);f(this,"disposeMethods",[]);f(this,"animationFrameDisposer");f(this,"onDispose",e=>(this.disposeMethods.push(e),this));f(this,"play",()=>{var e;return this.start(0),(e=this.animationFrameDisposer)==null||e.call(this),this.animationFrameDisposer=$i(n=>this.update(n)),this});f(this,"stop",()=>{var e;return super.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this});f(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],Ed(this)})}}function ss(i,t=kt.Linear.None){const e=new os({progress:0}).to({progress:1});return i!==void 0&&e.duration(i),t!==void 0&&e.easing(t),e}const Xi=window.requestAnimationFrame||(i=>setTimeout(i,16)),wf=window.cancelAnimationFrame||clearTimeout;function rs(i,t=0){t<=0?Xi(i):Xi(()=>rs(i,t-1))}function $i(i,t=60){let e=-1,n=0,o=-1;const s=1e3/t;function r(a){o===-1&&(o=a),e=Xi(r),!(a-n<s)&&(n=a,i==null||i(a-o))}return e=Xi(r),function(){wf(e)}}function Pf(){const i=Date.now();return new Promise(t=>{Xi(()=>{t(Date.now()-i)})})}const Cf=Object.freeze(Object.defineProperty({__proto__:null,BetterTween:os,FivePointSelector:bf,Interval:jr,Magnifier:Sd,PointDomHelper:jd,PointHelper:Td,Rectangle:rf,getCoordsFromClient:lf,getCoordsFromElement:Ld,getFrameTime:Pf,getIntersectFromRelativePosition:df,getRaycasterFromFivePointer:cf,isAbsoluteURL:na,isModelLike:Md,isNil:yf,isPanoramaLike:ta,nextFrame:rs,notNil:ci,requestAnimationFrameInterval:$i,tweenProgress:ss,uuid:dt},Symbol.toStringTag,{value:"Module"})),_d="v2.0.1",dr=`CSS3DRenderPlugin@${_d}`;let Ef=class extends ti{constructor(e){super();f(this,"five");f(this,"behindFiveContainer");f(this,"VERSION",_d);f(this,"staticPrefix","//vrlab-static.ljcdn.com");f(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var h;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${dr}: please use "config.devicePixelRatio" replace "config.dpr"`);const d={ratio:.00216,devicePixelRatio:(h=n==null?void 0:n.dpr)!=null?h:1,mode:"front",autoRender:!0};return Object.assign(d,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${dr}: five.getElement() is ${s}`);return}const{autoRender:r}=o;o.mode==="behind"&&o.behindFiveContainer&&(this.behindFiveContainer=o.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,ye(F({},o),{autoRender:!1}));if(!a)return;const l=()=>{const d=a.css3DObject.mode==="front"?s.parentElement:this.getBehindFiveElement();if(!d)return console.error(`${dr}: wrapper is ${d}`);a.appendToElement(d),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&xd(this.five).then(()=>l())};return r&&c(),ye(F({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=Dd(this.five),this.behindFiveContainer)}isAbsoluteURL(e){return na(e)?e:`${this.staticPrefix}${e}`}};const ia=i=>new Ef(i),as=ia;function hr(i,t,e=new R.Vector3(1,1,1),n=!1){const o=new yd.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const If=i=>{const t={intersection:null,disposers:[]},e=d=>{t.intersection=d},n=()=>{t.intersection=null};i.on("modelLoaded",()=>{i.on("intersectionOnModelUpdate",e),i.on("intersectionHidden",n)}),i.on("dispose",()=>{i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)});const o=(d,h=2,u=.1)=>{const m=h/2,g=c(d,u),A=new R.Group;A.add(hr(new R.Vector3(g.x+m,g.y,g.z),new R.Vector3(g.x-m,g.y,g.z),new R.Vector3(1,0,0)),hr(new R.Vector3(g.x,g.y+m,g.z),new R.Vector3(g.x,g.y-m,g.z),new R.Vector3(0,1,0)),hr(new R.Vector3(g.x,g.y,g.z+m),new R.Vector3(g.x,g.y,g.z-m),new R.Vector3(0,0,1))),i.scene.add(A),i.needsRender=!0;const b=()=>{i.scene.remove(A)};return t.disposers.push(b),{clear:b,pointAxesHelperMesh:A}},s=(d,h=0)=>{var b,y;const u=(b=i==null?void 0:i.camera)==null?void 0:b.position;if(!u)return!1;const m=d.distanceTo(u),v=d.sub(u).normalize(),g=new R.Raycaster(u,v),A=(y=i.model.intersectRaycaster(g))==null?void 0:y[0];return!(A&&A.distance+h<m)},r=()=>t.intersection,a=()=>{var d,h;(h=(d=t.disposers)==null?void 0:d.forEach)==null||h.call(d,u=>u==null?void 0:u()),i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)},l=a,c=(d,h)=>{const u=d.clone();return i.camera.position.clone().sub(u).setLength(h).add(u)};return{intersection:r,pointAxesHelper:o,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:s}};function K(){}const sn=i=>i;function Ze(i,t){for(const e in t)i[e]=t[e];return i}function kf(i){return!!i&&(typeof i=="object"||typeof i=="function")&&typeof i.then=="function"}function Vd(i){return i()}function Va(){return Object.create(null)}function rt(i){i.forEach(Vd)}function di(i){return typeof i=="function"}function ae(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Co;function wt(i,t){return Co||(Co=document.createElement("a")),Co.href=t,i===Co.href}function xf(i){return Object.keys(i).length===0}function hi(i,t,e,n){if(i){const o=Od(i,t,e,n);return i[0](o)}}function Od(i,t,e,n){return i[1]&&n?Ze(e.ctx.slice(),i[1](n(t))):e.ctx}function ui(i,t,e,n){if(i[2]&&n){const o=i[2](n(e));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let a=0;a<r;a+=1)s[a]=t.dirty[a]|o[a];return s}return t.dirty|o}return t.dirty}function fi(i,t,e,n,o,s){if(o){const r=Od(t,e,n,s);i.p(r,o)}}function mi(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function Be(i){return i==null?"":i}function Ut(i){return i&&di(i.destroy)?i.destroy:K}function Oa(i){const t=typeof i=="string"&&i.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[i,"px"]}const Bd=typeof window!="undefined";let Rd=Bd?()=>window.performance.now():()=>Date.now(),oa=Bd?i=>requestAnimationFrame(i):K;const Zn=new Set;function Qd(i){Zn.forEach(t=>{t.c(i)||(Zn.delete(t),t.f())}),Zn.size!==0&&oa(Qd)}function Hd(i){let t;return Zn.size===0&&oa(Qd),{promise:new Promise(e=>{Zn.add(t={c:i,f:e})}),abort(){Zn.delete(t)}}}function O(i,t){i.appendChild(t)}function fe(i,t,e){const n=sa(i);if(!n.getElementById(t)){const o=z("style");o.id=t,o.textContent=e,Gd(n,o)}}function sa(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function Df(i){const t=z("style");return Gd(sa(i),t),t.sheet}function Gd(i,t){return O(i.head||i,t),t.sheet}function V(i,t,e){i.insertBefore(t,e||null)}function _(i){i.parentNode&&i.parentNode.removeChild(i)}function qt(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function z(i){return document.createElement(i)}function Te(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function je(i){return document.createTextNode(i)}function ne(){return je(" ")}function Ee(){return je("")}function Ce(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function Fd(i){return function(t){return t.stopPropagation(),i.call(this,t)}}function w(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function Mf(i){return Array.from(i.childNodes)}function Oe(i,t){t=""+t,i.data!==t&&(i.data=t)}function T(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let Eo;function Sf(){if(Eo===void 0){Eo=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){Eo=!0}}return Eo}function ls(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=z("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const o=Sf();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=Ce(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Ce(n.contentWindow,"resize",t),t()}),O(i,n),()=>{(o||s&&n.contentWindow)&&s(),_(n)}}function $(i,t,e){i.classList[e?"add":"remove"](t)}function Wd(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class Go{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=Te(e.nodeName):this.e=z(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)V(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(_)}}const Fo=new Map;let Wo=0;function Lf(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function Tf(i,t){const e={stylesheet:Df(t),rules:{}};return Fo.set(i,e),e}function Nd(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
177
+ `;class _d{constructor(t){f(this,"five");f(this,"contentElement",document.createElement("div"));f(this,"animeIns");f(this,"container");f(this,"css3DObject");f(this,"disposeCss3DObject");f(this,"state",{enabled:!1});this.five=t;const n=.4/2,s=as(t).create3DDomContainer([[-n,n,0],[-n,-n,0],[n,-n,0],[n,n,0]].map(r=>new I.Vector3().fromArray(r)));if(s){const{container:r,dispose:a,css3DObject:l}=s;this.container=r,this.css3DObject=l,this.disposeCss3DObject=a}this.contentElement.style.width="100%",this.contentElement.style.height="100%",this.contentElement.style.backgroundImage=`url(${zd})`,this.contentElement.style.backgroundSize="100%",this.contentElement.style.backgroundRepeat="no-repeat"}enable(){var t;this.state.enabled||(this.state.enabled=!0,(t=this.container)==null||t.appendChild(this.contentElement))}disable(){this.state.enabled&&(this.state.enabled=!1,this.contentElement.remove())}updateWithIntersect(t){if(!t.face||!this.css3DObject)return;const e=new I.Vector3().addVectors(t.point,t.face.normal);this.css3DObject.position.copy(t.point),this.css3DObject.lookAt(e),this.five.needsRender=!0}doAnimation(){var t;(t=this.animeIns)==null||t.dispose(),new os({progress:0}).to({progress:[1,0]}).duration(500).easing(kt.Quadratic.InOut).onUpdate(({progress:e})=>{}).play()}dispose(){var t;(t=this.disposeCss3DObject)==null||t.call(this)}}class bf{constructor(t,e){f(this,"five");f(this,"hooks",new ze.Subscribe);f(this,"magnifier",null);f(this,"pointHelper",null);f(this,"pointDomHelper",null);f(this,"contentDom",document.createElement("div"));f(this,"state",{enabled:!1});f(this,"group",new I.Group);this.five=t,this.magnifier=(e==null?void 0:e.magnifier)===void 0?new Sd(t,{dragEnabled:!0}):null,this.pointHelper=(e==null?void 0:e.pointHelper)===void 0?new Td:null,this.pointDomHelper=(e==null?void 0:e.pointDomHelper)===void 0?new _d(t):null,this.group.name="five-point-selector",this.five.scene.add(this.group),this.contentDom.classList.add("five-point-selector-content"),this.contentDom.style.position="absolute",this.contentDom.style.top="0",this.contentDom.style.left="0",this.contentDom.style.width="100%",this.contentDom.style.height="100%",this.contentDom.style.pointerEvents="none"}enable(){var t,e;this.state.enabled||(this.state.enabled=!0,this.pointHelper&&this.group.add(this.pointHelper),(t=this.magnifier)==null||t.enable(),(e=this.pointDomHelper)==null||e.enable(),this.five.needsRender=!0,this.hooks.emit("enabled"))}disable(){var t,e;this.state.enabled&&(this.state.enabled=!1,this.pointHelper&&this.group.remove(this.pointHelper),(t=this.magnifier)==null||t.disable(),(e=this.pointDomHelper)==null||e.disable(),this.hooks.emit("disabled"))}dispose(){this.hooks.off(),this.disable(),this.magnifier=null,this.pointHelper=null,this.pointDomHelper=null}updateWithIntersect(t){var s;this.hooks.emit("pointChanged",{panoIndex:this.five.getCurrentState().panoIndex,position:t.point.toArray(),normal:(s=t.face)==null?void 0:s.normal.toArray()});const e=this.magnifier;e&&e.renderWithPoint(t.point);const n=this.pointHelper;n&&n.updateWithIntersect(t);const o=this.pointDomHelper;o&&o.updateWithIntersect(t),this.five.needsRender=!0}}function yf(i){return!ci(i)}function ci(i){return i!=null}function na(i){return i.indexOf("//")===0||/^[0-9a-z]+\:\/\//i.test(i)}class os extends is{constructor(){super(...arguments);f(this,"disposeMethods",[]);f(this,"animationFrameDisposer");f(this,"onDispose",e=>(this.disposeMethods.push(e),this));f(this,"play",()=>{var e;return this.start(0),(e=this.animationFrameDisposer)==null||e.call(this),this.animationFrameDisposer=$i(n=>this.update(n)),this});f(this,"stop",()=>{var e;return super.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this});f(this,"dispose",()=>{var e;this.stop(),(e=this.animationFrameDisposer)==null||e.call(this),this.disposeMethods.forEach(n=>n()),this.disposeMethods=[],Ed(this)})}}function ss(i,t=kt.Linear.None){const e=new os({progress:0}).to({progress:1});return i!==void 0&&e.duration(i),t!==void 0&&e.easing(t),e}const Xi=window.requestAnimationFrame||(i=>setTimeout(i,16)),wf=window.cancelAnimationFrame||clearTimeout;function rs(i,t=0){t<=0?Xi(i):Xi(()=>rs(i,t-1))}function $i(i,t=60){let e=-1,n=0,o=-1;const s=1e3/t;function r(a){o===-1&&(o=a),e=Xi(r),!(a-n<s)&&(n=a,i==null||i(a-o))}return e=Xi(r),function(){wf(e)}}function Pf(){const i=Date.now();return new Promise(t=>{Xi(()=>{t(Date.now()-i)})})}const Cf=Object.freeze(Object.defineProperty({__proto__:null,BetterTween:os,FivePointSelector:bf,Interval:_r,Magnifier:Sd,PointDomHelper:_d,PointHelper:Td,Rectangle:rf,getCoordsFromClient:lf,getCoordsFromElement:Ld,getFrameTime:Pf,getIntersectFromRelativePosition:df,getRaycasterFromFivePointer:cf,isAbsoluteURL:na,isModelLike:Md,isNil:yf,isPanoramaLike:ta,nextFrame:rs,notNil:ci,requestAnimationFrameInterval:$i,tweenProgress:ss,uuid:dt},Symbol.toStringTag,{value:"Module"})),Vd="v2.0.1",dr=`CSS3DRenderPlugin@${Vd}`;let Ef=class extends ti{constructor(e){super();f(this,"five");f(this,"behindFiveContainer");f(this,"VERSION",Vd);f(this,"staticPrefix","//vrlab-static.ljcdn.com");f(this,"create3DDomContainer",(e,n)=>{if(this.state.disposed)return;const o=(()=>{var h;(n==null?void 0:n.dpr)!==void 0&&console.warn(`${dr}: please use "config.devicePixelRatio" replace "config.dpr"`);const d={ratio:.00216,devicePixelRatio:(h=n==null?void 0:n.dpr)!=null?h:1,mode:"front",autoRender:!0};return Object.assign(d,n,(n==null?void 0:n.mode)==="behind"?{scene:this.five.scene}:void 0)})(),s=this.five.getElement();if(!s){console.error(`${dr}: five.getElement() is ${s}`);return}const{autoRender:r}=o;o.mode==="behind"&&o.behindFiveContainer&&(this.behindFiveContainer=o.behindFiveContainer);const a=this.create3DElement(this.five.camera,e,ye(F({},o),{autoRender:!1}));if(!a)return;const l=()=>{const d=a.css3DObject.mode==="front"?s.parentElement:this.getBehindFiveElement();if(!d)return console.error(`${dr}: wrapper is ${d}`);a.appendToElement(d),a.render()},c=()=>{a.css3DObject.mode==="front"&&l(),a.css3DObject.mode==="behind"&&xd(this.five).then(()=>l())};return r&&c(),ye(F({},a),{render:r?void 0:c})});this.five=e}disposeAll(){return this.dispose()}setState(...e){const n=super.setState(...e);return this.five.needsRender=!0,n}getBehindFiveElement(){return this.behindFiveContainer?this.behindFiveContainer:(this.behindFiveContainer=Dd(this.five),this.behindFiveContainer)}isAbsoluteURL(e){return na(e)?e:`${this.staticPrefix}${e}`}};const ia=i=>new Ef(i),as=ia;function hr(i,t,e=new R.Vector3(1,1,1),n=!1){const o=new yd.Line(i,t);return o.setMaterial({dashed:n,color:e,linewidth:1}),o.remove(o.points),o}const If=i=>{const t={intersection:null,disposers:[]},e=d=>{t.intersection=d},n=()=>{t.intersection=null};i.on("modelLoaded",()=>{i.on("intersectionOnModelUpdate",e),i.on("intersectionHidden",n)}),i.on("dispose",()=>{i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)});const o=(d,h=2,u=.1)=>{const m=h/2,g=c(d,u),A=new R.Group;A.add(hr(new R.Vector3(g.x+m,g.y,g.z),new R.Vector3(g.x-m,g.y,g.z),new R.Vector3(1,0,0)),hr(new R.Vector3(g.x,g.y+m,g.z),new R.Vector3(g.x,g.y-m,g.z),new R.Vector3(0,1,0)),hr(new R.Vector3(g.x,g.y,g.z+m),new R.Vector3(g.x,g.y,g.z-m),new R.Vector3(0,0,1))),i.scene.add(A),i.needsRender=!0;const b=()=>{i.scene.remove(A)};return t.disposers.push(b),{clear:b,pointAxesHelperMesh:A}},s=(d,h=0)=>{var b,y;const u=(b=i==null?void 0:i.camera)==null?void 0:b.position;if(!u)return!1;const m=d.distanceTo(u),v=d.sub(u).normalize(),g=new R.Raycaster(u,v),A=(y=i.model.intersectRaycaster(g))==null?void 0:y[0];return!(A&&A.distance+h<m)},r=()=>t.intersection,a=()=>{var d,h;(h=(d=t.disposers)==null?void 0:d.forEach)==null||h.call(d,u=>u==null?void 0:u()),i.off("intersectionOnModelUpdate",e),i.off("intersectionHidden",n)},l=a,c=(d,h)=>{const u=d.clone();return i.camera.position.clone().sub(u).setLength(h).add(u)};return{intersection:r,pointAxesHelper:o,movePointTowardsCamera:c,destroy:a,dispose:l,canSeePoint:s}};function K(){}const sn=i=>i;function Ze(i,t){for(const e in t)i[e]=t[e];return i}function kf(i){return!!i&&(typeof i=="object"||typeof i=="function")&&typeof i.then=="function"}function jd(i){return i()}function ja(){return Object.create(null)}function rt(i){i.forEach(jd)}function di(i){return typeof i=="function"}function ae(i,t){return i!=i?t==t:i!==t||i&&typeof i=="object"||typeof i=="function"}let Co;function wt(i,t){return Co||(Co=document.createElement("a")),Co.href=t,i===Co.href}function xf(i){return Object.keys(i).length===0}function hi(i,t,e,n){if(i){const o=Od(i,t,e,n);return i[0](o)}}function Od(i,t,e,n){return i[1]&&n?Ze(e.ctx.slice(),i[1](n(t))):e.ctx}function ui(i,t,e,n){if(i[2]&&n){const o=i[2](n(e));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let a=0;a<r;a+=1)s[a]=t.dirty[a]|o[a];return s}return t.dirty|o}return t.dirty}function fi(i,t,e,n,o,s){if(o){const r=Od(t,e,n,s);i.p(r,o)}}function mi(i){if(i.ctx.length>32){const t=[],e=i.ctx.length/32;for(let n=0;n<e;n++)t[n]=-1;return t}return-1}function Be(i){return i==null?"":i}function Ut(i){return i&&di(i.destroy)?i.destroy:K}function Oa(i){const t=typeof i=="string"&&i.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[i,"px"]}const Bd=typeof window!="undefined";let Rd=Bd?()=>window.performance.now():()=>Date.now(),oa=Bd?i=>requestAnimationFrame(i):K;const Zn=new Set;function Qd(i){Zn.forEach(t=>{t.c(i)||(Zn.delete(t),t.f())}),Zn.size!==0&&oa(Qd)}function Hd(i){let t;return Zn.size===0&&oa(Qd),{promise:new Promise(e=>{Zn.add(t={c:i,f:e})}),abort(){Zn.delete(t)}}}function O(i,t){i.appendChild(t)}function fe(i,t,e){const n=sa(i);if(!n.getElementById(t)){const o=z("style");o.id=t,o.textContent=e,Gd(n,o)}}function sa(i){if(!i)return document;const t=i.getRootNode?i.getRootNode():i.ownerDocument;return t&&t.host?t:i.ownerDocument}function Df(i){const t=z("style");return Gd(sa(i),t),t.sheet}function Gd(i,t){return O(i.head||i,t),t.sheet}function j(i,t,e){i.insertBefore(t,e||null)}function V(i){i.parentNode&&i.parentNode.removeChild(i)}function qt(i,t){for(let e=0;e<i.length;e+=1)i[e]&&i[e].d(t)}function z(i){return document.createElement(i)}function Te(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function _e(i){return document.createTextNode(i)}function ne(){return _e(" ")}function Ee(){return _e("")}function Ce(i,t,e,n){return i.addEventListener(t,e,n),()=>i.removeEventListener(t,e,n)}function Fd(i){return function(t){return t.stopPropagation(),i.call(this,t)}}function w(i,t,e){e==null?i.removeAttribute(t):i.getAttribute(t)!==e&&i.setAttribute(t,e)}function Mf(i){return Array.from(i.childNodes)}function Oe(i,t){t=""+t,i.data!==t&&(i.data=t)}function T(i,t,e,n){e===null?i.style.removeProperty(t):i.style.setProperty(t,e,n?"important":"")}let Eo;function Sf(){if(Eo===void 0){Eo=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(i){Eo=!0}}return Eo}function ls(i,t){getComputedStyle(i).position==="static"&&(i.style.position="relative");const n=z("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const o=Sf();let s;return o?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=Ce(window,"message",r=>{r.source===n.contentWindow&&t()})):(n.src="about:blank",n.onload=()=>{s=Ce(n.contentWindow,"resize",t),t()}),O(i,n),()=>{(o||s&&n.contentWindow)&&s(),V(n)}}function $(i,t,e){i.classList[e?"add":"remove"](t)}function Wd(i,t,{bubbles:e=!1,cancelable:n=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(i,e,n,t),o}class Go{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,n=null){this.e||(this.is_svg?this.e=Te(e.nodeName):this.e=z(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)j(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(V)}}const Fo=new Map;let Wo=0;function Lf(i){let t=5381,e=i.length;for(;e--;)t=(t<<5)-t^i.charCodeAt(e);return t>>>0}function Tf(i,t){const e={stylesheet:Df(t),rules:{}};return Fo.set(i,e),e}function Nd(i,t,e,n,o,s,r,a=0){const l=16.666/n;let c=`{
178
178
  `;for(let A=0;A<=1;A+=l){const b=t+(e-t)*s(A);c+=A*100+`%{${r(b,1-b)}}
179
179
  `}const d=c+`100% {${r(e,1-e)}}
180
- }`,h=`__svelte_${Lf(d)}_${a}`,u=sa(i),{stylesheet:m,rules:v}=Fo.get(u)||Tf(u,i);v[h]||(v[h]=!0,m.insertRule(`@keyframes ${h} ${d}`,m.cssRules.length));const g=i.style.animation||"";return i.style.animation=`${g?`${g}, `:""}${h} ${n}ms linear ${o}ms 1 both`,Wo+=1,h}function _r(i,t){const e=(i.style.animation||"").split(", "),n=e.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),o=e.length-n.length;o&&(i.style.animation=n.join(", "),Wo-=o,Wo||zf())}function zf(){oa(()=>{Wo||(Fo.forEach(i=>{const{ownerNode:t}=i.stylesheet;t&&_(t)}),Fo.clear())})}let Yi;function Yt(i){Yi=i}function dn(){if(!Yi)throw new Error("Function called outside component initialization");return Yi}function Xd(i){dn().$$.before_update.push(i)}function Mt(i){dn().$$.on_mount.push(i)}function Yd(i){dn().$$.after_update.push(i)}function hn(i){dn().$$.on_destroy.push(i)}function cs(){const i=dn();return(t,e,{cancelable:n=!1}={})=>{const o=i.$$.callbacks[t];if(o){const s=Wd(t,e,{cancelable:n});return o.slice().forEach(r=>{r.call(i,s)}),!s.defaultPrevented}return!0}}function Vr(i,t){return dn().$$.context.set(i,t),t}function rn(i){return dn().$$.context.get(i)}function pi(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const Yn=[],Ke=[];let Kn=[];const Or=[],Ud=Promise.resolve();let Br=!1;function qd(){Br||(Br=!0,Ud.then(ra))}function Ba(){return qd(),Ud}function ot(i){Kn.push(i)}function Jd(i){Or.push(i)}const ur=new Set;let Fn=0;function ra(){if(Fn!==0)return;const i=Yi;do{try{for(;Fn<Yn.length;){const t=Yn[Fn];Fn++,Yt(t),jf(t.$$)}}catch(t){throw Yn.length=0,Fn=0,t}for(Yt(null),Yn.length=0,Fn=0;Ke.length;)Ke.pop()();for(let t=0;t<Kn.length;t+=1){const e=Kn[t];ur.has(e)||(ur.add(e),e())}Kn.length=0}while(Yn.length);for(;Or.length;)Or.pop()();Br=!1,ur.clear(),Yt(i)}function jf(i){if(i.fragment!==null){i.update(),rt(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(ot)}}function _f(i){const t=[],e=[];Kn.forEach(n=>i.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),Kn=t}let zi;function Zd(){return zi||(zi=Promise.resolve(),zi.then(()=>{zi=null})),zi}function No(i,t,e){i.dispatchEvent(Wd(`${t?"intro":"outro"}${e}`))}const Oo=new Set;let tn;function de(){tn={r:0,c:[],p:tn}}function he(){tn.r||rt(tn.c),tn=tn.p}function x(i,t){i&&i.i&&(Oo.delete(i),i.i(t))}function L(i,t,e,n){if(i&&i.o){if(Oo.has(i))return;Oo.add(i),tn.c.push(()=>{Oo.delete(i),n&&(e&&i.d(1),n())}),i.o(t)}else n&&n()}const Kd={duration:0};function Dn(i,t,e){const n={direction:"in"};let o=t(i,e,n),s=!1,r,a,l=0;function c(){r&&_r(i,r)}function d(){const{delay:u=0,duration:m=300,easing:v=sn,tick:g=K,css:A}=o||Kd;A&&(r=Nd(i,0,1,m,u,v,A,l++)),g(0,1);const b=Rd()+u,y=b+m;a&&a.abort(),s=!0,ot(()=>No(i,!0,"start")),a=Hd(E=>{if(s){if(E>=y)return g(1,0),No(i,!0,"end"),c(),s=!1;if(E>=b){const k=v((E-b)/m);g(k,1-k)}}return s})}let h=!1;return{start(){h||(h=!0,_r(i),di(o)?(o=o(n),Zd().then(d)):d())},invalidate(){h=!1},end(){s&&(c(),s=!1)}}}function gi(i,t,e){const n={direction:"out"};let o=t(i,e,n),s=!0,r;const a=tn;a.r+=1;function l(){const{delay:c=0,duration:d=300,easing:h=sn,tick:u=K,css:m}=o||Kd;m&&(r=Nd(i,1,0,d,c,h,m));const v=Rd()+c,g=v+d;ot(()=>No(i,!1,"start")),Hd(A=>{if(s){if(A>=g)return u(0,1),No(i,!1,"end"),--a.r||rt(a.c),!1;if(A>=v){const b=h((A-v)/d);u(1-b,b)}}return s})}return di(o)?Zd().then(()=>{o=o(n),l()}):l(),{end(c){c&&o.tick&&o.tick(1,0),s&&(r&&_r(i,r),s=!1)}}}function Xo(i,t){const e=t.token={};function n(o,s,r,a){if(t.token!==e)return;t.resolved=a;let l=t.ctx;r!==void 0&&(l=l.slice(),l[r]=a);const c=o&&(t.current=o)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((h,u)=>{u!==s&&h&&(de(),L(h,1,1,()=>{t.blocks[u]===h&&(t.blocks[u]=null)}),he())}):t.block.d(1),c.c(),x(c,1),c.m(t.mount(),t.anchor),d=!0),t.block=c,t.blocks&&(t.blocks[s]=c),d&&ra()}if(kf(i)){const o=dn();if(i.then(s=>{Yt(o),n(t.then,1,t.value,s),Yt(null)},s=>{if(Yt(o),n(t.catch,2,t.error,s),Yt(null),!t.hasCatch)throw s}),t.current!==t.pending)return n(t.pending,0),!0}else{if(t.current!==t.then)return n(t.then,1,t.value,i),!0;t.resolved=i}}function $d(i,t,e){const n=t.slice(),{resolved:o}=i;i.current===i.then&&(n[i.value]=o),i.current===i.catch&&(n[i.error]=o),i.block.p(n,e)}const Vf=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function aa(i,t){i.d(1),t.delete(i.key)}function un(i,t){L(i,1,1,()=>{t.delete(i.key)})}function St(i,t,e,n,o,s,r,a,l,c,d,h){let u=i.length,m=s.length,v=u;const g={};for(;v--;)g[i[v].key]=v;const A=[],b=new Map,y=new Map,E=[];for(v=m;v--;){const j=h(o,s,v),M=e(j);let X=r.get(M);X?n&&E.push(()=>X.p(j,t)):(X=c(M,j),X.c()),b.set(M,A[v]=X),M in g&&y.set(M,Math.abs(v-g[M]))}const k=new Set,S=new Set;function C(j){x(j,1),j.m(a,d),r.set(j.key,j),d=j.first,m--}for(;u&&m;){const j=A[m-1],M=i[u-1],X=j.key,J=M.key;j===M?(d=j.first,u--,m--):b.has(J)?!r.has(X)||k.has(X)?C(j):S.has(J)?u--:y.get(X)>y.get(J)?(S.add(X),C(j)):(k.add(J),u--):(l(M,r),u--)}for(;u--;){const j=i[u];b.has(j.key)||l(j,r)}for(;m;)C(A[m-1]);return rt(E),A}function st(i,t){const e={},n={},o={$$scope:1};let s=i.length;for(;s--;){const r=i[s],a=t[s];if(a){for(const l in r)l in a||(n[l]=1);for(const l in a)o[l]||(e[l]=a[l],o[l]=1);i[s]=a}else for(const l in r)o[l]=1}for(const r in n)r in e||(e[r]=void 0);return e}function eh(i){return typeof i=="object"&&i!==null?i:{}}function th(i,t,e){const n=i.$$.props[t];n!==void 0&&(i.$$.bound[n]=e,e(i.$$.ctx[n]))}function ie(i){i&&i.c()}function ee(i,t,e,n){const{fragment:o,after_update:s}=i.$$;o&&o.m(t,e),n||ot(()=>{const r=i.$$.on_mount.map(Vd).filter(di);i.$$.on_destroy?i.$$.on_destroy.push(...r):rt(r),i.$$.on_mount=[]}),s.forEach(ot)}function te(i,t){const e=i.$$;e.fragment!==null&&(_f(e.after_update),rt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Of(i,t){i.$$.dirty[0]===-1&&(Yn.push(i),qd(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function le(i,t,e,n,o,s,r,a=[-1]){const l=Yi;Yt(i);const c=i.$$={fragment:null,ctx:[],props:s,update:K,not_equal:o,bound:Va(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:Va(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};r&&r(c.root);let d=!1;if(c.ctx=e?e(i,t.props||{},(h,u,...m)=>{const v=m.length?m[0]:u;return c.ctx&&o(c.ctx[h],c.ctx[h]=v)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](v),d&&Of(i,h)),u}):[],c.update(),d=!0,rt(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const h=Mf(t.target);c.fragment&&c.fragment.l(h),h.forEach(_)}else c.fragment&&c.fragment.c();t.intro&&x(i.$$.fragment),ee(i,t.target,t.anchor,t.customElement),ra()}Yt(l)}class ce{$destroy(){te(this,1),this.$destroy=K}$on(t,e){if(!di(e))return K;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const o=n.indexOf(e);o!==-1&&n.splice(o,1)}}$set(t){this.$$set&&!xf(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Bf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9cRZbFq1yFoQGDNCzwuAENohl54dkgdrNh34tZ8GciFi31nwEsmAEhhAWD1GMJCZgx5sMfUHN+J+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z/ruf9N/YzWQ/2e2c8Cfg7Wz8RC9WkeE8pj/rQltMRH/jXdsdreAEp04mg8u22zYhvZ9IPueLE4puMLfnjRKzKCbD4ZHv9oK/mwaPOlm/ukkbFwjKLj428j8t8DEEvN9xJoJuhsDI9lxOeHXr3zE8cGm7fpQMfNgR54ntXmYXzx1ltvbX64VUl4SH//66+/fl2/5ndLC/BHMV/Q6ypN06Bm3lgFaKMcEbj+bDHN88/curvewF4hjhNWasrwhy/0waIPjylyYjp49Ag++NhFhi7F+jeEFcc/H6w5TYbnxo2OoufXmNPcX+XWv4QLMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==";function Rf(i){fe(i,"svelte-1d7uzh5",".room-label-item.svelte-1d7uzh5{position:absolute;font-size:0.5rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.room-label-item__text.svelte-1d7uzh5{position:absolute;left:0;top:-4rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.25rem;min-width:2rem;padding:0 0.375rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1d7uzh5{position:absolute;top:-2.75rem;height:3rem;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1d7uzh5{font-size:0.625rem}")}function Qf(i){let t,e,n=i[0].name+"",o,s,r,a,l;return{c(){t=z("div"),e=z("span"),o=je(n),s=ne(),r=z("div"),w(e,"class","room-label-item__text svelte-1d7uzh5"),T(e,"background-image","url("+Bf+")"),$(e,"wide",i[0].name.length>3),w(r,"class","room-label-item__bar svelte-1d7uzh5"),w(t,"class","room-label-item svelte-1d7uzh5"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform),T(t,"opacity",i[0].visible?1:0)},m(c,d){V(c,t,d),O(t,e),O(e,o),O(t,s),O(t,r),a||(l=Ce(e,"click",i[1]),a=!0)},p(c,[d]){d&1&&n!==(n=c[0].name+"")&&Oe(o,n),d&1&&$(e,"wide",c[0].name.length>3),d&1&&T(t,"z-index",c[0].zIndex),d&1&&T(t,"transform",c[0].transform),d&1&&T(t,"opacity",c[0].visible?1:0)},i:K,o:K,d(c){c&&_(t),a=!1,l()}}}function Hf(i,t,e){let{five:n}=t,{roomLabel:o}=t;function s(){n.setState({panoIndex:o.panoIndex,mode:"Panorama",longitude:o.longitude})}return i.$$set=r=>{"five"in r&&e(2,n=r.five),"roomLabel"in r&&e(0,o=r.roomLabel)},[o,s,n]}class Gf extends ce{constructor(t){super(),le(this,t,Hf,Qf,ae,{five:2,roomLabel:0},Rf)}}var nh=function(){if(typeof Map!="undefined")return Map;function i(t,e){var n=-1;return t.some(function(o,s){return o[0]===e?(n=s,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var n=i(this.__entries__,e),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(e,n){var o=i(this.__entries__,e);~o?this.__entries__[o][1]=n:this.__entries__.push([e,n])},t.prototype.delete=function(e){var n=this.__entries__,o=i(n,e);~o&&n.splice(o,1)},t.prototype.has=function(e){return!!~i(this.__entries__,e)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,n){n===void 0&&(n=null);for(var o=0,s=this.__entries__;o<s.length;o++){var r=s[o];e.call(n,r[1],r[0])}},t}()}(),Rr=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Yo=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),Ff=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Yo):function(i){return setTimeout(function(){return i(Date.now())},1e3/60)}}(),Wf=2;function Nf(i,t){var e=!1,n=!1,o=0;function s(){e&&(e=!1,i()),n&&a()}function r(){Ff(s)}function a(){var l=Date.now();if(e){if(l-o<Wf)return;n=!0}else e=!0,n=!1,setTimeout(r,t);o=l}return a}var Xf=20,Yf=["top","right","bottom","left","width","height","size","weight"],Uf=typeof MutationObserver!="undefined",qf=function(){function i(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Nf(this.refresh.bind(this),Xf)}return i.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},i.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},i.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},i.prototype.updateObservers_=function(){var t=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return t.forEach(function(e){return e.broadcastActive()}),t.length>0},i.prototype.connect_=function(){!Rr||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Uf?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},i.prototype.disconnect_=function(){!Rr||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},i.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=e===void 0?"":e,o=Yf.some(function(s){return!!~n.indexOf(s)});o&&this.refresh()},i.getInstance=function(){return this.instance_||(this.instance_=new i),this.instance_},i.instance_=null,i}(),ih=function(i,t){for(var e=0,n=Object.keys(t);e<n.length;e++){var o=n[e];Object.defineProperty(i,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return i},ni=function(i){var t=i&&i.ownerDocument&&i.ownerDocument.defaultView;return t||Yo},oh=ds(0,0,0,0);function Uo(i){return parseFloat(i)||0}function Ra(i){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return t.reduce(function(n,o){var s=i["border-"+o+"-width"];return n+Uo(s)},0)}function Jf(i){for(var t=["top","right","bottom","left"],e={},n=0,o=t;n<o.length;n++){var s=o[n],r=i["padding-"+s];e[s]=Uo(r)}return e}function Zf(i){var t=i.getBBox();return ds(0,0,t.width,t.height)}function Kf(i){var t=i.clientWidth,e=i.clientHeight;if(!t&&!e)return oh;var n=ni(i).getComputedStyle(i),o=Jf(n),s=o.left+o.right,r=o.top+o.bottom,a=Uo(n.width),l=Uo(n.height);if(n.boxSizing==="border-box"&&(Math.round(a+s)!==t&&(a-=Ra(n,"left","right")+s),Math.round(l+r)!==e&&(l-=Ra(n,"top","bottom")+r)),!em(i)){var c=Math.round(a+s)-t,d=Math.round(l+r)-e;Math.abs(c)!==1&&(a-=c),Math.abs(d)!==1&&(l-=d)}return ds(o.left,o.top,a,l)}var $f=function(){return typeof SVGGraphicsElement!="undefined"?function(i){return i instanceof ni(i).SVGGraphicsElement}:function(i){return i instanceof ni(i).SVGElement&&typeof i.getBBox=="function"}}();function em(i){return i===ni(i).document.documentElement}function tm(i){return Rr?$f(i)?Zf(i):Kf(i):oh}function nm(i){var t=i.x,e=i.y,n=i.width,o=i.height,s=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,r=Object.create(s.prototype);return ih(r,{x:t,y:e,width:n,height:o,top:e,right:t+n,bottom:o+e,left:t}),r}function ds(i,t,e,n){return{x:i,y:t,width:e,height:n}}var im=function(){function i(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ds(0,0,0,0),this.target=t}return i.prototype.isActive=function(){var t=tm(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},i.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},i}(),om=function(){function i(t,e){var n=nm(e);ih(this,{target:t,contentRect:n})}return i}(),sm=function(){function i(t,e,n){if(this.activeObservations_=[],this.observations_=new nh,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return i.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(t instanceof ni(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new im(t)),this.controller_.addObserver(this),this.controller_.refresh())}},i.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(t instanceof ni(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},i.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},i.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},i.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(n){return new om(n.target,n.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},i.prototype.clearActive=function(){this.activeObservations_.splice(0)},i.prototype.hasActive=function(){return this.activeObservations_.length>0},i}(),sh=typeof WeakMap!="undefined"?new WeakMap:new nh,rh=function(){function i(t){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=qf.getInstance(),n=new sm(t,e,this);sh.set(this,n)}return i}();["observe","unobserve","disconnect"].forEach(function(i){rh.prototype[i]=function(){var t;return(t=sh.get(this))[i].apply(t,arguments)}});var rm=function(){return typeof Yo.ResizeObserver!="undefined"?Yo.ResizeObserver:rh}();function vi(i){new rm((e,n)=>{var o,s,r,a,l,c;for(const d of e){const{borderBoxSize:h,contentRect:u}=d,m=(r=(s=(o=h==null?void 0:h[0])==null?void 0:o.inlineSize)!=null?s:u.width)!=null?r:i.clientWidth,v=(c=(l=(a=h==null?void 0:h[0])==null?void 0:a.blockSize)!=null?l:u.height)!=null?c:i.clientHeight;i.dispatchEvent(new CustomEvent("clientWidth",{detail:m})),i.dispatchEvent(new CustomEvent("clientHeight",{detail:v}))}}).observe(i)}const{Map:am}=Vf;function lm(i){fe(i,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function Qa(i,t,e){const n=i.slice();return n[13]=t[e],n}function Ha(i,t){let e,n,o;return n=new Gf({props:{roomLabel:t[13],five:t[1]}}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(s,r){V(s,e,r),ee(n,s,r),o=!0},p(s,r){t=s;const a={};r&1&&(a.roomLabel=t[13]),r&2&&(a.five=t[1]),n.$set(a)},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){L(n.$$.fragment,s),o=!1},d(s){s&&_(e),te(n,s)}}}function cm(i){let t,e=[],n=new am,o,s,r,a=i[0];const l=c=>c[13].id;for(let c=0;c<a.length;c+=1){let d=Qa(i,a,c),h=l(d);n.set(h,e[c]=Ha(h,d))}return{c(){t=z("div");for(let c=0;c<e.length;c+=1)e[c].c();w(t,"class","room-labels-container svelte-9eg4zi")},m(c,d){V(c,t,d);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);o=!0,s||(r=[Ut(vi.call(null,t)),Ce(t,"clientWidth",i[6]),Ce(t,"clientHeight",i[7])],s=!0)},p(c,[d]){d&3&&(a=c[0],de(),e=St(e,d,l,1,c,a,n,t,un,Ha,null,Qa),he())},i(c){if(!o){for(let d=0;d<a.length;d+=1)x(e[d]);o=!0}},o(c){for(let d=0;d<e.length;d+=1)L(e[d]);o=!1},d(c){c&&_(t);for(let d=0;d<e.length;d+=1)e[d].d();s=!1,rt(r)}}}function dm(i,t,e){var A;let n,{five:o}=t,{roomLabels:s}=t,r,a,l=(A=o.model.shownFloor)!=null?A:null;function c(b){if(!(l===null||b.floorIndex===l))return!1;const E=new R.Raycaster,k=o.camera.position.clone(),S=new R.Vector3(b.position.x,b.position.y,b.position.z),C=S.distanceTo(k);E.set(k.clone(),S.clone().sub(k).normalize());const[j]=o.model.intersectRaycaster(E);return!(j&&j.distance+1<C)}function d(b,y){const k=new R.Vector3(b.position.x,b.position.y,b.position.z).clone().project(o.camera),S=Math.ceil((k.x+1)/2*y.x),C=Math.ceil((-k.y+1)/2*y.y);return`translate(${S}px, ${C}px)`}function h(b){const{rendererSize:y}=b,E=new Map;function k(C){const j=E.get(C.id);if(j)return j;const{x:M,y:X,z:J}=C.position,H=new R.Vector3(M,X,J).clone().distanceTo(o.camera.position);return E.set(C.id,H),H}return s.map(C=>{const j=c(C),M=j?d(C,y):C.transform,X=k(C),H=s.filter(Q=>Q.visible&&k(Q)<X).length*10;return ye(F({},C),{visible:j,transform:M,zIndex:H})})}function u(){e(0,s=h({rendererSize:n,shownFloor:l}))}function m(b){e(4,l=b)}o.on("cameraUpdate",u),o.on("modelShownFloorChange",m),Yd(()=>{e(0,s=h({rendererSize:n,shownFloor:l}))}),hn(()=>{o.off("cameraUpdate",u),o.off("modelShownFloorChange",m)});const v=b=>{e(2,r=b.detail)},g=b=>{e(3,a=b.detail)};return i.$$set=b=>{"five"in b&&e(1,o=b.five),"roomLabels"in b&&e(0,s=b.roomLabels)},i.$$.update=()=>{i.$$.dirty&12&&e(5,n={x:r,y:a}),i.$$.dirty&48&&e(0,s=h({rendererSize:n,shownFloor:l}))},[s,o,r,a,l,n,v,g]}class hm extends ce{constructor(t){super(),le(this,t,dm,cm,ae,{five:1,roomLabels:0},lm)}}function um(i){return i.model_room_labels.map(({id:t,pano_index:e,floor_index:n,name:o,position:s,longitude:r})=>({id:t,name:o,position:s,longitude:r,panoIndex:e,floorIndex:n,zIndex:0,visible:!1,transform:""}))}class fm{constructor(t){f(this,"five");f(this,"enabled",!0);f(this,"fiveModeEnabled");f(this,"app");f(this,"wrapper");f(this,"roomLabels",[]);f(this,"container",document.createElement("div"));f(this,"onFiveModeChange",t=>{if(!this.checkFiveMode(t)){this.fiveModeEnabled=!1,this.render();return}this.five.once("initAnimationEnded",()=>{this.fiveModeEnabled=this.checkFiveMode(this.five.getCurrentState().mode),this.render()})});this.five=t,this.fiveModeEnabled=this.checkFiveMode(t.getCurrentState().mode),this.container.classList.add("model-room-label-plugin-container"),this.container.style.width="100%",this.container.style.height="100%",this.container.style.position="absolute",this.container.style.pointerEvents="none",this.container.style.left="0",this.container.style.top="0",this.container.style.zIndex="5",this.five.once("dispose",()=>this.dispose()),this.five.on("modeChange",this.onFiveModeChange),this.render()}dispose(){this.five.off("modeChange",this.onFiveModeChange),this.container.remove()}load(t){this.roomLabels=um(t),this.render()}appendTo(t){return this.wrapper=t,t.appendChild(this.container),this.render(),this}disable(){return this.enabled=!1,this.render(),this}enable(){return this.enabled=!0,this.render(),this}checkFiveMode(t){return t==="Floorplan"||t==="Mapview"}render(){var t;if(this.wrapper){if(!this.enabled||!this.fiveModeEnabled){(t=this.app)==null||t.$destroy(),this.app=void 0;return}this.app?this.app.$set({five:this.five,roomLabels:this.roomLabels}):this.app=new hm({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const mm=i=>new fm(i),pm={name:"ModelRoomLabelPlugin",version:0};var nn=(i=>(i[i.FLOOR=1]="FLOOR",i[i.CEILING=2]="CEILING",i[i.BOUNDING_CENTER=3]="BOUNDING_CENTER",i))(nn||{});function ii(i){return Y(this,null,function*(){try{return[null,yield i]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function qo(i){return Object.prototype.toString.call(i)==="[object Object]"}function hs(i,t){return i===t?!0:typeof i!=typeof t?!1:!!(Number.isNaN(i)&&Number.isNaN(t))}function gm(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!hs(i[r],t[r]))return!1}return!0}function vm(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!hs(i[e],t[e]))return!1;return!0}function Am(i,t){return hs(i,t)?!0:qo(i)&&qo(t)?gm(i,t):Array.isArray(i)&&Array.isArray(t)?vm(i,t):!1}function la(i,t){return hs(i,t)?!0:qo(i)&&qo(t)?ym(i,t):Array.isArray(i)&&Array.isArray(t)?bm(i,t):!1}function bm(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!la(i[e],t[e]))return!1;return!0}function ym(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!la(i[r],t[r]))return!1}return!0}function Vt(i,t,e={deep:!1}){return e.deep?la(i,t):Am(i,t)}function oi(i){return i<.5?4*i*i*i:.5*Math.pow(2*i-2,3)+1}function ah(i){const t=i-1;return t*t*t+1}function In(i,{delay:t=0,duration:e=400,easing:n=sn}={}){const o=+getComputedStyle(i).opacity;return{delay:t,duration:e,easing:n,css:s=>`opacity: ${s*o}`}}function Ga(i,{delay:t=0,duration:e=400,easing:n=ah,x:o=0,y:s=0,opacity:r=0}={}){const a=getComputedStyle(i),l=+a.opacity,c=a.transform==="none"?"":a.transform,d=l*(1-r),[h,u]=Oa(o),[m,v]=Oa(s);return{delay:t,duration:e,easing:n,css:(g,A)=>`
180
+ }`,h=`__svelte_${Lf(d)}_${a}`,u=sa(i),{stylesheet:m,rules:v}=Fo.get(u)||Tf(u,i);v[h]||(v[h]=!0,m.insertRule(`@keyframes ${h} ${d}`,m.cssRules.length));const g=i.style.animation||"";return i.style.animation=`${g?`${g}, `:""}${h} ${n}ms linear ${o}ms 1 both`,Wo+=1,h}function Vr(i,t){const e=(i.style.animation||"").split(", "),n=e.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),o=e.length-n.length;o&&(i.style.animation=n.join(", "),Wo-=o,Wo||zf())}function zf(){oa(()=>{Wo||(Fo.forEach(i=>{const{ownerNode:t}=i.stylesheet;t&&V(t)}),Fo.clear())})}let Yi;function Yt(i){Yi=i}function dn(){if(!Yi)throw new Error("Function called outside component initialization");return Yi}function Xd(i){dn().$$.before_update.push(i)}function Mt(i){dn().$$.on_mount.push(i)}function Yd(i){dn().$$.after_update.push(i)}function hn(i){dn().$$.on_destroy.push(i)}function cs(){const i=dn();return(t,e,{cancelable:n=!1}={})=>{const o=i.$$.callbacks[t];if(o){const s=Wd(t,e,{cancelable:n});return o.slice().forEach(r=>{r.call(i,s)}),!s.defaultPrevented}return!0}}function jr(i,t){return dn().$$.context.set(i,t),t}function rn(i){return dn().$$.context.get(i)}function pi(i,t){const e=i.$$.callbacks[t.type];e&&e.slice().forEach(n=>n.call(this,t))}const Yn=[],Ke=[];let Kn=[];const Or=[],Ud=Promise.resolve();let Br=!1;function qd(){Br||(Br=!0,Ud.then(ra))}function Ba(){return qd(),Ud}function ot(i){Kn.push(i)}function Jd(i){Or.push(i)}const ur=new Set;let Fn=0;function ra(){if(Fn!==0)return;const i=Yi;do{try{for(;Fn<Yn.length;){const t=Yn[Fn];Fn++,Yt(t),_f(t.$$)}}catch(t){throw Yn.length=0,Fn=0,t}for(Yt(null),Yn.length=0,Fn=0;Ke.length;)Ke.pop()();for(let t=0;t<Kn.length;t+=1){const e=Kn[t];ur.has(e)||(ur.add(e),e())}Kn.length=0}while(Yn.length);for(;Or.length;)Or.pop()();Br=!1,ur.clear(),Yt(i)}function _f(i){if(i.fragment!==null){i.update(),rt(i.before_update);const t=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,t),i.after_update.forEach(ot)}}function Vf(i){const t=[],e=[];Kn.forEach(n=>i.indexOf(n)===-1?t.push(n):e.push(n)),e.forEach(n=>n()),Kn=t}let zi;function Zd(){return zi||(zi=Promise.resolve(),zi.then(()=>{zi=null})),zi}function No(i,t,e){i.dispatchEvent(Wd(`${t?"intro":"outro"}${e}`))}const Oo=new Set;let tn;function de(){tn={r:0,c:[],p:tn}}function he(){tn.r||rt(tn.c),tn=tn.p}function x(i,t){i&&i.i&&(Oo.delete(i),i.i(t))}function L(i,t,e,n){if(i&&i.o){if(Oo.has(i))return;Oo.add(i),tn.c.push(()=>{Oo.delete(i),n&&(e&&i.d(1),n())}),i.o(t)}else n&&n()}const Kd={duration:0};function Dn(i,t,e){const n={direction:"in"};let o=t(i,e,n),s=!1,r,a,l=0;function c(){r&&Vr(i,r)}function d(){const{delay:u=0,duration:m=300,easing:v=sn,tick:g=K,css:A}=o||Kd;A&&(r=Nd(i,0,1,m,u,v,A,l++)),g(0,1);const b=Rd()+u,y=b+m;a&&a.abort(),s=!0,ot(()=>No(i,!0,"start")),a=Hd(E=>{if(s){if(E>=y)return g(1,0),No(i,!0,"end"),c(),s=!1;if(E>=b){const k=v((E-b)/m);g(k,1-k)}}return s})}let h=!1;return{start(){h||(h=!0,Vr(i),di(o)?(o=o(n),Zd().then(d)):d())},invalidate(){h=!1},end(){s&&(c(),s=!1)}}}function gi(i,t,e){const n={direction:"out"};let o=t(i,e,n),s=!0,r;const a=tn;a.r+=1;function l(){const{delay:c=0,duration:d=300,easing:h=sn,tick:u=K,css:m}=o||Kd;m&&(r=Nd(i,1,0,d,c,h,m));const v=Rd()+c,g=v+d;ot(()=>No(i,!1,"start")),Hd(A=>{if(s){if(A>=g)return u(0,1),No(i,!1,"end"),--a.r||rt(a.c),!1;if(A>=v){const b=h((A-v)/d);u(1-b,b)}}return s})}return di(o)?Zd().then(()=>{o=o(n),l()}):l(),{end(c){c&&o.tick&&o.tick(1,0),s&&(r&&Vr(i,r),s=!1)}}}function Xo(i,t){const e=t.token={};function n(o,s,r,a){if(t.token!==e)return;t.resolved=a;let l=t.ctx;r!==void 0&&(l=l.slice(),l[r]=a);const c=o&&(t.current=o)(l);let d=!1;t.block&&(t.blocks?t.blocks.forEach((h,u)=>{u!==s&&h&&(de(),L(h,1,1,()=>{t.blocks[u]===h&&(t.blocks[u]=null)}),he())}):t.block.d(1),c.c(),x(c,1),c.m(t.mount(),t.anchor),d=!0),t.block=c,t.blocks&&(t.blocks[s]=c),d&&ra()}if(kf(i)){const o=dn();if(i.then(s=>{Yt(o),n(t.then,1,t.value,s),Yt(null)},s=>{if(Yt(o),n(t.catch,2,t.error,s),Yt(null),!t.hasCatch)throw s}),t.current!==t.pending)return n(t.pending,0),!0}else{if(t.current!==t.then)return n(t.then,1,t.value,i),!0;t.resolved=i}}function $d(i,t,e){const n=t.slice(),{resolved:o}=i;i.current===i.then&&(n[i.value]=o),i.current===i.catch&&(n[i.error]=o),i.block.p(n,e)}const jf=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function aa(i,t){i.d(1),t.delete(i.key)}function un(i,t){L(i,1,1,()=>{t.delete(i.key)})}function St(i,t,e,n,o,s,r,a,l,c,d,h){let u=i.length,m=s.length,v=u;const g={};for(;v--;)g[i[v].key]=v;const A=[],b=new Map,y=new Map,E=[];for(v=m;v--;){const _=h(o,s,v),M=e(_);let X=r.get(M);X?n&&E.push(()=>X.p(_,t)):(X=c(M,_),X.c()),b.set(M,A[v]=X),M in g&&y.set(M,Math.abs(v-g[M]))}const k=new Set,S=new Set;function C(_){x(_,1),_.m(a,d),r.set(_.key,_),d=_.first,m--}for(;u&&m;){const _=A[m-1],M=i[u-1],X=_.key,J=M.key;_===M?(d=_.first,u--,m--):b.has(J)?!r.has(X)||k.has(X)?C(_):S.has(J)?u--:y.get(X)>y.get(J)?(S.add(X),C(_)):(k.add(J),u--):(l(M,r),u--)}for(;u--;){const _=i[u];b.has(_.key)||l(_,r)}for(;m;)C(A[m-1]);return rt(E),A}function st(i,t){const e={},n={},o={$$scope:1};let s=i.length;for(;s--;){const r=i[s],a=t[s];if(a){for(const l in r)l in a||(n[l]=1);for(const l in a)o[l]||(e[l]=a[l],o[l]=1);i[s]=a}else for(const l in r)o[l]=1}for(const r in n)r in e||(e[r]=void 0);return e}function eh(i){return typeof i=="object"&&i!==null?i:{}}function th(i,t,e){const n=i.$$.props[t];n!==void 0&&(i.$$.bound[n]=e,e(i.$$.ctx[n]))}function ie(i){i&&i.c()}function ee(i,t,e,n){const{fragment:o,after_update:s}=i.$$;o&&o.m(t,e),n||ot(()=>{const r=i.$$.on_mount.map(jd).filter(di);i.$$.on_destroy?i.$$.on_destroy.push(...r):rt(r),i.$$.on_mount=[]}),s.forEach(ot)}function te(i,t){const e=i.$$;e.fragment!==null&&(Vf(e.after_update),rt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function Of(i,t){i.$$.dirty[0]===-1&&(Yn.push(i),qd(),i.$$.dirty.fill(0)),i.$$.dirty[t/31|0]|=1<<t%31}function le(i,t,e,n,o,s,r,a=[-1]){const l=Yi;Yt(i);const c=i.$$={fragment:null,ctx:[],props:s,update:K,not_equal:o,bound:ja(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:ja(),dirty:a,skip_bound:!1,root:t.target||l.$$.root};r&&r(c.root);let d=!1;if(c.ctx=e?e(i,t.props||{},(h,u,...m)=>{const v=m.length?m[0]:u;return c.ctx&&o(c.ctx[h],c.ctx[h]=v)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](v),d&&Of(i,h)),u}):[],c.update(),d=!0,rt(c.before_update),c.fragment=n?n(c.ctx):!1,t.target){if(t.hydrate){const h=Mf(t.target);c.fragment&&c.fragment.l(h),h.forEach(V)}else c.fragment&&c.fragment.c();t.intro&&x(i.$$.fragment),ee(i,t.target,t.anchor,t.customElement),ra()}Yt(l)}class ce{$destroy(){te(this,1),this.$destroy=K}$on(t,e){if(!di(e))return K;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const o=n.indexOf(e);o!==-1&&n.splice(o,1)}}$set(t){this.$$set&&!xf(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Bf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA8CAYAAACZ1L+0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAPAAAAABU0H2EAAARRElEQVR4Ad2czY9cRZbFq1yFoQGDNCzwuAENohl54dkgdrNh34tZ8GciFi31nwEsmAEhhAWD1GMJCZgx5sMfUHN+J+NE3XfrZWWVcVVLHVLmuXG/74148V5m2bm/N8bR0dH+Bx988Po333zzbz///PONg4ODa+I9I9y/cuXKgV77h4eH+1KH3hP/yv7+vuBAsG+5UCIpCkMzDQ962Eu80Q1P/KmHT82v8IocZFL4pslDvL3fNARHoPI2wtbrV1jBIf9N8SEZ0UUP2wFHv2ocSc/2ouEz8PVooJXQ0/j10aNHoH2Idj4PHz4k1n29/k+5/u3ll1/+r7fffvtLzfGzd8ibjK6+9957f5ajf1XzH9y7d+8Xjf9FRs1SdvNBBg2SDQ1xh9ALH4yN0M2BNZrKwtFc9Fmkquuma5HJBzvLiIONBnx40B7QIzTdxCcNwj3dYlEoUmabAU+UFZDpxah22Ng2NjQXH0LrwccGwyEzXfWhWQwSYQHYuFevXj14/vnn37h79+7Nr7766gup/FX5PnAj33///f/46aef3vj444/vfPbZZz9IYGMcnDbkhEYQL001Hfsu775i+7j6LID6cDQWYo8mabGMxOr+e/ye3y7989p3/9jfvHnz2q1bt25oMb549913/3Lwzjvv/Mu3337775988smdzz///AcVQ+IecsAOp8OOHRpkiJniWQnrBJmwc7EF8atxBA2ihx/obf7Qqa+un+aDI0f7k08nU+PLj3PBR+qpcvFdd3BNP7YgI7mnHqHzBRndv1hH33///QNtlAcvvfTSq999992dQzFu/vjjj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C1tk4FnyQYccray31B3s9UQviG104IUGmZ8mH5v+3qF2w51nn332TzHCsI7KJzEVm6akEVuPhLWGhUeM0CAjvkHmxCM+uCYPD2R0f2Ilt7lB4tMGZ3i7qPqfe+65P6j3X1y5du3aZ3rSefrGjRsvkNxpI80AeTGC0NgGoakvuFYrtvDjD11okBF6m3yjdfze9eM7sbPQIC8sg8detlPdP7XCy8ASOh6IC534Qf126Au6Aq7S+0P9jOJ/f/jhh7dfeeWVN1C4c+cOv5zoxsQgKD7O/OgIT3OLgrrkLAMR9EuQYsXLlWO5ePNMJ25s7Fhv8EIraduDDOJI7kfh6FT98M6Ka/GrLbE0/131X79+/YVXX331+tNPP32b3nt1tGhXP/rooz/ruf9N/YzWQ/2e2c8Cfg7Wz8RC9WkeE8pj/rQltMRH/jXdsdreAEp04mg8u22zYhvZ9IPueLE4puMLfnjRKzKCbD4ZHv9oK/mwaPOlm/ukkbFwjKLj428j8t8DEEvN9xJoJuhsDI9lxOeHXr3zE8cGm7fpQMfNgR54ntXmYXzx1ltvbX64VUl4SH//66+/fl2/5ndLC/BHMV/Q6ypN06Bm3lgFaKMcEbj+bDHN88/curvewF4hjhNWasrwhy/0waIPjylyYjp49Ag++NhFhi7F+jeEFcc/H6w5TYbnxo2OoufXmNPcX+XWv4QLMo+taJkfeY4gvtRs/n8vzY/cssxB5CyKxi96/aB+/Y9+KfE/X3vttS8lI7e9/wfu514OAjYP0QAAAABJRU5ErkJggg==";function Rf(i){fe(i,"svelte-1d7uzh5",".room-label-item.svelte-1d7uzh5{position:absolute;font-size:0.5rem;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.room-label-item__text.svelte-1d7uzh5{position:absolute;left:0;top:-4rem;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center;height:1.25rem;min-width:2rem;padding:0 0.375rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap}.room-label-item__bar.svelte-1d7uzh5{position:absolute;top:-2.75rem;height:3rem;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0))}.wide.svelte-1d7uzh5{font-size:0.625rem}")}function Qf(i){let t,e,n=i[0].name+"",o,s,r,a,l;return{c(){t=z("div"),e=z("span"),o=_e(n),s=ne(),r=z("div"),w(e,"class","room-label-item__text svelte-1d7uzh5"),T(e,"background-image","url("+Bf+")"),$(e,"wide",i[0].name.length>3),w(r,"class","room-label-item__bar svelte-1d7uzh5"),w(t,"class","room-label-item svelte-1d7uzh5"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform),T(t,"opacity",i[0].visible?1:0)},m(c,d){j(c,t,d),O(t,e),O(e,o),O(t,s),O(t,r),a||(l=Ce(e,"click",i[1]),a=!0)},p(c,[d]){d&1&&n!==(n=c[0].name+"")&&Oe(o,n),d&1&&$(e,"wide",c[0].name.length>3),d&1&&T(t,"z-index",c[0].zIndex),d&1&&T(t,"transform",c[0].transform),d&1&&T(t,"opacity",c[0].visible?1:0)},i:K,o:K,d(c){c&&V(t),a=!1,l()}}}function Hf(i,t,e){let{five:n}=t,{roomLabel:o}=t;function s(){n.setState({panoIndex:o.panoIndex,mode:"Panorama",longitude:o.longitude})}return i.$$set=r=>{"five"in r&&e(2,n=r.five),"roomLabel"in r&&e(0,o=r.roomLabel)},[o,s,n]}class Gf extends ce{constructor(t){super(),le(this,t,Hf,Qf,ae,{five:2,roomLabel:0},Rf)}}var nh=function(){if(typeof Map!="undefined")return Map;function i(t,e){var n=-1;return t.some(function(o,s){return o[0]===e?(n=s,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var n=i(this.__entries__,e),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(e,n){var o=i(this.__entries__,e);~o?this.__entries__[o][1]=n:this.__entries__.push([e,n])},t.prototype.delete=function(e){var n=this.__entries__,o=i(n,e);~o&&n.splice(o,1)},t.prototype.has=function(e){return!!~i(this.__entries__,e)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,n){n===void 0&&(n=null);for(var o=0,s=this.__entries__;o<s.length;o++){var r=s[o];e.call(n,r[1],r[0])}},t}()}(),Rr=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Yo=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),Ff=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Yo):function(i){return setTimeout(function(){return i(Date.now())},1e3/60)}}(),Wf=2;function Nf(i,t){var e=!1,n=!1,o=0;function s(){e&&(e=!1,i()),n&&a()}function r(){Ff(s)}function a(){var l=Date.now();if(e){if(l-o<Wf)return;n=!0}else e=!0,n=!1,setTimeout(r,t);o=l}return a}var Xf=20,Yf=["top","right","bottom","left","width","height","size","weight"],Uf=typeof MutationObserver!="undefined",qf=function(){function i(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Nf(this.refresh.bind(this),Xf)}return i.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},i.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},i.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},i.prototype.updateObservers_=function(){var t=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return t.forEach(function(e){return e.broadcastActive()}),t.length>0},i.prototype.connect_=function(){!Rr||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Uf?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},i.prototype.disconnect_=function(){!Rr||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},i.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=e===void 0?"":e,o=Yf.some(function(s){return!!~n.indexOf(s)});o&&this.refresh()},i.getInstance=function(){return this.instance_||(this.instance_=new i),this.instance_},i.instance_=null,i}(),ih=function(i,t){for(var e=0,n=Object.keys(t);e<n.length;e++){var o=n[e];Object.defineProperty(i,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return i},ni=function(i){var t=i&&i.ownerDocument&&i.ownerDocument.defaultView;return t||Yo},oh=ds(0,0,0,0);function Uo(i){return parseFloat(i)||0}function Ra(i){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return t.reduce(function(n,o){var s=i["border-"+o+"-width"];return n+Uo(s)},0)}function Jf(i){for(var t=["top","right","bottom","left"],e={},n=0,o=t;n<o.length;n++){var s=o[n],r=i["padding-"+s];e[s]=Uo(r)}return e}function Zf(i){var t=i.getBBox();return ds(0,0,t.width,t.height)}function Kf(i){var t=i.clientWidth,e=i.clientHeight;if(!t&&!e)return oh;var n=ni(i).getComputedStyle(i),o=Jf(n),s=o.left+o.right,r=o.top+o.bottom,a=Uo(n.width),l=Uo(n.height);if(n.boxSizing==="border-box"&&(Math.round(a+s)!==t&&(a-=Ra(n,"left","right")+s),Math.round(l+r)!==e&&(l-=Ra(n,"top","bottom")+r)),!em(i)){var c=Math.round(a+s)-t,d=Math.round(l+r)-e;Math.abs(c)!==1&&(a-=c),Math.abs(d)!==1&&(l-=d)}return ds(o.left,o.top,a,l)}var $f=function(){return typeof SVGGraphicsElement!="undefined"?function(i){return i instanceof ni(i).SVGGraphicsElement}:function(i){return i instanceof ni(i).SVGElement&&typeof i.getBBox=="function"}}();function em(i){return i===ni(i).document.documentElement}function tm(i){return Rr?$f(i)?Zf(i):Kf(i):oh}function nm(i){var t=i.x,e=i.y,n=i.width,o=i.height,s=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,r=Object.create(s.prototype);return ih(r,{x:t,y:e,width:n,height:o,top:e,right:t+n,bottom:o+e,left:t}),r}function ds(i,t,e,n){return{x:i,y:t,width:e,height:n}}var im=function(){function i(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ds(0,0,0,0),this.target=t}return i.prototype.isActive=function(){var t=tm(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},i.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},i}(),om=function(){function i(t,e){var n=nm(e);ih(this,{target:t,contentRect:n})}return i}(),sm=function(){function i(t,e,n){if(this.activeObservations_=[],this.observations_=new nh,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return i.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(t instanceof ni(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new im(t)),this.controller_.addObserver(this),this.controller_.refresh())}},i.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(t instanceof ni(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},i.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},i.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},i.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(n){return new om(n.target,n.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},i.prototype.clearActive=function(){this.activeObservations_.splice(0)},i.prototype.hasActive=function(){return this.activeObservations_.length>0},i}(),sh=typeof WeakMap!="undefined"?new WeakMap:new nh,rh=function(){function i(t){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=qf.getInstance(),n=new sm(t,e,this);sh.set(this,n)}return i}();["observe","unobserve","disconnect"].forEach(function(i){rh.prototype[i]=function(){var t;return(t=sh.get(this))[i].apply(t,arguments)}});var rm=function(){return typeof Yo.ResizeObserver!="undefined"?Yo.ResizeObserver:rh}();function vi(i){new rm((e,n)=>{var o,s,r,a,l,c;for(const d of e){const{borderBoxSize:h,contentRect:u}=d,m=(r=(s=(o=h==null?void 0:h[0])==null?void 0:o.inlineSize)!=null?s:u.width)!=null?r:i.clientWidth,v=(c=(l=(a=h==null?void 0:h[0])==null?void 0:a.blockSize)!=null?l:u.height)!=null?c:i.clientHeight;i.dispatchEvent(new CustomEvent("clientWidth",{detail:m})),i.dispatchEvent(new CustomEvent("clientHeight",{detail:v}))}}).observe(i)}const{Map:am}=jf;function lm(i){fe(i,"svelte-9eg4zi",".room-labels-container.svelte-9eg4zi{width:100%;height:100%;position:relative;color:#fff}")}function Qa(i,t,e){const n=i.slice();return n[13]=t[e],n}function Ha(i,t){let e,n,o;return n=new Gf({props:{roomLabel:t[13],five:t[1]}}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(s,r){j(s,e,r),ee(n,s,r),o=!0},p(s,r){t=s;const a={};r&1&&(a.roomLabel=t[13]),r&2&&(a.five=t[1]),n.$set(a)},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){L(n.$$.fragment,s),o=!1},d(s){s&&V(e),te(n,s)}}}function cm(i){let t,e=[],n=new am,o,s,r,a=i[0];const l=c=>c[13].id;for(let c=0;c<a.length;c+=1){let d=Qa(i,a,c),h=l(d);n.set(h,e[c]=Ha(h,d))}return{c(){t=z("div");for(let c=0;c<e.length;c+=1)e[c].c();w(t,"class","room-labels-container svelte-9eg4zi")},m(c,d){j(c,t,d);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);o=!0,s||(r=[Ut(vi.call(null,t)),Ce(t,"clientWidth",i[6]),Ce(t,"clientHeight",i[7])],s=!0)},p(c,[d]){d&3&&(a=c[0],de(),e=St(e,d,l,1,c,a,n,t,un,Ha,null,Qa),he())},i(c){if(!o){for(let d=0;d<a.length;d+=1)x(e[d]);o=!0}},o(c){for(let d=0;d<e.length;d+=1)L(e[d]);o=!1},d(c){c&&V(t);for(let d=0;d<e.length;d+=1)e[d].d();s=!1,rt(r)}}}function dm(i,t,e){var A;let n,{five:o}=t,{roomLabels:s}=t,r,a,l=(A=o.model.shownFloor)!=null?A:null;function c(b){if(!(l===null||b.floorIndex===l))return!1;const E=new R.Raycaster,k=o.camera.position.clone(),S=new R.Vector3(b.position.x,b.position.y,b.position.z),C=S.distanceTo(k);E.set(k.clone(),S.clone().sub(k).normalize());const[_]=o.model.intersectRaycaster(E);return!(_&&_.distance+1<C)}function d(b,y){const k=new R.Vector3(b.position.x,b.position.y,b.position.z).clone().project(o.camera),S=Math.ceil((k.x+1)/2*y.x),C=Math.ceil((-k.y+1)/2*y.y);return`translate(${S}px, ${C}px)`}function h(b){const{rendererSize:y}=b,E=new Map;function k(C){const _=E.get(C.id);if(_)return _;const{x:M,y:X,z:J}=C.position,H=new R.Vector3(M,X,J).clone().distanceTo(o.camera.position);return E.set(C.id,H),H}return s.map(C=>{const _=c(C),M=_?d(C,y):C.transform,X=k(C),H=s.filter(Q=>Q.visible&&k(Q)<X).length*10;return ye(F({},C),{visible:_,transform:M,zIndex:H})})}function u(){e(0,s=h({rendererSize:n,shownFloor:l}))}function m(b){e(4,l=b)}o.on("cameraUpdate",u),o.on("modelShownFloorChange",m),Yd(()=>{e(0,s=h({rendererSize:n,shownFloor:l}))}),hn(()=>{o.off("cameraUpdate",u),o.off("modelShownFloorChange",m)});const v=b=>{e(2,r=b.detail)},g=b=>{e(3,a=b.detail)};return i.$$set=b=>{"five"in b&&e(1,o=b.five),"roomLabels"in b&&e(0,s=b.roomLabels)},i.$$.update=()=>{i.$$.dirty&12&&e(5,n={x:r,y:a}),i.$$.dirty&48&&e(0,s=h({rendererSize:n,shownFloor:l}))},[s,o,r,a,l,n,v,g]}class hm extends ce{constructor(t){super(),le(this,t,dm,cm,ae,{five:1,roomLabels:0},lm)}}function um(i){return i.model_room_labels.map(({id:t,pano_index:e,floor_index:n,name:o,position:s,longitude:r})=>({id:t,name:o,position:s,longitude:r,panoIndex:e,floorIndex:n,zIndex:0,visible:!1,transform:""}))}class fm{constructor(t){f(this,"five");f(this,"enabled",!0);f(this,"fiveModeEnabled");f(this,"app");f(this,"wrapper");f(this,"roomLabels",[]);f(this,"container",document.createElement("div"));f(this,"onFiveModeChange",t=>{if(!this.checkFiveMode(t)){this.fiveModeEnabled=!1,this.render();return}this.five.once("initAnimationEnded",()=>{this.fiveModeEnabled=this.checkFiveMode(this.five.getCurrentState().mode),this.render()})});this.five=t,this.fiveModeEnabled=this.checkFiveMode(t.getCurrentState().mode),this.container.classList.add("model-room-label-plugin-container"),this.container.style.width="100%",this.container.style.height="100%",this.container.style.position="absolute",this.container.style.pointerEvents="none",this.container.style.left="0",this.container.style.top="0",this.container.style.zIndex="5",this.five.once("dispose",()=>this.dispose()),this.five.on("modeChange",this.onFiveModeChange),this.render()}dispose(){this.five.off("modeChange",this.onFiveModeChange),this.container.remove()}load(t){this.roomLabels=um(t),this.render()}appendTo(t){return this.wrapper=t,t.appendChild(this.container),this.render(),this}disable(){return this.enabled=!1,this.render(),this}enable(){return this.enabled=!0,this.render(),this}checkFiveMode(t){return t==="Floorplan"||t==="Mapview"}render(){var t;if(this.wrapper){if(!this.enabled||!this.fiveModeEnabled){(t=this.app)==null||t.$destroy(),this.app=void 0;return}this.app?this.app.$set({five:this.five,roomLabels:this.roomLabels}):this.app=new hm({target:this.container,props:{five:this.five,roomLabels:this.roomLabels}})}}}const mm=i=>new fm(i),pm={name:"ModelRoomLabelPlugin",version:0};var nn=(i=>(i[i.FLOOR=1]="FLOOR",i[i.CEILING=2]="CEILING",i[i.BOUNDING_CENTER=3]="BOUNDING_CENTER",i))(nn||{});function ii(i){return Y(this,null,function*(){try{return[null,yield i]}catch(t){return t instanceof Error?[t,null]:[new Error(""),null]}})}function qo(i){return Object.prototype.toString.call(i)==="[object Object]"}function hs(i,t){return i===t?!0:typeof i!=typeof t?!1:!!(Number.isNaN(i)&&Number.isNaN(t))}function gm(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!hs(i[r],t[r]))return!1}return!0}function vm(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!hs(i[e],t[e]))return!1;return!0}function Am(i,t){return hs(i,t)?!0:qo(i)&&qo(t)?gm(i,t):Array.isArray(i)&&Array.isArray(t)?vm(i,t):!1}function la(i,t){return hs(i,t)?!0:qo(i)&&qo(t)?ym(i,t):Array.isArray(i)&&Array.isArray(t)?bm(i,t):!1}function bm(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e<n;e++)if(!la(i[e],t[e]))return!1;return!0}function ym(i,t){const e=Object.getOwnPropertyNames(i),n=Object.getOwnPropertyNames(t);if(e.length!==n.length)return!1;for(let o=0,s=e.length;o<s;o++){const r=e[o];if(!la(i[r],t[r]))return!1}return!0}function jt(i,t,e={deep:!1}){return e.deep?la(i,t):Am(i,t)}function oi(i){return i<.5?4*i*i*i:.5*Math.pow(2*i-2,3)+1}function ah(i){const t=i-1;return t*t*t+1}function In(i,{delay:t=0,duration:e=400,easing:n=sn}={}){const o=+getComputedStyle(i).opacity;return{delay:t,duration:e,easing:n,css:s=>`opacity: ${s*o}`}}function Ga(i,{delay:t=0,duration:e=400,easing:n=ah,x:o=0,y:s=0,opacity:r=0}={}){const a=getComputedStyle(i),l=+a.opacity,c=a.transform==="none"?"":a.transform,d=l*(1-r),[h,u]=Oa(o),[m,v]=Oa(s);return{delay:t,duration:e,easing:n,css:(g,A)=>`
181
181
  transform: ${c} translate(${(1-g)*h}${u}, ${(1-g)*m}${v});
182
182
  opacity: ${l-d*A}`}}function Jo(i,{delay:t=0,speed:e,duration:n,easing:o=oi}={}){let s=i.getTotalLength();const r=getComputedStyle(i);return r.strokeLinecap!=="butt"&&(s+=parseInt(r.strokeWidth)),n===void 0?e===void 0?n=800:n=s/e:typeof n=="function"&&(n=n(s)),{delay:t,duration:n,easing:o,css:(a,l)=>`
183
183
  stroke-dasharray: ${s};
184
184
  stroke-dashoffset: ${l*s};
185
- `}}const an="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/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HDhgwOZZs4ZSTHR5lQQYPDW1DS4aELQxdyEIAANGjtk8c6aaqTslk8gVwIAN0w3rAEL2bMtHm12AIOHqenXaNDWztEwo9hKJGHjR6OO0yDSI1IGdoQ0iY0a6Tt+06fKUDRQzqKw8Qlxr1AXrwNqwDvGBA+BrGUDc3d3Xr5+SQZj0E2ERqXIjPAJYNUbD18FoWEeDbHLPzLyQ4ePjQ5i3x1RCubfmpqkjMMNo6KOJ5uqe+f58C9GoaD29XyVSYS1h4DftKeWDDN4AbACZMZAsExEKghWUNKXWhlPfA2P1qjmUT556a9jmQotWi/VOFael1lR7ep4JfRZy8nhpwtG4wMMB/gdi9/nNH+vhezsmJ+fG5quX12fomHl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function lh(i){return i*180/Math.PI}function wm(i){fe(i,"svelte-17cl35n",".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}")}function Pm(i){let t,e;return{c(){t=z("div"),e=z("div"),w(e,"class","floorplan__camera-rotate svelte-17cl35n"),T(e,"background-image",`url(${i[0]||an})`),T(e,"width",i[4]),T(e,"height",i[4]),T(e,"left","-"+i[4]),T(e,"top","-"+i[4]),T(e,"transform",`rotate(${i[3]}deg)`),T(e,"transform-origin",`${i[4]} ${i[4]}`),w(t,"class","floorplan__camera-position svelte-17cl35n"),T(t,"left",i[1]),T(t,"top",i[2])},m(n,o){V(n,t,o),O(t,e)},p(n,[o]){o&1&&T(e,"background-image",`url(${n[0]||an})`);const s=o&1;s&&T(e,"width",n[4]),s&&T(e,"height",n[4]),s&&T(e,"left","-"+n[4]),s&&T(e,"top","-"+n[4]),s&&T(e,"transform",`rotate(${n[3]}deg)`),s&&T(e,"transform-origin",`${n[4]} ${n[4]}`)},i:K,o:K,d(n){n&&_(t)}}}function Cm(i,t,e){let{panoIndex:n}=t,{floorplanData:o}=t,{lastPanoramaLongitude:s}=t,{cameraImageUrl:r}=t;const{observers:a}=o,l=a[n],c=l.positionInImage.x,d=l.positionInImage.y,h=c*100+"%",u=d*100+"%",m=-lh(s)+45,v=document.body.clientWidth,g=document.body.clientHeight,b=`${(v<500||g<500?17:37)/16}rem`;return i.$$set=y=>{"panoIndex"in y&&e(5,n=y.panoIndex),"floorplanData"in y&&e(6,o=y.floorplanData),"lastPanoramaLongitude"in y&&e(7,s=y.lastPanoramaLongitude),"cameraImageUrl"in y&&e(0,r=y.cameraImageUrl)},[r,h,u,m,b,n,o,s]}let Em=class extends ce{constructor(t){super(),le(this,t,Cm,Pm,ae,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},wm)}};const Im="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4f9p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YRWttYgWYrPcLbejWqua2WaCqBSixQLvWe5mi06RWqv8TDOhNUrZC9sdm+Xuu5cpUqvU+wwzYbVVkIXYLHd/olekVpmpZ8KiMYbU7ma/EXJZBW5JrZl2V9bRnNWyWe4xt8TWTPd3FdEYSEFslnsoURlAi01FqN56f2br2xeOe9ytgbyf4nErGg/hl6RN4Jc5Lt++2rVjHMdCIIqiqtoRQW2mMogIyZFjlsB2B9wjjaY1PXa3wcbSPaEDR1fP9fVt8aPai2+f2+TlWu2l0yweZHlEO5S9cyu1lDKj5T/fWCH4jLaUnXMbvFyrzby8xRrayqUM2+ZWqvuM1nmpgHWkl8F9z9yG7LNa5yEMa0n8yHb93Er1oXjnoMVyFn3KQVcP7VRpFn+sDiznaiuHNufsHnkIwy7aPA/r5jbFGW3m7S12ku55WPN7Li1PPIRhN6sjtBjTmm+KmYcwPEOKs9tHF1JDHCoHLZ5DQ8yPBic9DoHjAKvsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function km(i){fe(i,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{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-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function xm(i){let t,e,n,o,s;return{c(){t=z("div"),e=z("div"),n=ne(),o=z("span"),s=je(i[0]),w(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),T(e,"background-image",`url(${Im})`),w(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),w(t,"class","floorplan-plugin__compass svelte-rpkaro"),T(t,"transform",i[2])},m(r,a){V(r,t,a),O(t,e),O(t,n),O(t,o),O(o,s)},p(r,a){a&1&&Oe(s,r[0])},d(r){r&&_(t)}}}function Dm(i){let t,e=i[1]&&xm(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),V(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:K,o:K,d(n){e&&e.d(n),n&&_(t)}}}function Mm(i){return i/Math.PI*180}function Sm(i,t,e){var c;let{floorplanData:n}=t,{northDesc:o}=t;const s=(c=n.entrance)==null?void 0:c.northRad,r=typeof s=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(s?Mm(s):0)+90}deg)`;return i.$$set=d=>{"floorplanData"in d&&e(3,n=d.floorplanData),"northDesc"in d&&e(0,o=d.northDesc)},[o,r,l,n]}class Lm extends ce{constructor(t){super(),le(this,t,Sm,Dm,ae,{floorplanData:3,northDesc:0},km)}}const Wn=[];function ca(i,t=K){let e;const n=new Set;function o(a){if(ae(i,a)&&(i=a,e)){const l=!Wn.length;for(const c of n)c[1](),Wn.push(c,i);if(l){for(let c=0;c<Wn.length;c+=2)Wn[c][0](Wn[c+1]);Wn.length=0}}}function s(a){o(a(i))}function r(a,l=K){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||K),a(i),()=>{n.delete(c),n.size===0&&e&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function Tm(i){fe(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function zm(i){let t,e;return{c(){t=z("img"),wt(t.src,e=i[0])||w(t,"src",e),w(t,"alt","floorplan iamge"),w(t,"class","svelte-1gfoniz")},m(n,o){V(n,t,o)},p(n,[o]){o&1&&!wt(t.src,e=n[0])&&w(t,"src",e)},i:K,o:K,d(n){n&&_(t)}}}function jm(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class _m extends ce{constructor(t){super(),le(this,t,jm,zm,ae,{url:0},Tm)}}function Vm(i){fe(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function Om(i){let t,e,n,o;return{c(){t=z("div"),e=new Go(!1),n=ne(),o=new Go(!1),e.a=n,o.a=null,w(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){V(s,t,r),e.m(i[1],t),O(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:K,o:K,d(s){s&&_(t)}}}function Bm(i,t,e){let{content:n}=t;const o=`
185
+ `}}const an="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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AANGjtk8c6aaqTslk8gVwIAN0w3rAEL2bMtHm12AIOHqenXaNDWztEwo9hKJGHjR6OO0yDSI1IGdoQ0iY0a6Tt+06fKUDRQzqKw8Qlxr1AXrwNqwDvGBA+BrGUDc3d3Xr5+SQZj0E2ERqXIjPAJYNUbD18FoWEeDbHLPzLyQ4ePjQ5i3x1RCubfmpqkjMMNo6KOJ5uqe+f58C9GoaD29XyVSYS1h4DftKeWDDN4AbACZMZAsExEKghWUNKXWhlPfA2P1qjmUT556a9jmQotWi/VOFael1lR7ep4JfRZy8nhpwtG4wMMB/gdi9/nNH+vhezsmJ+fG5quX12fomHl6J+KFy88uA2RJyJPE4wkL4wIPBfgXxO5HxGN7zNw5W2bNnLZhio+OmaR3LD6tplrLfKeYAwX7/O6Dje/2dpniwuKiwoMHH+bn7723Z8/uHTu2fpg9+3p29sYrWVnr1l1cO2HCUFCGT+tshUcWLPj6IDf37ued27Z9unXz2owZU6dOnnxp4sQ1q1ePH79KN6vbQWc1SrfrTit6lO5NO6/F8yZNmofBfgNTwRQLsPLsHQAAAABJRU5ErkJggg==";function lh(i){return i*180/Math.PI}function wm(i){fe(i,"svelte-17cl35n",".floorplan__camera-position.svelte-17cl35n{position:absolute;width:0;height:0}.floorplan__camera-rotate.svelte-17cl35n{position:absolute;background-repeat:no-repeat;background-size:100%}")}function Pm(i){let t,e;return{c(){t=z("div"),e=z("div"),w(e,"class","floorplan__camera-rotate svelte-17cl35n"),T(e,"background-image",`url(${i[0]||an})`),T(e,"width",i[4]),T(e,"height",i[4]),T(e,"left","-"+i[4]),T(e,"top","-"+i[4]),T(e,"transform",`rotate(${i[3]}deg)`),T(e,"transform-origin",`${i[4]} ${i[4]}`),w(t,"class","floorplan__camera-position svelte-17cl35n"),T(t,"left",i[1]),T(t,"top",i[2])},m(n,o){j(n,t,o),O(t,e)},p(n,[o]){o&1&&T(e,"background-image",`url(${n[0]||an})`);const s=o&1;s&&T(e,"width",n[4]),s&&T(e,"height",n[4]),s&&T(e,"left","-"+n[4]),s&&T(e,"top","-"+n[4]),s&&T(e,"transform",`rotate(${n[3]}deg)`),s&&T(e,"transform-origin",`${n[4]} ${n[4]}`)},i:K,o:K,d(n){n&&V(t)}}}function Cm(i,t,e){let{panoIndex:n}=t,{floorplanData:o}=t,{lastPanoramaLongitude:s}=t,{cameraImageUrl:r}=t;const{observers:a}=o,l=a[n],c=l.positionInImage.x,d=l.positionInImage.y,h=c*100+"%",u=d*100+"%",m=-lh(s)+45,v=document.body.clientWidth,g=document.body.clientHeight,b=`${(v<500||g<500?17:37)/16}rem`;return i.$$set=y=>{"panoIndex"in y&&e(5,n=y.panoIndex),"floorplanData"in y&&e(6,o=y.floorplanData),"lastPanoramaLongitude"in y&&e(7,s=y.lastPanoramaLongitude),"cameraImageUrl"in y&&e(0,r=y.cameraImageUrl)},[r,h,u,m,b,n,o,s]}let Em=class extends ce{constructor(t){super(),le(this,t,Cm,Pm,ae,{panoIndex:5,floorplanData:6,lastPanoramaLongitude:7,cameraImageUrl:0},wm)}};const Im="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAB7CAMAAABdA4ieAAAC91BMVEUAAACOpP/H0P+yxP/a4/+asv/W3/+/z/+cs//S3f+mu//Q2//5+v/H1P/d5f/l6//y9f++zf/i6f+ww/+ovP/7/P/u8v/N2f+Mp//q7/+4yf+uwf+Wr/+7y/+1xv+Ho//x9P+9zP+2x/+swP+gt/+Oqf/Y4v/r8P/l7P/b4//F0/+juf+Zsv+XsP+Trf/p7v97mv9wj/+kuv+ftf/x9P92lf/3+f/I1f+5yv+Eof98m//8/f/4+f90lf+9zf/j6f/T3f/L1/+Bnv/6+/+SrP/m7P/f5v/O2v/L2P/E0v/Az//+///s8P/e5v+rv/+pvv+Anv+qvv+Pqv+Kpv+CoP93l/9xlP/z9v/p7v90lf9uj//P2//v8//o7f/k6v/K1v+6yv9rjv98nv/E0v/9/v/09//h6P/X4f9pjP/9/f/N2f/K1v/C0f+Ho/99nP/1+P9sj//6+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qv8TDOhNUrZC9sdm+Xuu5cpUqvU+wwzYbVVkIXYLHd/olekVpmpZ8KiMYbU7ma/EXJZBW5JrZl2V9bRnNWyWe4xt8TWTPd3FdEYSEFslnsoURlAi01FqN56f2br2xeOe9ytgbyf4nErGg/hl6RN4Jc5Lt++2rVjHMdCIIqiqtoRQW2mMogIyZFjlsB2B9wjjaY1PXa3wcbSPaEDR1fP9fVt8aPai2+f2+TlWu2l0yweZHlEO5S9cyu1lDKj5T/fWCH4jLaUnXMbvFyrzby8xRrayqUM2+ZWqvuM1nmpgHWkl8F9z9yG7LNa5yEMa0n8yHb93Er1oXjnoMVyFn3KQVcP7VRpFn+sDiznaiuHNufsHnkIwy7aPA/r5jbFGW3m7S12ku55WPN7Li1PPIRhN6sjtBjTmm+KmYcwPEOKs9tHF1JDHCoHLZ5DQ8yPBic9DoHjAKvsb85qjbFxHOCprMZaf5qdhlorxwGeTsPIttvPlno0y3GAZfbHp6n3ynGAV0m99u/2J6H3znGAvW4n+J25tdY7xwFey1pvQe6/DlrjOMDLqfXW7N5pbs0YWhxgtpj0rl1uiaHFISzccSWohUCzOIemm0VKChwHOMutKCVwHOA4av/JVi0xtDiRpCRfRcvQ4lBfxSnG0OJc/+xTjKHFyVRMP38iDC0O92lZVRhanO+vcVWGFu9BRWkW7+Z3rapEizdy7ZVm8V5Gtr8AtSnix59eOmYAAAAASUVORK5CYII=";function km(i){fe(i,"svelte-rpkaro",".floorplan-plugin__compass.svelte-rpkaro{position:absolute;left:50%;top:-2.875rem;width:14.4375rem;height:2.5625rem;will-change:opacity;transform-origin:center 11.5rem}.floorplan-plugin__compass-image.svelte-rpkaro{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-rpkaro{position:absolute;left:50%;top:0.9375rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.625rem;color:#fff}")}function xm(i){let t,e,n,o,s;return{c(){t=z("div"),e=z("div"),n=ne(),o=z("span"),s=_e(i[0]),w(e,"class","floorplan-plugin__compass-image svelte-rpkaro"),T(e,"background-image",`url(${Im})`),w(o,"class","floorplan-plugin__compass-text svelte-rpkaro"),w(t,"class","floorplan-plugin__compass svelte-rpkaro"),T(t,"transform",i[2])},m(r,a){j(r,t,a),O(t,e),O(t,n),O(t,o),O(o,s)},p(r,a){a&1&&Oe(s,r[0])},d(r){r&&V(t)}}}function Dm(i){let t,e=i[1]&&xm(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),j(n,t,o)},p(n,[o]){n[1]&&e.p(n,o)},i:K,o:K,d(n){e&&e.d(n),n&&V(t)}}}function Mm(i){return i/Math.PI*180}function Sm(i,t,e){var c;let{floorplanData:n}=t,{northDesc:o}=t;const s=(c=n.entrance)==null?void 0:c.northRad,r=typeof s=="number",l=`translateX(-50%) translateZ(10px) rotate(${-(s?Mm(s):0)+90}deg)`;return i.$$set=d=>{"floorplanData"in d&&e(3,n=d.floorplanData),"northDesc"in d&&e(0,o=d.northDesc)},[o,r,l,n]}class Lm extends ce{constructor(t){super(),le(this,t,Sm,Dm,ae,{floorplanData:3,northDesc:0},km)}}const Wn=[];function ca(i,t=K){let e;const n=new Set;function o(a){if(ae(i,a)&&(i=a,e)){const l=!Wn.length;for(const c of n)c[1](),Wn.push(c,i);if(l){for(let c=0;c<Wn.length;c+=2)Wn[c][0](Wn[c+1]);Wn.length=0}}}function s(a){o(a(i))}function r(a,l=K){const c=[a,l];return n.add(c),n.size===1&&(e=t(o)||K),a(i),()=>{n.delete(c),n.size===0&&e&&(e(),e=null)}}return{set:o,update:s,subscribe:r}}function Tm(i){fe(i,"svelte-1gfoniz","img.svelte-1gfoniz{width:100%;height:100%}")}function zm(i){let t,e;return{c(){t=z("img"),wt(t.src,e=i[0])||w(t,"src",e),w(t,"alt","floorplan iamge"),w(t,"class","svelte-1gfoniz")},m(n,o){j(n,t,o)},p(n,[o]){o&1&&!wt(t.src,e=n[0])&&w(t,"src",e)},i:K,o:K,d(n){n&&V(t)}}}function _m(i,t,e){let{url:n}=t;return i.$$set=o=>{"url"in o&&e(0,n=o.url)},[n]}class Vm extends ce{constructor(t){super(),le(this,t,_m,zm,ae,{url:0},Tm)}}function jm(i){fe(i,"svelte-ub47ya",".floorplan-plugin__base-image.svelte-ub47ya{width:100%;height:100%}")}function Om(i){let t,e,n,o;return{c(){t=z("div"),e=new Go(!1),n=ne(),o=new Go(!1),e.a=n,o.a=null,w(t,"class","floorplan-plugin__base-image svelte-ub47ya")},m(s,r){j(s,t,r),e.m(i[1],t),O(t,n),o.m(i[0],t)},p(s,[r]){r&1&&o.p(s[0])},i:K,o:K,d(s){s&&V(t)}}}function Bm(i,t,e){let{content:n}=t;const o=`
186
186
  <style>
187
187
  svg [type='lineGroup'] path {
188
188
  fill: #ffffff;
@@ -191,7 +191,7 @@ void main() {
191
191
  svg [type='lineItemGroup'] g g g g {
192
192
  stroke: #ffffff;
193
193
  }</style>
194
- `;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class Rm extends ce{constructor(t){super(),le(this,t,Bm,Om,ae,{content:0},Vm)}}function Qm(i){fe(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function Hm(i){let t,e;return t=new _m({props:{url:i[1].url}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Gm(i){let t,e;return t=new Rm({props:{content:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Fm(i){let t,e,n,o;const s=[Gm,Hm],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(i))&&(n=r[e]=s[e](i)),{c(){t=z("div"),n&&n.c(),w(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){V(l,t,c),~e&&r[e].m(t,null),o=!0},p(l,[c]){let d=e;e=a(l),e===d?~e&&r[e].p(l,c):(n&&(de(),L(r[d],1,1,()=>{r[d]=null}),he()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),x(n,1),n.m(t,null)):n=null)},i(l){o||(x(n),o=!0)},o(l){L(n),o=!1},d(l){l&&_(t),~e&&r[e].d()}}}function Wm(i,t,e){let n,o,{floorIndex:s}=t,{floorplanData:r}=t;return i.$$set=a=>{"floorIndex"in a&&e(2,s=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},i.$$.update=()=>{var a,l;i.$$.dirty&12&&e(1,n=r.outlines[s]),i.$$.dirty&12&&e(0,o=(l=(a=r.outlines)==null?void 0:a[s])==null?void 0:l.svgContent)},[o,n,s,r]}class ch extends ce{constructor(t){super(),le(this,t,Wm,Fm,ae,{floorIndex:2,floorplanData:3},Qm)}}function Nm(i){fe(i,"svelte-12pzct5",".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}")}function Xm(i){let t,e=i[8].outerHTML+"",n;return{c(){t=new Go(!1),n=Ee(),t.a=n},m(o,s){t.m(e,o,s),V(o,n,s)},p(o,s){s&256&&e!==(e=o[8].outerHTML+"")&&t.p(e)},d(o){o&&_(n),o&&t.d()}}}function Ym(i){let t,e,n=i[1]&&Fa(i),o=i[0]&&Wa(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=Ee()},m(s,r){n&&n.m(s,r),V(s,t,r),o&&o.m(s,r),V(s,e,r)},p(s,r){s[1]?n?n.p(s,r):(n=Fa(s),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),s[0]?o?o.p(s,r):(o=Wa(s),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(s){n&&n.d(s),s&&_(t),o&&o.d(s),s&&_(e)}}}function Fa(i){let t,e=i[2].name+"",n;return{c(){t=z("span"),n=je(e),w(t,"class","floorplan-plugin__room-name")},m(o,s){V(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[2].name+"")&&Oe(n,e)},d(o){o&&_(t)}}}function Wa(i){let t,e;return{c(){t=z("span"),e=je(i[7]),w(t,"class","floorplan-plugin__room-size svelte-12pzct5")},m(n,o){V(n,t,o),O(t,e)},p(n,o){o&128&&Oe(e,n[7])},d(n){n&&_(t)}}}function Um(i){let t,e,n;function o(a,l){if(a[3]===void 0)return Ym;if(a[8])return Xm}let s=o(i),r=s&&s(i);return{c(){t=z("div"),r&&r.c(),w(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),T(t,"left",i[9]),T(t,"top",i[10]),T(t,"font-size",i[11]),T(t,"opacity",i[6]?"1":"0")},m(a,l){V(a,t,l),r&&r.m(t,null),e||(n=[Ut(vi.call(null,t)),Ce(t,"clientWidth",i[19]),Ce(t,"clientHeight",i[20])],e=!0)},p(a,[l]){s===(s=o(a))&&r?r.p(a,l):(r&&r.d(1),r=s&&s(a),r&&(r.c(),r.m(t,null))),l&64&&T(t,"opacity",a[6]?"1":"0")},i:K,o:K,d(a){a&&_(t),r&&r.d(),e=!1,rt(n)}}}function qm(i,t){const e=i[0],n=i[1];let o=!1;for(let s=0,r=t.length-1;s<t.length;r=s++){const a=t[s][0],l=t[s][1],c=t[r][0],d=t[r][1];l>n!=d>n&&e<(c-a)*(n-l)/(d-l)+a&&(o=!o)}return o}function Jm(i,t,e){let n,o,s,r,a,{pxmm:l}=t,{roomAreaEnable:c}=t,{roomNameEnable:d}=t,{room:h}=t,{hoveredRoom:u}=t,{getRoomAreaText:m}=t,{getLabelElement:v}=t,{adaptiveRoomLabelVisibleEnable:g}=t;function A(Q,G){if(G.width===0||G.height===0)return()=>!1;const B=Q.path.map(({x:we,y:ge})=>[we,ge]),W=Q.roomLabel.position,{x:q,y:U}=W,{width:Z,height:re}=G,oe=Z/2,Ae=re/2;return function(ge){const _e=q*ge,ve=U*ge,Ge=B.map(([be,Se])=>[be*ge,Se*ge]);return[[_e+oe,ve-Ae],[_e-oe,ve-Ae],[_e-oe,ve+Ae],[_e+oe,ve+Ae]].every(be=>qm(be,Ge))}}const b=document.body.clientWidth,y=document.body.clientHeight,E=h.roomLabel,k=E.positionInImage.x*100+"%",S=E.positionInImage.y*100+"%",C=(b<500||y<500?10:14)+"px";let j=0,M=0,X=!1;u.subscribe(function(G){e(16,X=!!G&&G.id===h.id)});const J=Q=>{e(4,j=Q.detail)},H=Q=>{e(5,M=Q.detail)};return i.$$set=Q=>{"pxmm"in Q&&e(12,l=Q.pxmm),"roomAreaEnable"in Q&&e(0,c=Q.roomAreaEnable),"roomNameEnable"in Q&&e(1,d=Q.roomNameEnable),"room"in Q&&e(2,h=Q.room),"hoveredRoom"in Q&&e(13,u=Q.hoveredRoom),"getRoomAreaText"in Q&&e(14,m=Q.getRoomAreaText),"getLabelElement"in Q&&e(3,v=Q.getLabelElement),"adaptiveRoomLabelVisibleEnable"in Q&&e(15,g=Q.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&12&&e(8,n=v==null?void 0:v(h)),i.$$.dirty&16388&&e(7,o=h.size?m(h.size):""),i.$$.dirty&48&&e(18,s={width:j,height:M}),i.$$.dirty&262148&&e(17,r=s?A(h,s):void 0),i.$$.dirty&233472&&e(6,a=g?X?!0:!!(r!=null&&r(l)):!0)},[c,d,h,v,j,M,a,o,n,k,S,C,l,u,m,g,X,r,s,J,H]}class Zm extends ce{constructor(t){super(),le(this,t,Jm,Um,ae,{pxmm:12,roomAreaEnable:0,roomNameEnable:1,room:2,hoveredRoom:13,getRoomAreaText:14,getLabelElement:3,adaptiveRoomLabelVisibleEnable:15},Nm)}}function Km(i){fe(i,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function Na(i,t,e){const n=i.slice();return n[12]=t[e],n}function Xa(i){let t,e=[],n=new Map,o,s,r,a=i[8];const l=c=>c[12].id;for(let c=0;c<a.length;c+=1){let d=Na(i,a,c),h=l(d);n.set(h,e[c]=Ya(h,d))}return{c(){t=z("div");for(let c=0;c<e.length;c+=1)e[c].c();w(t,"class","floorplan-plugin__room-labels svelte-13xux0b")},m(c,d){V(c,t,d);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);o=!0,s||(r=[Ut(vi.call(null,t)),Ce(t,"clientWidth",i[11])],s=!0)},p(c,d){d&447&&(a=c[8],de(),e=St(e,d,l,1,c,a,n,t,un,Ya,null,Na),he())},i(c){if(!o){for(let d=0;d<a.length;d+=1)x(e[d]);o=!0}},o(c){for(let d=0;d<e.length;d+=1)L(e[d]);o=!1},d(c){c&&_(t);for(let d=0;d<e.length;d+=1)e[d].d();s=!1,rt(r)}}}function Ya(i,t){let e,n,o;const s=[{pxmm:t[7],room:t[12],hoveredRoom:t[2],roomAreaEnable:t[0],roomNameEnable:t[1],getLabelElement:t[4],getRoomAreaText:t[3],adaptiveRoomLabelVisibleEnable:t[5]}];let r={};for(let a=0;a<s.length;a+=1)r=Ze(r,s[a]);return n=new Zm({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){V(a,e,l),ee(n,a,l),o=!0},p(a,l){t=a;const c=l&447?st(s,[{pxmm:t[7],room:t[12],hoveredRoom:t[2],roomAreaEnable:t[0],roomNameEnable:t[1],getLabelElement:t[4],getRoomAreaText:t[3],adaptiveRoomLabelVisibleEnable:t[5]}]):{};n.$set(c)},i(a){o||(x(n.$$.fragment,a),o=!0)},o(a){L(n.$$.fragment,a),o=!1},d(a){a&&_(e),te(n,a)}}}function $m(i){let t,e,n=i[8]&&Xa(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[8]?n?(n.p(o,s),s&256&&x(n,1)):(n=Xa(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function ep(i,t,e){let n,{floorIndex:o}=t,{roomAreaEnable:s}=t,{roomNameEnable:r}=t,{floorplanData:a}=t,{hoveredRoom:l}=t,{getRoomAreaText:c}=t,{getLabelElement:d}=t,{adaptiveRoomLabelVisibleEnable:h}=t,u=0,m=0;const v=g=>{e(6,u=g.detail)};return i.$$set=g=>{"floorIndex"in g&&e(9,o=g.floorIndex),"roomAreaEnable"in g&&e(0,s=g.roomAreaEnable),"roomNameEnable"in g&&e(1,r=g.roomNameEnable),"floorplanData"in g&&e(10,a=g.floorplanData),"hoveredRoom"in g&&e(2,l=g.hoveredRoom),"getRoomAreaText"in g&&e(3,c=g.getRoomAreaText),"getLabelElement"in g&&e(4,d=g.getLabelElement),"adaptiveRoomLabelVisibleEnable"in g&&e(5,h=g.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&1536&&e(8,n=a.floorDatas[o].rooms),i.$$.dirty&1088){const{max:g,min:A}=a.bounding,b=g.x-A.x;e(7,m=u/b)}},[s,r,l,c,d,h,u,m,n,o,a,v]}class tp extends ce{constructor(t){super(),le(this,t,ep,$m,ae,{floorIndex:9,roomAreaEnable:0,roomNameEnable:1,floorplanData:10,hoveredRoom:2,getRoomAreaText:3,getLabelElement:4,adaptiveRoomLabelVisibleEnable:5},Km)}}function np(i){fe(i,"svelte-djlmk4",".floorplan-plugin__rule-labels.svelte-djlmk4.svelte-djlmk4{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-djlmk4.svelte-djlmk4{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4.svelte-djlmk4{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4.svelte-djlmk4{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4.svelte-djlmk4{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-djlmk4.svelte-djlmk4{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale-wrapper.svelte-djlmk4{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-djlmk4.svelte-djlmk4{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale.svelte-djlmk4{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute}.floorplan-plugin__rule-labels--top.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-djlmk4.svelte-djlmk4{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-text-item.svelte-djlmk4{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-djlmk4.svelte-djlmk4{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}")}function Ua(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function qa(i,t,e){const n=i.slice();return n[14]=t[e],n}function Ja(i){let t;return{c(){t=z("div"),w(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),T(t,"left",i[14].left*100+"%"),T(t,"bottom",i[14].bottom*100+"%")},m(e,n){V(e,t,n)},p:K,d(e){e&&_(t)}}}function Za(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=z("div"),n=z("div"),s=je(o),r=ne(),w(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),$(n,"is-row",t[2]),w(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),T(e,"left",t[11].left*100+"%"),T(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){V(a,e,l),O(e,n),O(n,s),O(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&Oe(s,o)},d(a){a&&_(e)}}}function ip(i){let t,e,n,o,s,r,a=[],l=new Map,c,d=i[3],h=[];for(let v=0;v<d.length;v+=1)h[v]=Ja(qa(i,d,v));let u=i[4];const m=v=>v[13];for(let v=0;v<u.length;v+=1){let g=Ua(i,u,v),A=m(g);l.set(A,a[v]=Za(A,g))}return{c(){t=z("div"),e=z("div"),n=ne(),o=z("div");for(let v=0;v<h.length;v+=1)h[v].c();s=ne(),r=z("div");for(let v=0;v<a.length;v+=1)a[v].c();w(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),w(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),$(o,"is-row",i[2]),w(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),w(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+i[0]+" svelte-djlmk4"),$(t,"is-row",i[2]),T(t,"width",i[2]?"100%":1/16+"rem"),T(t,"height",i[2]?1/16+"rem":"100%")},m(v,g){V(v,t,g),O(t,e),O(t,n),O(t,o);for(let A=0;A<h.length;A+=1)h[A]&&h[A].m(o,null);O(t,s),O(t,r);for(let A=0;A<a.length;A+=1)a[A]&&a[A].m(r,null)},p(v,[g]){if(g&8){d=v[3];let A;for(A=0;A<d.length;A+=1){const b=qa(v,d,A);h[A]?h[A].p(b,g):(h[A]=Ja(b),h[A].c(),h[A].m(o,null))}for(;A<h.length;A+=1)h[A].d(1);h.length=d.length}g&22&&(u=v[4],a=St(a,g,m,1,v,u,l,r,aa,Za,null,Ua)),g&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+v[0]+" svelte-djlmk4")&&w(t,"class",c),g&5&&$(t,"is-row",v[2])},i:K,o:K,d(v){v&&_(t),qt(h,v);for(let g=0;g<a.length;g+=1)a[g].d()}}}const Nn=1e3,Xn=180;function op(i,t,e){let{type:n}=t,{data:o}=t,{bounding:s}=t,{getRuleDistanceText:r}=t;const a=n==="top"||n==="bottom",l=s.max.x-s.min.x-(Nn-Xn)*2,c=s.max.y-s.min.y-(Nn-Xn)*2,d=o.map(([v,g])=>a?[v.x,g.x]:[v.y,g.y]).flat().sort().filter((v,g,A)=>g===0?!0:v!==A[g-1]),h=d.map(v=>{const g=a?(v-s.min.x-Nn+Xn)/l:0,A=a?0:(v-s.min.y-Nn+Xn)/c;return{left:g,bottom:A}});h.unshift({left:0,bottom:0}),h.push(a?{left:1,bottom:0}:{left:0,bottom:1});const u=d[d.length-1]-d[0],m=d.map((v,g,A)=>{const b=g===0?0:v-A[g-1],y=g===0?0:(v+A[g-1])/2,E=a?(y-s.min.x-Nn+Xn)/l:0,k=a?0:(y-s.min.y-Nn+Xn)/c;return{left:E,bottom:k,distance:b}}).filter(({distance:v})=>v/u>.1);return i.$$set=v=>{"type"in v&&e(0,n=v.type),"data"in v&&e(5,o=v.data),"bounding"in v&&e(6,s=v.bounding),"getRuleDistanceText"in v&&e(1,r=v.getRuleDistanceText)},[n,r,a,h,m,o,s]}class sp extends ce{constructor(t){super(),le(this,t,op,ip,ae,{type:0,data:5,bounding:6,getRuleDistanceText:1},np)}}function rp(i){fe(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function Ka(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function $a(i,t){let e,n,o;const s=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<s.length;a+=1)r=Ze(r,s[a]);return n=new sp({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){V(a,e,l),ee(n,a,l),o=!0},p(a,l){t=a;const c=l&19?st(s,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};n.$set(c)},i(a){o||(x(n.$$.fragment,a),o=!0)},o(a){L(n.$$.fragment,a),o=!1},d(a){a&&_(e),te(n,a)}}}function ap(i){let t,e=[],n=new Map,o,s=i[4];const r=a=>a[13];for(let a=0;a<s.length;a+=1){let l=Ka(i,s,a),c=r(l);n.set(c,e[a]=$a(c,l))}return{c(){t=z("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),T(t,"width",i[3]),T(t,"height",i[2])},m(a,l){V(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);o=!0},p(a,[l]){l&19&&(s=a[4],de(),e=St(e,l,r,1,a,s,n,t,un,$a,null,Ka),he()),l&8&&T(t,"width",a[3]),l&4&&T(t,"height",a[2])},i(a){if(!o){for(let l=0;l<s.length;l+=1)x(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)L(e[l]);o=!1},d(a){a&&_(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const el=1e3,tl=180;function lp(i,t,e){let n,o,s,r,a,l,c,d,h,u,{floorIndex:m}=t,{floorplanData:v}=t,{getRuleDistanceText:g}=t;return i.$$set=A=>{"floorIndex"in A&&e(5,m=A.floorIndex),"floorplanData"in A&&e(6,v=A.floorplanData),"getRuleDistanceText"in A&&e(0,g=A.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=v.bounding),i.$$.dirty&96&&e(11,o=v.floorDatas[m].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(A=>[A,o[A]])),i.$$.dirty&2&&e(9,a=n.max.x-n.min.x),i.$$.dirty&2&&e(7,l=n.max.y-n.min.y),i.$$.dirty&2&&e(10,c=n.max.x-n.min.x-(el-tl)*2),i.$$.dirty&2&&e(8,d=n.max.y-n.min.y-(el-tl)*2),i.$$.dirty&1536&&e(3,h=c/a*100+"%"),i.$$.dirty&384&&e(2,u=d/l*100+"%")},[g,n,u,h,r,m,v,l,d,a,c,o,s]}class cp extends ce{constructor(t){super(),le(this,t,lp,ap,ae,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},rp)}}function us(i,t={}){let e="";const{needZ:n,needA:o}=t;return(n?i.slice().concat(i[0]):i.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,d=l+","+c;return a===0?(e+="M"+d,e):o!=null&&o[a]?(e+="A"+o[a]+","+d,e):(e+="L"+d,e)}),e+(n?"Z":"")}function dh({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function dp(i,t){const e=i.x*1e3+t.bounding.origin.x,n=-i.z*1e3+t.bounding.origin.y;return{x:e,y:n}}function hp(i,t){const e=t.bounding,n=e.max.x-e.min.x,o=e.max.y-e.min.y;return{x:(i.x-e.min.x)/n,y:(e.max.y-i.y)/o}}function up(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function fp(i){let t;return{c(){t=Te("path"),w(t,"d",i[0]),w(t,"fill","#2F313A")},m(e,n){V(e,t,n)},p(e,[n]){n&1&&w(t,"d",e[0])},i:K,o:K,d(e){e&&_(t)}}}function mp(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=us(o,{needZ:!0}))},[n,o]}class pp extends ce{constructor(t){super(),le(this,t,mp,fp,ae,{path:1})}}function gp(i){let t,e,n,o,s,r;return{c(){t=Te("defs"),e=Te("pattern"),n=Te("rect"),o=Te("path"),s=ne(),r=Te("path"),w(n,"x","0"),w(n,"y","0"),w(n,"width",i[1]),w(n,"height",i[1]),w(n,"fill","#323747"),w(o,"d",i[2]),w(o,"stroke","#ffffff"),w(o,"stroke-opacity","0.06"),w(o,"stroke-width","0.5"),w(o,"fill","none"),w(e,"id","fpm-room-pattern-0"),w(e,"x","0"),w(e,"y","0"),w(e,"width",i[1]),w(e,"height",i[1]),w(e,"patternUnits","userSpaceOnUse"),w(e,"patternTransform","scale(50 50)"),w(r,"d",i[0]),w(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){V(a,t,l),O(t,e),O(e,n),O(e,o),V(a,s,l),V(a,r,l)},p(a,[l]){l&1&&w(r,"d",a[0])},i:K,o:K,d(a){a&&_(t),a&&_(s),a&&_(r)}}}const fr=6;function vp(i,t,e){let n,{path:o}=t;const s=fr*2,r=`M0 ${fr} h ${s} M${fr} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=us(o,{needZ:!0}))},[n,s,r,o]}class Ap extends ce{constructor(t){super(),le(this,t,vp,gp,ae,{path:3})}}function bp(i){let t,e,n,o,s,r,a,l,c,d,h;return{c(){t=Te("defs"),e=Te("pattern"),n=Te("rect"),o=Te("pattern"),s=Te("rect"),r=ne(),a=Te("path"),l=ne(),c=Te("path"),d=ne(),h=Te("path"),w(n,"x","0"),w(n,"y","0"),w(n,"width","6"),w(n,"height","50"),w(n,"fill","none"),w(n,"stroke","#4B4B57"),w(n,"stroke-width","0.5"),w(e,"id","room-material-pattern-1"),w(e,"x","0"),w(e,"y","0"),w(e,"width","12"),w(e,"height","50"),w(e,"patternUnits","userSpaceOnUse"),w(e,"patternTransform","scale(50 50)"),w(s,"x","0"),w(s,"y","0"),w(s,"width","6"),w(s,"height","50"),w(s,"fill","none"),w(s,"stroke","#4B4B57"),w(s,"stroke-width","0.5"),w(o,"id","room-material-pattern-2"),w(o,"x","6"),w(o,"y","25"),w(o,"width","12"),w(o,"height","50"),w(o,"patternUnits","userSpaceOnUse"),w(o,"patternTransform","scale(50 50)"),w(a,"d",i[0]),w(a,"fill","#43434D"),w(c,"d",i[0]),w(c,"fill","url(#room-material-pattern-1)"),w(h,"d",i[0]),w(h,"fill","url(#room-material-pattern-2)")},m(u,m){V(u,t,m),O(t,e),O(e,n),O(t,o),O(o,s),V(u,r,m),V(u,a,m),V(u,l,m),V(u,c,m),V(u,d,m),V(u,h,m)},p(u,[m]){m&1&&w(a,"d",u[0]),m&1&&w(c,"d",u[0]),m&1&&w(h,"d",u[0])},i:K,o:K,d(u){u&&_(t),u&&_(r),u&&_(a),u&&_(l),u&&_(c),u&&_(d),u&&_(h)}}}function yp(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=us(o,{needZ:!0}))},[n,o]}class wp extends ce{constructor(t){super(),le(this,t,yp,bp,ae,{path:1})}}function Pp(i){fe(i,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function nl(i,t,e){const n=i.slice();return n[5]=t[e],n}function Cp(i){let t,e;return t=new Ap({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Ep(i){let t,e;return t=new wp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Ip(i){let t,e;return t=new pp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function il(i){let t,e,n,o;const s=[Ip,Ep,Cp],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=Te("svg"),n.c(),w(t,"width","100%"),w(t,"height","100%"),w(t,"viewBox",`0 0 ${i[1]} ${i[2]}`),w(t,"class","svelte-1dykexu")},m(l,c){V(l,t,c),r[e].m(t,null),o=!0},p(l,c){let d=e;e=a(l),e===d?r[e].p(l,c):(de(),L(r[d],1,1,()=>{r[d]=null}),he(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),x(n,1),n.m(t,null))},i(l){o||(x(n),o=!0)},o(l){L(n),o=!1},d(l){l&&_(t),r[e].d()}}}function kp(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=il(nl(i,n,r));const s=r=>L(o[r],1,1,()=>{o[r]=null});return{c(){t=z("div");for(let r=0;r<o.length;r+=1)o[r].c();w(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){V(r,t,a);for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(t,null);e=!0},p(r,[a]){if(a&7){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=nl(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=il(c),o[l].c(),x(o[l],1),o[l].m(t,null))}for(de(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)x(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)L(o[a]);e=!1},d(r){r&&_(t),qt(o,r)}}}function xp(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t;const r=s.bounding.max.x-s.bounding.min.x,a=s.bounding.max.y-s.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(3,o=l.floorIndex),"floorplanData"in l&&e(4,s=l.floorplanData)},i.$$.update=()=>{i.$$.dirty&24&&e(0,n=s.floorDatas[o].rooms.map(l=>ye(F({},l),{path:l.path.map(c=>dh(c,s.bounding))})))},[n,r,a,o,s]}class Dp extends ce{constructor(t){super(),le(this,t,xp,kp,ae,{floorIndex:3,floorplanData:4},Pp)}}function Mp(i){fe(i,"svelte-qq2273","path.svelte-qq2273{--opacity:0;opacity:var(--opacity)}path.svelte-qq2273:hover{opacity:calc(var(--opacity) + 0.1)}")}function Sp(i){let t,e,n,o;return{c(){t=Te("path"),w(t,"d",i[5]),w(t,"fill","#fff"),w(t,"style",i[2]),w(t,"id",e=`${i[1]}_${i[0].id}`),w(t,"class","svelte-qq2273")},m(s,r){V(s,t,r),n||(o=[Ce(t,"mouseenter",i[3]),Ce(t,"mouseleave",i[4])],n=!0)},p(s,[r]){r&4&&w(t,"style",s[2]),r&3&&e!==(e=`${s[1]}_${s[0].id}`)&&w(t,"id",e)},i:K,o:K,d(s){s&&_(t),n=!1,rt(o)}}}function Lp(i,t,e){let n,o,{room:s}=t,{floorIndex:r}=t,{floorplanData:a}=t,{highlightData:l}=t,{hoveredRoom:c}=t;function d(){c==null||c.set(s)}function h(){c==null||c.set(void 0)}const{bounding:u}=a,m=us(s.path,{needZ:!0,format:v=>dh(v,u)});return i.$$set=v=>{"room"in v&&e(0,s=v.room),"floorIndex"in v&&e(1,r=v.floorIndex),"floorplanData"in v&&e(6,a=v.floorplanData),"highlightData"in v&&e(7,l=v.highlightData),"hoveredRoom"in v&&e(8,c=v.hoveredRoom)},i.$$.update=()=>{i.$$.dirty&131&&e(9,n=l[`${r}_${s.id}`]),i.$$.dirty&512&&e(2,o=n?`fill: ${n.color}; --opacity: ${n.opacity}; pointer-events: ${n.disabled?"none":"auto"}`:null)},[s,r,o,d,h,m,a,l,c,n]}class Tp extends ce{constructor(t){super(),le(this,t,Lp,Sp,ae,{room:0,floorIndex:1,floorplanData:6,highlightData:7,hoveredRoom:8},Mp)}}function zp(i){fe(i,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function ol(i,t,e){const n=i.slice();return n[6]=t[e],n}function sl(i,t){let e,n,o;const s=[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}];let r={};for(let a=0;a<s.length;a+=1)r=Ze(r,s[a]);return n=new Tp({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){V(a,e,l),ee(n,a,l),o=!0},p(a,l){t=a;const c=l&15?st(s,[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}]):{};n.$set(c)},i(a){o||(x(n.$$.fragment,a),o=!0)},o(a){L(n.$$.fragment,a),o=!1},d(a){a&&_(e),te(n,a)}}}function jp(i){let t,e,n=[],o=new Map,s,r=i[1].floorDatas[i[0]].rooms;const a=l=>l[6].id;for(let l=0;l<r.length;l+=1){let c=ol(i,r,l),d=a(c);o.set(d,n[l]=sl(d,c))}return{c(){t=z("div"),e=Te("svg");for(let l=0;l<n.length;l+=1)n[l].c();w(e,"width","100%"),w(e,"height","100%"),w(e,"viewBox",`0 0 ${i[4]} ${i[5]}`),w(e,"class","svelte-1kqo6e4"),w(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){V(l,t,c),O(t,e);for(let d=0;d<n.length;d+=1)n[d]&&n[d].m(e,null);s=!0},p(l,[c]){c&15&&(r=l[1].floorDatas[l[0]].rooms,de(),n=St(n,c,a,1,l,r,o,e,un,sl,null,ol),he())},i(l){if(!s){for(let c=0;c<r.length;c+=1)x(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)L(n[c]);s=!1},d(l){l&&_(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function _p(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{highlightData:s}=t,{hoveredRoom:r}=t;const a=o.bounding.max.x-o.bounding.min.x,l=o.bounding.max.y-o.bounding.min.y;return i.$$set=c=>{"floorIndex"in c&&e(0,n=c.floorIndex),"floorplanData"in c&&e(1,o=c.floorplanData),"highlightData"in c&&e(2,s=c.highlightData),"hoveredRoom"in c&&e(3,r=c.hoveredRoom)},[n,o,s,r,a,l]}class hh extends ce{constructor(t){super(),le(this,t,_p,jp,ae,{floorIndex:0,floorplanData:1,highlightData:2,hoveredRoom:3},zp)}}function Vp(i){fe(i,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function rl(i){let t,e;const n=[{floorIndex:i[1],floorplanData:i[8],hoveredRoom:i[14],highlightData:i[13]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new hh({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&24834?st(n,[{floorIndex:s[1],floorplanData:s[8],hoveredRoom:s[14],highlightData:s[13]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function al(i){let t,e;const n=[{floorplanData:i[8],roomAreaEnable:i[5],roomNameEnable:i[6],floorIndex:i[1],getRoomAreaText:i[9],getLabelElement:i[10],hoveredRoom:i[14],adaptiveRoomLabelVisibleEnable:i[12]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new tp({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&22370?st(n,[{floorplanData:s[8],roomAreaEnable:s[5],roomNameEnable:s[6],floorIndex:s[1],getRoomAreaText:s[9],getLabelElement:s[10],hoveredRoom:s[14],adaptiveRoomLabelVisibleEnable:s[12]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function ll(i){let t,e;const n=[{floorplanData:i[8],floorIndex:i[1],getRuleDistanceText:i[11]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new cp({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&2306?st(n,[{floorplanData:s[8],floorIndex:s[1],getRuleDistanceText:s[11]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function Op(i){let t,e,n,o,s,r,a,l,c;const d=[{floorIndex:i[1],floorplanData:i[8]}];let h={};for(let b=0;b<d.length;b+=1)h=Ze(h,d[b]);e=new Dp({props:h});let u=(i[2]||i[3])&&rl(i);const m=[{floorplanData:i[8],floorIndex:i[1]}];let v={};for(let b=0;b<m.length;b+=1)v=Ze(v,m[b]);s=new ch({props:v});let g=i[4]&&al(i),A=i[7]&&ll(i);return{c(){t=z("div"),ie(e.$$.fragment),n=ne(),u&&u.c(),o=ne(),ie(s.$$.fragment),r=ne(),g&&g.c(),a=ne(),A&&A.c(),w(t,"class",l=Be(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(b,y){V(b,t,y),ee(e,t,null),O(t,n),u&&u.m(t,null),O(t,o),ee(s,t,null),O(t,r),g&&g.m(t,null),O(t,a),A&&A.m(t,null),c=!0},p(b,[y]){const E=y&258?st(d,[{floorIndex:b[1],floorplanData:b[8]}]):{};e.$set(E),b[2]||b[3]?u?(u.p(b,y),y&12&&x(u,1)):(u=rl(b),u.c(),x(u,1),u.m(t,o)):u&&(de(),L(u,1,1,()=>{u=null}),he());const k=y&258?st(m,[{floorplanData:b[8],floorIndex:b[1]}]):{};s.$set(k),b[4]?g?(g.p(b,y),y&16&&x(g,1)):(g=al(b),g.c(),x(g,1),g.m(t,a)):g&&(de(),L(g,1,1,()=>{g=null}),he()),b[7]?A?(A.p(b,y),y&128&&x(A,1)):(A=ll(b),A.c(),x(A,1),A.m(t,null)):A&&(de(),L(A,1,1,()=>{A=null}),he()),(!c||y&1&&l!==(l=Be(`floorplan-plugin__floor${b[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&w(t,"class",l)},i(b){c||(x(e.$$.fragment,b),x(u),x(s.$$.fragment,b),x(g),x(A),c=!0)},o(b){L(e.$$.fragment,b),L(u),L(s.$$.fragment,b),L(g),L(A),c=!1},d(b){b&&_(t),te(e),u&&u.d(),te(s),g&&g.d(),A&&A.d()}}}function Bp(i,t,e){let{isCurrent:n}=t,{floorIndex:o}=t,{highlightEnable:s}=t,{hoverEnable:r}=t,{roomLabelsEnable:a}=t,{roomAreaEnable:l}=t,{roomNameEnable:c}=t,{ruleLabelsEnable:d}=t,{floorplanData:h}=t,{getRoomAreaText:u}=t,{getLabelElement:m}=t,{getRuleDistanceText:v}=t,{adaptiveRoomLabelVisibleEnable:g}=t,{highlightData:A}=t;const b=ca(void 0);return i.$$set=y=>{"isCurrent"in y&&e(0,n=y.isCurrent),"floorIndex"in y&&e(1,o=y.floorIndex),"highlightEnable"in y&&e(2,s=y.highlightEnable),"hoverEnable"in y&&e(3,r=y.hoverEnable),"roomLabelsEnable"in y&&e(4,a=y.roomLabelsEnable),"roomAreaEnable"in y&&e(5,l=y.roomAreaEnable),"roomNameEnable"in y&&e(6,c=y.roomNameEnable),"ruleLabelsEnable"in y&&e(7,d=y.ruleLabelsEnable),"floorplanData"in y&&e(8,h=y.floorplanData),"getRoomAreaText"in y&&e(9,u=y.getRoomAreaText),"getLabelElement"in y&&e(10,m=y.getLabelElement),"getRuleDistanceText"in y&&e(11,v=y.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in y&&e(12,g=y.adaptiveRoomLabelVisibleEnable),"highlightData"in y&&e(13,A=y.highlightData)},[n,o,s,r,a,l,c,d,h,u,m,v,g,A,b]}let Rp=class extends ce{constructor(t){super(),le(this,t,Bp,Op,ae,{isCurrent:0,floorIndex:1,highlightEnable:2,hoverEnable:3,roomLabelsEnable:4,roomAreaEnable:5,roomNameEnable:6,ruleLabelsEnable:7,floorplanData:8,getRoomAreaText:9,getLabelElement:10,getRuleDistanceText:11,adaptiveRoomLabelVisibleEnable:12,highlightData:13},Vp)}};function Qp(i){fe(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function cl(i,t,e){const n=i.slice();return n[21]=t[e],n}function dl(i){let t,e,n,o,s,r=i[13].floorDatas,a=[];for(let h=0;h<r.length;h+=1)a[h]=hl(cl(i,r,h));const l=h=>L(a[h],1,1,()=>{a[h]=null});let c=i[5]&&ul(i),d=i[8]&&fl(i);return{c(){t=z("div");for(let h=0;h<a.length;h+=1)a[h].c();e=ne(),c&&c.c(),n=ne(),d&&d.c(),w(t,"class","floorplan-main svelte-86bqav")},m(h,u){V(h,t,u);for(let m=0;m<a.length;m+=1)a[m]&&a[m].m(t,null);O(t,e),c&&c.m(t,null),O(t,n),d&&d.m(t,null),s=!0},p(h,u){if(i=h,u&2047696){r=i[13].floorDatas;let m;for(m=0;m<r.length;m+=1){const v=cl(i,r,m);a[m]?(a[m].p(v,u),x(a[m],1)):(a[m]=hl(v),a[m].c(),x(a[m],1),a[m].m(t,e))}for(de(),m=r.length;m<a.length;m+=1)l(m);he()}i[5]?c?(c.p(i,u),u&32&&x(c,1)):(c=ul(i),c.c(),x(c,1),c.m(t,n)):c&&(de(),L(c,1,1,()=>{c=null}),he()),i[8]?d?(d.p(i,u),u&256&&x(d,1)):(d=fl(i),d.c(),x(d,1),d.m(t,null)):d&&(de(),L(d,1,1,()=>{d=null}),he())},i(h){if(!s){for(let u=0;u<r.length;u+=1)x(a[u]);x(c),x(d),o||ot(()=>{o=Dn(t,In,{duration:i[0],easing:sn}),o.start()}),s=!0}},o(h){a=a.filter(Boolean);for(let u=0;u<a.length;u+=1)L(a[u]);L(c),L(d),s=!1},d(h){h&&_(t),qt(a,h),c&&c.d(),d&&d.d()}}}function hl(i){let t,e;const n=[{hoverEnable:i[6],highlightEnable:i[7],floorplanData:i[13],getRoomAreaText:i[16],getLabelElement:i[17],getRuleDistanceText:i[18],roomLabelsEnable:i[9],roomAreaEnable:i[10],roomNameEnable:i[11],ruleLabelsEnable:i[12],adaptiveRoomLabelVisibleEnable:i[19],highlightData:i[20]},{floorIndex:i[21].floorIndex},{isCurrent:i[21].floorIndex===i[4]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new Rp({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&2047696?st(n,[r&2047680&&{hoverEnable:s[6],highlightEnable:s[7],floorplanData:s[13],getRoomAreaText:s[16],getLabelElement:s[17],getRuleDistanceText:s[18],roomLabelsEnable:s[9],roomAreaEnable:s[10],roomNameEnable:s[11],ruleLabelsEnable:s[12],adaptiveRoomLabelVisibleEnable:s[19],highlightData:s[20]},r&8192&&{floorIndex:s[21].floorIndex},r&8208&&{isCurrent:s[21].floorIndex===s[4]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function ul(i){let t,e;const n=[{panoIndex:i[3],floorplanData:i[13],lastPanoramaLongitude:i[14],cameraImageUrl:i[15]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new Em({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&57352?st(n,[{panoIndex:s[3],floorplanData:s[13],lastPanoramaLongitude:s[14],cameraImageUrl:s[15]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function fl(i){let t,e;return t=new Lm({props:{floorplanData:i[13],northDesc:i[2]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&8192&&(s.floorplanData=n[13]),o&4&&(s.northDesc=n[2]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Hp(i){let t,e,n=i[1]&&dl(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=dl(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function Gp(i,t,e){let{duration:n=0}=t,{visible:o}=t,{northDesc:s}=t,{panoIndex:r}=t,{floorIndex:a}=t,{cameraEnable:l}=t,{hoverEnable:c}=t,{highlightEnable:d}=t,{compassEnable:h}=t,{roomLabelsEnable:u}=t,{roomAreaEnable:m}=t,{roomNameEnable:v}=t,{ruleLabelsEnable:g}=t,{floorplanData:A}=t,{lastPanoramaLongitude:b}=t,{cameraImageUrl:y}=t,{getRoomAreaText:E}=t,{getLabelElement:k}=t,{getRuleDistanceText:S}=t,{adaptiveRoomLabelVisibleEnable:C}=t,{highlightData:j}=t;return i.$$set=M=>{"duration"in M&&e(0,n=M.duration),"visible"in M&&e(1,o=M.visible),"northDesc"in M&&e(2,s=M.northDesc),"panoIndex"in M&&e(3,r=M.panoIndex),"floorIndex"in M&&e(4,a=M.floorIndex),"cameraEnable"in M&&e(5,l=M.cameraEnable),"hoverEnable"in M&&e(6,c=M.hoverEnable),"highlightEnable"in M&&e(7,d=M.highlightEnable),"compassEnable"in M&&e(8,h=M.compassEnable),"roomLabelsEnable"in M&&e(9,u=M.roomLabelsEnable),"roomAreaEnable"in M&&e(10,m=M.roomAreaEnable),"roomNameEnable"in M&&e(11,v=M.roomNameEnable),"ruleLabelsEnable"in M&&e(12,g=M.ruleLabelsEnable),"floorplanData"in M&&e(13,A=M.floorplanData),"lastPanoramaLongitude"in M&&e(14,b=M.lastPanoramaLongitude),"cameraImageUrl"in M&&e(15,y=M.cameraImageUrl),"getRoomAreaText"in M&&e(16,E=M.getRoomAreaText),"getLabelElement"in M&&e(17,k=M.getLabelElement),"getRuleDistanceText"in M&&e(18,S=M.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in M&&e(19,C=M.adaptiveRoomLabelVisibleEnable),"highlightData"in M&&e(20,j=M.highlightData)},[n,o,s,r,a,l,c,d,h,u,m,v,g,A,b,y,E,k,S,C,j]}let da=class extends ce{constructor(t){super(),le(this,t,Gp,Hp,ae,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,cameraEnable:5,hoverEnable:6,highlightEnable:7,compassEnable:8,roomLabelsEnable:9,roomAreaEnable:10,roomNameEnable:11,ruleLabelsEnable:12,floorplanData:13,lastPanoramaLongitude:14,cameraImageUrl:15,getRoomAreaText:16,getLabelElement:17,getRuleDistanceText:18,adaptiveRoomLabelVisibleEnable:19,highlightData:20},Qp)}};const Fp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7Ai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grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function Wp(i){return Y(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return Y(this,null,function*(){const s={index:o.index,url:o.url,svgUrl:o.svg_url};if(o.svg_url){const r=yield fetch(o.svg_url,{headers:t}).then(a=>a.text());s.svgContent=r}return s})};return yield Promise.all(i.map(e))})}function Np(i){return{id:i.id,size:i.size,name:i.name,path:i.path,roomType:i.room_type,floorType:i.floor_type,roomLabel:{position:i.room_label.position,positionInImage:i.room_label.position_in_image},observerIndexs:i.observer_indexs}}function Xp(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Np),rules:i.rules}}function Yp(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function Up(i){return{rad:i.rad,position:i.position,positionInImage:i.position_in_image,northRad:i.north_rad,roomId:i.room_id,floorIndex:i.floor_index}}function ln(i){return Y(this,null,function*(){const t=yield Wp(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Xp),o=i.computed_data.entrance?Up(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(Yp)}})}function qp(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:Fp,width:45,height:48},a=up(s,t),l=dp(s,e),c=hp(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function Jp(i,t){return t(i),i}function fs(i,t){return Jp({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function ml(i,t){const e=Math.max(...i.work.observers.map(n=>n.floorIndex));return t>e?i.model.bounding.max.y:Math.max(...i.work.observers.filter(n=>n.floorIndex===t).map(n=>n.standingPosition.y))}function ha(i,t,e=nn.BOUNDING_CENTER){const n=ml(i,t),o=ml(i,t+1);return e===nn.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===nn.CEILING?o:n}function ua(i,t,e,n){const o=ha(i,e,n==null?void 0:n.attachedTo),s=new I.Vector3(0,o,0),r=new I.Vector3(1,o,0),a=s.clone().project(i.camera),l=r.clone().project(i.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}let eo=class{constructor(t,e){f(this,"VERSION","2.20.6");f(this,"five");f(this,"hooks",new li);f(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}isAbsoluteURL(t){return na(t)?t:`${this.staticPrefix}${t}`}},Mn=class extends eo{};var At=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(At||{});const uh=500,Zp=80;function Qr(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function fa(i,t){return Y(this,null,function*(){const[e]=yield ii(i.changeMode(...t));if(e)throw new Error("change mode canceled");yield new Promise(r=>{i.once("initAnimationWillStart",()=>{i.once("initAnimationEnded",()=>r())})});const n=t[1];if(!n)return!0;const o=i.getCurrentState();if(!Kp(n,o))throw new Error("pose 与预期不符")})}function Kp(i,t){return Object.keys(i).every(e=>{const n=t[e];if(n===void 0)return!0;const o=i[e];return typeof n=="number"&&typeof o=="number"?Qr(n,o,2):n===o})}function ma(i,t){if(i.currentMode!==t.mode)return!1;const{latitude:e,longitude:n,fov:o}=t,{latitude:s,longitude:r}=i.getCurrentState(),a=i.camera.fov;return!(!Qr(e,s,2)||!Qr(n,r,2)||o!==a)}function fh(i,t,e=!0){return Y(this,null,function*(){if(ma(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[d]=yield ii(fa(i,[t.mode,t,void 0,e]));if(d)throw new Error(At.ChangeModeError);return}const{latitude:s,longitude:r,fov:a}=o,l=Math.min(1e3,Math.max(200,Math.abs(s-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,Math.abs(a-t.fov)*10)),[c]=yield ii(i.updateCamera(t,l,e));if(c)throw new Error(At.UpdateCameraError)})}function si(i,t,e=300){const n=i.getElement();n&&(n.style.opacity=t+"",n.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(o=>n.addEventListener("transitionend",o,{once:!0})),new Promise(o=>setTimeout(o,e))]).then(()=>{n.style.transition="none"}))}function $p(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function eg(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}let tg=class extends Mn{constructor(e,n){var a;super(e);f(this,"name","modelFloorplanPlugin");f(this,"state");f(this,"data");f(this,"showState");f(this,"showPromise");f(this,"app");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"selector");f(this,"showRejection");f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"show",(...n)=>Y(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));f(this,"hide",(...n)=>Y(this,[...n],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));f(this,"updateSize",()=>{if(!this.data||!ma(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=ua(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,At.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});f(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});f(this,"_show",e=>Y(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(At.ModelNotLoaded);if(!this.data)throw new Error(At.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=F(F({},n),e),s=()=>Y(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield ii(fh(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(At.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,h=o.immediately?0:uh;si(this.five,d,h),this.render(h)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));f(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,At.BreakOffByHide),this.showPromise=void 0;const o=F(F({},{userAction:!0,isAutoHide:!1}),e);si(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});f(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});f(this,"onFiveInteriaPan",(e,n)=>{if(!n||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();o.mode==="Floorplan"&&(this.state.visible||eg(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});f(this,"onFivePanoArrived",e=>{var n;(n=this.five)!=null&&n.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();$p(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});f(this,"onFiveWantsGesture",(e,n)=>{if(this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});f(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});f(this,"onFiveWantsTapGesture",()=>this.handleClick());f(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:Zp/((a=n==null?void 0:n.scale)!=null?a:1)};const o={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:an,attachedTo:nn.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"㎡",getRuleDistanceText:l=>l.toString()},s=n?fs(n,["selector","scale"]):{},r=F(F({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Y(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield ln(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return Y(this,null,function*(){return yield ln(e.data)})}updateState(e,n){const o=this.state,s=e.config?F(F({},o.config),e.config):o.config;this.state=ye(F(F({},this.state),e),{config:s}),!Vt(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ye(F({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(n);this.app=new da({target:this.container,intro:!0,props:n})}};const ng=(i,t)=>new tg(i,t);function ig(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function og(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}let sg=class extends Mn{constructor(e,n){super(e);f(this,"name","modelFloorplanPlugin");f(this,"state");f(this,"data");f(this,"showState");f(this,"showPromise");f(this,"app");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"selector");f(this,"showRejection");f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"show",(...n)=>Y(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));f(this,"hide",(...n)=>Y(this,[...n],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));f(this,"updateSize",()=>{if(!this.data||!ma(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=ua(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,At.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});f(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});f(this,"_show",e=>Y(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(At.ModelNotLoaded);if(!this.data)throw new Error(At.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=F(F({},n),e),s=()=>Y(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield ii(fh(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(At.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,h=o.immediately?0:uh;si(this.five,d,h),this.render(h)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));f(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,At.BreakOffByHide),this.showPromise=void 0;const o=F(F({},{userAction:!0,isAutoHide:!1}),e);si(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});f(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});f(this,"onFivePanoArrived",e=>{var n;(n=this.five)!=null&&n.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),ig(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});f(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1){if(n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1;if(n&&!this.state.visible){if(this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();return o.mode!==this.showState.mode||this.state.visible?void 0:(og(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});f(this,"onFiveWantsTapGesture",()=>this.handleClick());f(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:90};const o={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,cameraImageUrl:an,attachedTo:nn.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"㎡",getRuleDistanceText:a=>a.toString()},s=n?fs(n,["selector","scale"]):{},r=F(F({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Y(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield ln(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}updatePosition(){var a;const e=ha(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}formatData(e){return Y(this,null,function*(){return yield ln(e.data)})}updateState(e,n){const o=this.state,s=e.config?F(F({},o.config),e.config):o.config;this.state=ye(F(F({},this.state),e),{config:s}),!Vt(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ye(F({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(n);this.app=new da({target:this.container,intro:!0,props:n})}};const rg=(i,t)=>new sg(i,t);let ag=class extends Mn{constructor(e,n){super(e);f(this,"name","topviewFloorplanPlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"selector");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=ua(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});f(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var o,s;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,(s=this.container)==null||s.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:n})});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});f(this,"onFivePanoArrived",e=>{var n;(n=this.five)!=null&&n.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,n)=>{this.state.visible&&(this.updatePosition(),this.updateSize())});f(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});f(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});f(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:n}=this.five.getCurrentState();n==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"));const o={northDesc:"北",modelOpacity:1,cameraEnable:!0,hoverEnable:!0,highlightEnable:!1,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,cameraImageUrl:an,attachedTo:nn.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"㎡",getRuleDistanceText:a=>a.toString()},s=n?fs(n,["selector","scale"]):{},r=F(F({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Y(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield ln(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}updatePosition(){var a;const e=ha(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return Y(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return Y(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return Y(this,null,function*(){return yield ln(e.data)})}_show(e){return Y(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:n}=e;this.hooks.emit("show",{userAction:n,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield fa(this.five,["Topview",void 0,void 0,n])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const o=500,s=this.state.config.modelOpacity;si(this.five,s,o),this.hooks.emit("showAnimationEnded",{userAction:n,auto:!1}),this.render()})}_hide(e){return Y(this,null,function*(){if(!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n,auto:!1});const o=1,s=0;si(this.five,o,s),this.render()})}_enable(e){const{userAction:n}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}updateState(e,n){const o=this.state,s=e.config?F(F({},o.config),e.config):o.config;this.state=ye(F(F({},this.state),e),{config:s}),!Vt(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ye(F({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(n);this.app=new da({target:this.container,intro:!0,props:n})}};const lg=(i,t)=>new ag(i,t);function pa(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function cg(i){fe(i,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function dg(i){let t,e,n;return{c(){t=z("div"),e=z("div"),n=z("div"),w(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),T(n,"background-image","url("+(i[0]||an)+")"),T(n,"transform",i[1]),w(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),T(e,"transform",i[2]),w(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){V(o,t,s),O(t,e),O(e,n)},p(o,[s]){s&1&&T(n,"background-image","url("+(o[0]||an)+")"),(s&1||s&3)&&T(n,"transform",o[1]),s&4&&T(e,"transform",o[2])},i:K,o:K,d(o){o&&_(t)}}}function hg(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function ug(i,t,e){let n,o,{five:s}=t,{pxmm:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,c=s.getCurrentState().panoIndex,d=s.getCurrentState().longitude;function h(v,g){const A=v.bounding,b=v.observers[g];if(!b)return"";const y=(A.max.x-A.min.x)*r,E=(A.max.y-A.min.y)*r,k=Math.floor(b.positionInImage.x*y),S=Math.floor(b.positionInImage.y*E);return`translate(${k}px, ${S}px)`}function u(v){e(6,c=v)}const m=pa(v=>{e(7,d=v.longitude)},1e3/60);return Mt(()=>(s.on("panoWillArrive",u),s.on("cameraDirectionUpdate",m),function(){s.off("panoWillArrive",u),s.off("cameraDirectionUpdate",m)})),i.$$set=v=>{"five"in v&&e(3,s=v.five),"pxmm"in v&&e(4,r=v.pxmm),"floorplanData"in v&&e(5,a=v.floorplanData),"cameraImageUrl"in v&&e(0,l=v.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=h(a,c)),i.$$.dirty&128&&e(1,o=hg(d))},[l,o,n,s,r,a,c,d]}class fg extends ce{constructor(t){super(),le(this,t,ug,dg,ae,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},cg)}}function mg(i){fe(i,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function pl(i,t,e){const n=i.slice();return n[1]=t[e],n}function gl(i,t){let e,n,o=`${t[1].icon.width/16}rem`,s=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:i,first:null,c(){e=z("div"),n=z("div"),r=ne(),w(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),T(n,"background-image",`url(${t[1].icon.url})`),T(n,"width",o),T(n,"height",s),w(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),T(e,"top",a),T(e,"left",l),this.first=e},m(c,d){V(c,e,d),O(e,n),O(e,r)},p(c,d){t=c,d&1&&T(n,"background-image",`url(${t[1].icon.url})`);const h=d&1;h&&T(n,"width",o),h&&T(n,"height",s),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&T(e,"top",a),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&T(e,"left",l)},d(c){c&&_(e)}}}function pg(i){let t,e=[],n=new Map,o=i[0];const s=r=>r[1].id;for(let r=0;r<o.length;r+=1){let a=pl(i,o,r),l=s(a);n.set(l,e[r]=gl(l,a))}return{c(){t=z("div");for(let r=0;r<e.length;r+=1)e[r].c();w(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){V(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&1&&(o=r[0],e=St(e,a,s,1,r,o,n,t,aa,gl,null,pl))},i:K,o:K,d(r){r&&_(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function gg(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class vg extends ce{constructor(t){super(),le(this,t,gg,pg,ae,{extraObjects:0},mg)}}function vl(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[7],highlightData:i[5],hoveredRoom:void 0}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new hh({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&183?st(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[7],highlightData:s[5],hoveredRoom:void 0}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function Ag(i){let t,e,n,o,s,r;const a=[{floorIndex:i[2],floorplanData:i[4]}];let l={};for(let d=0;d<a.length;d+=1)l=Ze(l,a[d]);t=new ch({props:l}),n=new vg({props:{extraObjects:i[6]}});let c=i[3]&&vl(i);return{c(){ie(t.$$.fragment),e=ne(),ie(n.$$.fragment),o=ne(),c&&c.c(),s=Ee()},m(d,h){ee(t,d,h),V(d,e,h),ee(n,d,h),V(d,o,h),c&&c.m(d,h),V(d,s,h),r=!0},p(d,[h]){const u=h&20?st(a,[{floorIndex:d[2],floorplanData:d[4]}]):{};t.$set(u);const m={};h&64&&(m.extraObjects=d[6]),n.$set(m),d[3]?c?(c.p(d,h),h&8&&x(c,1)):(c=vl(d),c.c(),x(c,1),c.m(s.parentNode,s)):c&&(de(),L(c,1,1,()=>{c=null}),he())},i(d){r||(x(t.$$.fragment,d),x(n.$$.fragment,d),x(c),r=!0)},o(d){L(t.$$.fragment,d),L(n.$$.fragment,d),L(c),r=!1},d(d){te(t,d),d&&_(e),te(n,d),d&&_(o),c&&c.d(d),d&&_(s)}}}function bg(i,t,e){let n,{five:o}=t,{pxmm:s}=t,{floorIndex:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{extraObjects:c=[]}=t,{highlightData:d}=t;const h=void 0;return i.$$set=u=>{"five"in u&&e(0,o=u.five),"pxmm"in u&&e(1,s=u.pxmm),"floorIndex"in u&&e(2,r=u.floorIndex),"hoverEnable"in u&&e(3,a=u.hoverEnable),"floorplanData"in u&&e(4,l=u.floorplanData),"extraObjects"in u&&e(8,c=u.extraObjects),"highlightData"in u&&e(5,d=u.highlightData)},i.$$.update=()=>{i.$$.dirty&260&&e(6,n=c==null?void 0:c.filter(u=>u.floorIndex===r))},[o,s,r,a,l,d,n,h,c]}class yg extends ce{constructor(t){super(),le(this,t,bg,Ag,ae,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:8,highlightData:5})}}function wg(i){fe(i,"svelte-1mvqyqq",".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}")}function Al(i){let t,e,n,o,s=i[7]!==0&&bl(i);return{c(){t=z("div"),s&&s.c(),w(t,"class","plugin-floorplan-radar svelte-1mvqyqq")},m(r,a){V(r,t,a),s&&s.m(t,null),e=!0,n||(o=[Ut(vi.call(null,t)),Ce(t,"clientWidth",i[13]),Ce(t,"clientHeight",i[14])],n=!0)},p(r,a){r[7]!==0?s?(s.p(r,a),a&128&&x(s,1)):(s=bl(r),s.c(),x(s,1),s.m(t,null)):s&&(de(),L(s,1,1,()=>{s=null}),he())},i(r){e||(x(s),e=!0)},o(r){L(s),e=!1},d(r){r&&_(t),s&&s.d(),n=!1,rt(o)}}}function bl(i){let t,e,n,o,s=`${i[9]}px`,r=`${i[12]}px`,a;const l=[{five:i[0],pxmm:i[10],floorIndex:i[11],floorplanData:i[3],hoverEnable:i[2],extraObjects:i[5],highlightData:i[6]}];let c={};for(let u=0;u<l.length;u+=1)c=Ze(c,l[u]);e=new yg({props:c});const d=[{pxmm:i[10],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let h={};for(let u=0;u<d.length;u+=1)h=Ze(h,d[u]);return o=new fg({props:h}),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),ie(o.$$.fragment),w(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),T(t,"width",s),T(t,"height",r)},m(u,m){V(u,t,m),ee(e,t,null),O(t,n),ee(o,t,null),a=!0},p(u,m){const v=m&3181?st(l,[{five:u[0],pxmm:u[10],floorIndex:u[11],floorplanData:u[3],hoverEnable:u[2],extraObjects:u[5],highlightData:u[6]}]):{};e.$set(v);const g=m&1049?st(d,[{pxmm:u[10],five:u[0],floorplanData:u[3],cameraImageUrl:u[4]}]):{};o.$set(g),m&512&&s!==(s=`${u[9]}px`)&&T(t,"width",s),m&4096&&r!==(r=`${u[12]}px`)&&T(t,"height",r)},i(u){a||(x(e.$$.fragment,u),x(o.$$.fragment,u),a=!0)},o(u){L(e.$$.fragment,u),L(o.$$.fragment,u),a=!1},d(u){u&&_(t),te(e),te(o)}}}function Pg(i){let t,e,n=i[1]&&Al(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=Al(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function Cg(i,t,e){var E,k;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,{highlightData:c}=t,d=0,h=(k=(E=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:E.floorIndex)!=null?k:0,u=0,m=0,v=0,g=0;function A(S){e(11,h=n.work.observers[S].floorIndex)}Mt(()=>(n.on("panoArrived",A),()=>{n.off("panoArrived",A)}));const b=S=>{e(7,u=S.detail)},y=S=>{e(8,m=S.detail)};return i.$$set=S=>{"five"in S&&e(0,n=S.five),"visible"in S&&e(1,o=S.visible),"hoverEnable"in S&&e(2,s=S.hoverEnable),"floorplanData"in S&&e(3,r=S.floorplanData),"cameraImageUrl"in S&&e(4,a=S.cameraImageUrl),"extraObjects"in S&&e(5,l=S.extraObjects),"highlightData"in S&&e(6,c=S.highlightData)},i.$$.update=()=>{if(i.$$.dirty&904){const S=Math.min(u,m),{max:C,min:j}=r.bounding,M=C.x-j.x,X=C.y-j.y,J=function(){return M>X?[S,S/M*X]:[S/X*M,S]}();e(9,v=J[0]),e(12,g=J[1]),e(10,d=v/M)}},[n,o,s,r,a,l,c,u,m,v,d,h,g,b,y]}class Eg extends ce{constructor(t){super(),le(this,t,Cg,Pg,ae,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6},wg)}}let Ig=class extends Mn{constructor(e,n){super(e);f(this,"name","panoFloorplanRadarPlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"wrapperSelector","");f(this,"wrapper",null);f(this,"disposed",!1);f(this,"extraObjects",[]);f(this,"highlightData",{});f(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var o;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:n})});this.five=e;const o={hoverEnable:!0,highlightEnable:!0,cameraImageUrl:an},s=n!=null&&n.configs?n.configs:{},r=F(F({},o),s);this.state={enabled:!0,visible:!0,config:r},n!=null&&n.wrapper&&console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"),typeof(n==null?void 0:n.wrapper)=="string"?this.wrapperSelector=n.wrapper:(n==null?void 0:n.wrapper)instanceof Element&&(this.wrapper=n.wrapper),e.once("dispose",this.dispose)}load(e,n,o=!0){return Y(this,null,function*(){function s(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=s(r)?r.data:r,l=this.data;this.data=yield ln(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return Y(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return Y(this,arguments,function*(e={}){if(!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper=e,this.render()}changeConfigs(e,n=!0){this.setState({config:e},{userAction:n}),this.render()}setExtraObjectsWith3DPositions(e){this.data&&(this.extraObjects=qp(e,this.five,this.data),this.render())}formatData(e){return Y(this,null,function*(){return yield ln(e.data)})}_enable(e){const{userAction:n}=e;this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("show",{userAction:n}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n}),this.render()}updateState(e,n){const o=this.state;this.state=F(F({},this.state),e),!Vt(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const n=document.querySelector(this.wrapperSelector);this.wrapper=n}if(!this.data||!this.wrapper)return;const e=ye(F({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects,highlightData:this.highlightData});this.app?this.app.$set(e):this.app=new Eg({target:this.wrapper,props:e})}};const kg=(i,t)=>new Ig(i,t),xg=[{type:0,floorType:1,roomType:"100900000012",name:"其他"},{type:1,floorType:1,roomType:"100900000002",name:"客厅"},{type:2,floorType:1,roomType:"100900000002",name:"餐厅"},{type:3,floorType:0,roomType:"100900000001",name:"卧室"},{type:4,floorType:0,roomType:"100900000001",name:"书房"},{type:5,floorType:3,roomType:"100900000004",name:"卫生间"},{type:6,floorType:3,roomType:"100900000004",name:"淋浴间"},{type:7,floorType:3,roomType:"100900000004",name:"洗手间"},{type:8,floorType:3,roomType:"100900000003",name:"厨房"},{type:9,floorType:1,roomType:"100900000003",name:"开放厨房",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"多功能间"},{type:11,floorType:0,roomType:"100900000009",name:"保姆间"},{type:12,floorType:4,roomType:"100900000005",name:"阳台"},{type:13,floorType:4,roomType:"100900000006",name:"露台"},{type:14,floorType:0,roomType:"100900000008",name:"储物间"},{type:15,floorType:0,roomType:"100900000013",name:"衣帽间"},{type:16,floorType:0,roomType:"100900000011",name:"阁楼"},{type:17,floorType:2,roomType:"100900000007",name:"花园"},{type:18,floorType:5,roomType:"100900000010",name:"车库"},{type:19,floorType:1,roomType:"100900000012",name:"电梯"},{type:20,floorType:1,roomType:"100900000012",name:"地下室"},{type:21,floorType:1,roomType:"100900000012",name:"天井"},{type:22,floorType:1,roomType:"100900000012",name:"阳光房"},{type:23,floorType:1,roomType:"100900000012",name:"过道"},{type:24,floorType:1,roomType:"100900000012",name:"楼梯间"},{type:25,floorType:1,roomType:"100900000012",name:"门厅"},{type:26,floorType:2,roomType:"100900000012",name:"入户花园"},{type:27,floorType:1,roomType:"100900000012",name:"玄关"},{type:28,floorType:1,roomType:"100900000012",name:"挑空"},{type:29,floorType:4,roomType:"100900000012",name:"晾晒区"},{type:30,floorType:4,roomType:"100900000012",name:"洗衣房"},{type:31,floorType:0,roomType:"100900000012",name:"娱乐区"},{type:32,floorType:0,roomType:"100900000012",name:"健身区"},{type:33,floorType:0,roomType:"100900000012",name:"接待区"},{type:34,floorType:0,roomType:"100900000012",name:"影音区"},{type:35,floorType:1,roomType:"100900000012",name:"餐饮区"},{type:36,floorType:1,roomType:"100900000012",name:"其他",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"起居室"},{type:38,floorType:0,roomType:"100900000001",name:"主卧"},{type:39,floorType:0,roomType:"100900000001",name:"次卧"},{type:40,floorType:0,roomType:"100900000001",name:"优化间"},{type:41,floorType:0,roomType:"100900000001",name:"办公室"},{type:42,floorType:0,roomType:"100900000001",name:"会议室"},{type:43,floorType:0,roomType:"100900000001",name:"洽谈间"},{type:44,floorType:1,roomType:"100900000002",name:"共享大厅"},{type:45,floorType:1,roomType:"100900000012",name:"水吧"},{type:46,floorType:0,roomType:"100900000015",name:"出入口"},{type:47,floorType:0,roomType:"100900000015",name:"大厅"},{type:48,floorType:0,roomType:"100900000015",name:"包厢"},{type:49,floorType:0,roomType:"100900000015",name:"其他"},{type:50,floorType:0,roomType:"100900000016",name:"出入口"},{type:51,floorType:0,roomType:"100900000016",name:"办公区"},{type:52,floorType:0,roomType:"100900000016",name:"老板间"},{type:53,floorType:0,roomType:"100900000016",name:"会议室"},{type:54,floorType:0,roomType:"100900000016",name:"休息区/水吧"},{type:55,floorType:0,roomType:"100900000016",name:"其他"},{type:56,floorType:2,roomType:"100900000012",name:"空中花园"},{type:57,floorType:0,roomType:"100900000001",name:"洋室"},{type:58,floorType:0,roomType:"100900000001",name:"和室"}],Dg=[{type:0,description:"木质地板"},{type:1,description:"瓷砖地面"},{type:2,description:"户外地面"},{type:3,description:"卫生间地面"},{type:4,description:"阳台地面"},{type:5,description:"车库地面"}],Mg=[{roomType:"100900000001",description:"室"},{roomType:"100900000002",description:"厅"},{roomType:"100900000003",description:"厨"},{roomType:"100900000004",description:"卫"},{roomType:"100900000005",description:"阳台"},{roomType:"100900000006",description:"露台"},{roomType:"100900000007",description:"花园"},{roomType:"100900000008",description:"储"},{roomType:"100900000009",description:"保姆间"},{roomType:"100900000010",description:"车库"},{roomType:"100900000011",description:"阁楼"},{roomType:"100900000012",description:"其他"},{roomType:"100900000013",description:"衣"},{roomType:"100900000015",description:"商铺"},{roomType:"100900000016",description:"写字楼"}],mr=(i,t,e)=>{const n=new I.Matrix4,o=new I.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},Sg=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(mr(o,0,0)),s&&i.applyMatrix4(mr(0,s,0)),r&&i.applyMatrix4(mr(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function mh(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=F({map:o.material.map||{}},t);o.material=new R.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const Lg=(i,t)=>{var d;const e=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/dipan2.f38a21cc.FBX",n=(d=t.north_rad)!=null?d:void 0,o={},s=h=>Y(exports,null,function*(){var Q;const u=(h==null?void 0:h.fbx_url)||e,m=(Q=h==null?void 0:h.north_rad)!=null?Q:n;if(typeof m!="number")throw new Error('"northRad"配置参数缺失:未配置指南针指向!');const v=i.model.bounding,g=v.max.x-v.min.x,A=v.max.z-v.min.z,b=Math.max(g,A),E=yield new wd.FBXLoader().loadAsync(u);mh(E,{transparent:!0,side:I.DoubleSide,blending:I.AdditiveBlending});const k=[0,m-Math.PI/2,0],{model:{bounding:{max:{x:S,z:C},min:{x:j,y:M,z:X}}}}=i;o.yBase=M;const J={x:(S+j)/2,y:M-1.6,z:(C+X)/2},H=.0045*b;return Sg(E,{position:J,rotation:k,scale:H}),o.object=E,!0}),r=({latitude:h})=>{if(!o.object)return;const u=a(h);u&&(o.object.position.y=u)},a=h=>{if(o.yBase===void 0)return;const u=.6;if(h>=Math.PI/4)return o.yBase-(u+1.6);const m=h*(4/Math.PI);return o.yBase-(u*m+1.6)};return{load:s,disable:()=>{o.object&&(i.scene.remove(o.object),i.needsRender=!0,i.off("cameraDirectionUpdate",r))},enable:()=>{if(!o.object)return;const h=a(i.getPose().latitude);h&&(o.object.position.y=h),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function Tg(i,t){var c,d,h,u,m;const e=(c=t==null?void 0:t.size)!=null?c:512,n=(d=t==null?void 0:t.fontSize)!=null?d:e*(35/256)*1.2,o=(h=t==null?void 0:t.backgroundColor)!=null?h:"rgba(0,0,0,0)",s=(u=t==null?void 0:t.fontColor)!=null?u:"#fff",r=(m=t==null?void 0:t.textAlign)!=null?m:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=o,l.fillRect(0,0,e,e),l.font=`${n}px "微软雅黑"`,l.textAlign=r,l.fillStyle=s,l.fillText(i,e/2,e*.7),new R.CanvasTexture(a)}const zg=({x:i,y:t,z:e})=>new R.Vector3(i,t,e),jg=(i,t)=>{var g,A,b;const e={},n=(g=t.animationEnabled)!=null?g:!0,o=(A=t.position)!=null?A:void 0,s=(b=t.rad)!=null?b:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=y=>Y(exports,null,function*(){var J,H,Q,G,B,W,q,U;const E=(J=y==null?void 0:y.position)!=null?J:o;if(!E)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const k=zg(E),S=(H=y==null?void 0:y.rad)!=null?H:s,C=(Q=y==null?void 0:y.fbx_url)!=null?Q:r;if(e.rad=S,S===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${S}`));const j=yield new wd.FBXLoader().loadAsync(C);j.position.copy(k),j.rotation.z=S,j.scale.set(.8,.8,.8),mh(j,{transparent:!0,side:I.DoubleSide});const M=(q=(W=(B=(G=j.children)==null?void 0:G[0])==null?void 0:B.children)==null?void 0:W[3])==null?void 0:q.clone();if(!M)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${M}`));const X=(U=t.name)!=null?U:"入户门";return M.material=new R.MeshBasicMaterial({transparent:!0,map:Tg(X)}),M.renderOrder=3,j.children[0].add(M),e.object=j,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,E=new R.AnimationMixer(e.object);a.push(E);const k=E.clipAction(e.object.animations[0]);k.timeScale=y;let S;const C=()=>{let J=0,H=0;const Q=1e3/30,G=B=>{J=requestAnimationFrame(G);const W=B-H;W<Q||(H=B,a.forEach(q=>q.update(W/1e3)),i.needsRender=!0)};return J=requestAnimationFrame(G),()=>{cancelAnimationFrame(J)}},X={play:()=>{S||(k.play(),S=C(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{k.stop(),S==null||S(),S=void 0}};e.animation=X},d=y=>{var k;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((k=y==null?void 0:y.animationEnable)!=null?k:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},h=()=>{e.object&&(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},u=y=>y==="Floorplan"?d():h();return{load:l,enable:y=>(e.enabled||(e.enabled=!0,u(i.currentMode),i.on("modeChange",u),d(y)),!0),disable:()=>(e.enabled&&(e.enabled=!1,h(),i.off("modeChange",u)),!0)}},_g=kt;function Vg(i,t,e,n=_g.Linear.None){const o=new is(i).to(t,e).easing(n);rs(()=>o.start(0));const s=$i(a=>{o.update(a)===!1&&s()}),r=[];return o.onDestroy=a=>(r.push(a),o),o.destroy=function(){this.stop(),Object.assign(o,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();s()},o}function Og(i,t){return Vg({progress:0},{progress:1},i,t)}var ph=(i=>(i.Move="Move",i.Rotate="Rotate",i))(ph||{}),_t=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(_t||{});const Bo=Math.PI*2;function yl(i){return(i%Bo+Bo)%Bo}function wl(i){return i%Bo}function pr(i,t,e){return i+(t-i)*e}const Hr=(i,t,e)=>{const n=Math.PI,o=n*2;let s=yl(i),r=yl(t);return e===_t.Anticlockwise&&s<r&&(s+=o),e===_t.Clockwise&&r<s&&(r+=o),e===_t.Loop&&r-s>n?Hr(s,r,_t.Anticlockwise):e===_t.Loop&&s-r>n?Hr(s,r,_t.Clockwise):{from:s,to:r}},Bg=i=>{const t={},e=(l,c,...d)=>Y(exports,[l,c,...d],function*(s,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),s.mode&&s.mode!==i.currentMode&&(yield i.changeMode(s.mode)),a.preload&&s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(yield i.preloadPano(s.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),s.panoIndex===void 0&&s.fov===void 0&&s.latitude===void 0&&s.longitude===void 0?!0:yield new Promise((h,u)=>{const m=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;m!==void 0?i.moveToPano(m,F({duration:r,moveEndCallback:()=>h(!0),moveCancelCallback:()=>u(new Error("move canceled"))},s)):u(new Error("unexpected error"))})}),n=s=>{const r=i.state,a=wl(r.latitude),l=wl(s.latitude),{from:c,to:d}=Hr(r.longitude,s.longitude,s.rotation||_t.Loop),h=r.fov,u=s.fov;return{from:{latitude:a,longitude:c,fov:h},to:{latitude:l,longitude:d,fov:u}}};return{move:e,rotate:(l,c,...d)=>Y(exports,[l,c,...d],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==ze.Five.Mode.Panorama&&(yield i.changeMode(ze.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((m,v)=>{if(!s.panoIndex){m(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>m(!0),moveCancelCallback:()=>v(new Error("move canceled"))})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:h,to:u}=n(s);return yield new Promise(m=>{const v=({progress:E})=>{const k={};k.longitude=pr(h.longitude,u.longitude,E),k.latitude=pr(h.latitude,u.latitude,E),k.fov=pr(h.fov,u.fov,E),i.setState(k,!0)},g=()=>{m(!0)},A=()=>{m(!1)},b=s.rotateSpeed?Math.ceil(Math.abs(u.longitude-h.longitude)/s.rotateSpeed*1e3):r,y=Og(b,kt.Linear.None).onUpdate(v).onComplete(g).onDestroy(A);s.rotation===_t.Loop&&y.repeat(1/0).yoyo(!0),t.interruptCallback=(E=!0)=>{y.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),m(E)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function Pl(i,t){return i.x===t.x&&i.y===t.y}function gh(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function Zo(i,t){return(t.y-i.y)/(t.x-i.x)}function vh(i,t,e){const n=Zo(i[1],i[0]),o=Zo(t[1],t[0]);if(isNaN(n)||isNaN(o)||gh(n,o))return!1;if(Io(i[0],t))return i[0];if(Io(i[1],t))return i[1];if(Io(t[0],i))return t[0];if(Io(t[1],i))return t[1];if(e&&!Rg(i,t))return!1;const s=i[0],r=t[0];if(Math.abs(n)===1/0)return{x:s.x,y:t[1].y-(t[1].x-s.x)*o};if(Math.abs(o)===1/0)return{x:r.x,y:i[1].y-(i[1].x-r.x)*n};const a=(r.y-s.y+n*s.x-o*r.x)/(n-o),l=n*a-n*s.x+s.y;return{x:a,y:l}}function Io(i,t){return Pl(i,t[0])||Pl(i,t[1])?!0:(t[0].x-i.x)*(i.x-t[1].x)>=0&&(t[0].y-i.y)*(i.y-t[1].y)>=0&&gh(Zo(t[0],i),Zo(i,t[1]))}function ko(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function Rg(i,t){return Math.max(i[0].x,i[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(i[0].x,i[1].x)&&Math.max(i[0].y,i[1].y)>=Math.min(t[0].y,t[1].y)&&ko(t[0],i[1],i[0])*ko(i[1],t[1],i[0])>0&&ko(i[0],t[1],t[0])*ko(t[1],i[1],t[0])>0?1:0}function Ah(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>Ah(i,t-1))}const Qg=`<style type="text/css">
194
+ `;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class Rm extends ce{constructor(t){super(),le(this,t,Bm,Om,ae,{content:0},jm)}}function Qm(i){fe(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function Hm(i){let t,e;return t=new Vm({props:{url:i[1].url}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.url=n[1].url),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Gm(i){let t,e;return t=new Rm({props:{content:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.content=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Fm(i){let t,e,n,o;const s=[Gm,Hm],r=[];function a(l,c){return l[0]?0:l[1]?1:-1}return~(e=a(i))&&(n=r[e]=s[e](i)),{c(){t=z("div"),n&&n.c(),w(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){j(l,t,c),~e&&r[e].m(t,null),o=!0},p(l,[c]){let d=e;e=a(l),e===d?~e&&r[e].p(l,c):(n&&(de(),L(r[d],1,1,()=>{r[d]=null}),he()),~e?(n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),x(n,1),n.m(t,null)):n=null)},i(l){o||(x(n),o=!0)},o(l){L(n),o=!1},d(l){l&&V(t),~e&&r[e].d()}}}function Wm(i,t,e){let n,o,{floorIndex:s}=t,{floorplanData:r}=t;return i.$$set=a=>{"floorIndex"in a&&e(2,s=a.floorIndex),"floorplanData"in a&&e(3,r=a.floorplanData)},i.$$.update=()=>{var a,l;i.$$.dirty&12&&e(1,n=r.outlines[s]),i.$$.dirty&12&&e(0,o=(l=(a=r.outlines)==null?void 0:a[s])==null?void 0:l.svgContent)},[o,n,s,r]}class ch extends ce{constructor(t){super(),le(this,t,Wm,Fm,ae,{floorIndex:2,floorplanData:3},Qm)}}function Nm(i){fe(i,"svelte-12pzct5",".floorplan-plugin__room-label-item.svelte-12pzct5{position:absolute;display:flex;flex-flow:column;align-items:center;line-height:1;color:#fff;transform:translate(-50%, -50%);white-space:nowrap;will-change:opacity;transition:opacity 300ms}.floorplan-plugin__room-size.svelte-12pzct5{opacity:0.45}")}function Xm(i){let t,e=i[8].outerHTML+"",n;return{c(){t=new Go(!1),n=Ee(),t.a=n},m(o,s){t.m(e,o,s),j(o,n,s)},p(o,s){s&256&&e!==(e=o[8].outerHTML+"")&&t.p(e)},d(o){o&&V(n),o&&t.d()}}}function Ym(i){let t,e,n=i[1]&&Fa(i),o=i[0]&&Wa(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=Ee()},m(s,r){n&&n.m(s,r),j(s,t,r),o&&o.m(s,r),j(s,e,r)},p(s,r){s[1]?n?n.p(s,r):(n=Fa(s),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),s[0]?o?o.p(s,r):(o=Wa(s),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(s){n&&n.d(s),s&&V(t),o&&o.d(s),s&&V(e)}}}function Fa(i){let t,e=i[2].name+"",n;return{c(){t=z("span"),n=_e(e),w(t,"class","floorplan-plugin__room-name")},m(o,s){j(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[2].name+"")&&Oe(n,e)},d(o){o&&V(t)}}}function Wa(i){let t,e;return{c(){t=z("span"),e=_e(i[7]),w(t,"class","floorplan-plugin__room-size svelte-12pzct5")},m(n,o){j(n,t,o),O(t,e)},p(n,o){o&128&&Oe(e,n[7])},d(n){n&&V(t)}}}function Um(i){let t,e,n;function o(a,l){if(a[3]===void 0)return Ym;if(a[8])return Xm}let s=o(i),r=s&&s(i);return{c(){t=z("div"),r&&r.c(),w(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),T(t,"left",i[9]),T(t,"top",i[10]),T(t,"font-size",i[11]),T(t,"opacity",i[6]?"1":"0")},m(a,l){j(a,t,l),r&&r.m(t,null),e||(n=[Ut(vi.call(null,t)),Ce(t,"clientWidth",i[19]),Ce(t,"clientHeight",i[20])],e=!0)},p(a,[l]){s===(s=o(a))&&r?r.p(a,l):(r&&r.d(1),r=s&&s(a),r&&(r.c(),r.m(t,null))),l&64&&T(t,"opacity",a[6]?"1":"0")},i:K,o:K,d(a){a&&V(t),r&&r.d(),e=!1,rt(n)}}}function qm(i,t){const e=i[0],n=i[1];let o=!1;for(let s=0,r=t.length-1;s<t.length;r=s++){const a=t[s][0],l=t[s][1],c=t[r][0],d=t[r][1];l>n!=d>n&&e<(c-a)*(n-l)/(d-l)+a&&(o=!o)}return o}function Jm(i,t,e){let n,o,s,r,a,{pxmm:l}=t,{roomAreaEnable:c}=t,{roomNameEnable:d}=t,{room:h}=t,{hoveredRoom:u}=t,{getRoomAreaText:m}=t,{getLabelElement:v}=t,{adaptiveRoomLabelVisibleEnable:g}=t;function A(Q,G){if(G.width===0||G.height===0)return()=>!1;const B=Q.path.map(({x:we,y:ge})=>[we,ge]),W=Q.roomLabel.position,{x:q,y:U}=W,{width:Z,height:re}=G,oe=Z/2,Ae=re/2;return function(ge){const Ve=q*ge,ve=U*ge,Ge=B.map(([be,Se])=>[be*ge,Se*ge]);return[[Ve+oe,ve-Ae],[Ve-oe,ve-Ae],[Ve-oe,ve+Ae],[Ve+oe,ve+Ae]].every(be=>qm(be,Ge))}}const b=document.body.clientWidth,y=document.body.clientHeight,E=h.roomLabel,k=E.positionInImage.x*100+"%",S=E.positionInImage.y*100+"%",C=(b<500||y<500?10:14)+"px";let _=0,M=0,X=!1;u.subscribe(function(G){e(16,X=!!G&&G.id===h.id)});const J=Q=>{e(4,_=Q.detail)},H=Q=>{e(5,M=Q.detail)};return i.$$set=Q=>{"pxmm"in Q&&e(12,l=Q.pxmm),"roomAreaEnable"in Q&&e(0,c=Q.roomAreaEnable),"roomNameEnable"in Q&&e(1,d=Q.roomNameEnable),"room"in Q&&e(2,h=Q.room),"hoveredRoom"in Q&&e(13,u=Q.hoveredRoom),"getRoomAreaText"in Q&&e(14,m=Q.getRoomAreaText),"getLabelElement"in Q&&e(3,v=Q.getLabelElement),"adaptiveRoomLabelVisibleEnable"in Q&&e(15,g=Q.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{i.$$.dirty&12&&e(8,n=v==null?void 0:v(h)),i.$$.dirty&16388&&e(7,o=h.size?m(h.size):""),i.$$.dirty&48&&e(18,s={width:_,height:M}),i.$$.dirty&262148&&e(17,r=s?A(h,s):void 0),i.$$.dirty&233472&&e(6,a=g?X?!0:!!(r!=null&&r(l)):!0)},[c,d,h,v,_,M,a,o,n,k,S,C,l,u,m,g,X,r,s,J,H]}class Zm extends ce{constructor(t){super(),le(this,t,Jm,Um,ae,{pxmm:12,roomAreaEnable:0,roomNameEnable:1,room:2,hoveredRoom:13,getRoomAreaText:14,getLabelElement:3,adaptiveRoomLabelVisibleEnable:15},Nm)}}function Km(i){fe(i,"svelte-13xux0b",".floorplan-plugin__room-labels.svelte-13xux0b{width:100%;height:100%;position:absolute;left:0;top:0;z-index:20;pointer-events:none}")}function Na(i,t,e){const n=i.slice();return n[12]=t[e],n}function Xa(i){let t,e=[],n=new Map,o,s,r,a=i[8];const l=c=>c[12].id;for(let c=0;c<a.length;c+=1){let d=Na(i,a,c),h=l(d);n.set(h,e[c]=Ya(h,d))}return{c(){t=z("div");for(let c=0;c<e.length;c+=1)e[c].c();w(t,"class","floorplan-plugin__room-labels svelte-13xux0b")},m(c,d){j(c,t,d);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);o=!0,s||(r=[Ut(vi.call(null,t)),Ce(t,"clientWidth",i[11])],s=!0)},p(c,d){d&447&&(a=c[8],de(),e=St(e,d,l,1,c,a,n,t,un,Ya,null,Na),he())},i(c){if(!o){for(let d=0;d<a.length;d+=1)x(e[d]);o=!0}},o(c){for(let d=0;d<e.length;d+=1)L(e[d]);o=!1},d(c){c&&V(t);for(let d=0;d<e.length;d+=1)e[d].d();s=!1,rt(r)}}}function Ya(i,t){let e,n,o;const s=[{pxmm:t[7],room:t[12],hoveredRoom:t[2],roomAreaEnable:t[0],roomNameEnable:t[1],getLabelElement:t[4],getRoomAreaText:t[3],adaptiveRoomLabelVisibleEnable:t[5]}];let r={};for(let a=0;a<s.length;a+=1)r=Ze(r,s[a]);return n=new Zm({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){j(a,e,l),ee(n,a,l),o=!0},p(a,l){t=a;const c=l&447?st(s,[{pxmm:t[7],room:t[12],hoveredRoom:t[2],roomAreaEnable:t[0],roomNameEnable:t[1],getLabelElement:t[4],getRoomAreaText:t[3],adaptiveRoomLabelVisibleEnable:t[5]}]):{};n.$set(c)},i(a){o||(x(n.$$.fragment,a),o=!0)},o(a){L(n.$$.fragment,a),o=!1},d(a){a&&V(e),te(n,a)}}}function $m(i){let t,e,n=i[8]&&Xa(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[8]?n?(n.p(o,s),s&256&&x(n,1)):(n=Xa(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function ep(i,t,e){let n,{floorIndex:o}=t,{roomAreaEnable:s}=t,{roomNameEnable:r}=t,{floorplanData:a}=t,{hoveredRoom:l}=t,{getRoomAreaText:c}=t,{getLabelElement:d}=t,{adaptiveRoomLabelVisibleEnable:h}=t,u=0,m=0;const v=g=>{e(6,u=g.detail)};return i.$$set=g=>{"floorIndex"in g&&e(9,o=g.floorIndex),"roomAreaEnable"in g&&e(0,s=g.roomAreaEnable),"roomNameEnable"in g&&e(1,r=g.roomNameEnable),"floorplanData"in g&&e(10,a=g.floorplanData),"hoveredRoom"in g&&e(2,l=g.hoveredRoom),"getRoomAreaText"in g&&e(3,c=g.getRoomAreaText),"getLabelElement"in g&&e(4,d=g.getLabelElement),"adaptiveRoomLabelVisibleEnable"in g&&e(5,h=g.adaptiveRoomLabelVisibleEnable)},i.$$.update=()=>{if(i.$$.dirty&1536&&e(8,n=a.floorDatas[o].rooms),i.$$.dirty&1088){const{max:g,min:A}=a.bounding,b=g.x-A.x;e(7,m=u/b)}},[s,r,l,c,d,h,u,m,n,o,a,v]}class tp extends ce{constructor(t){super(),le(this,t,ep,$m,ae,{floorIndex:9,roomAreaEnable:0,roomNameEnable:1,floorplanData:10,hoveredRoom:2,getRoomAreaText:3,getLabelElement:4,adaptiveRoomLabelVisibleEnable:5},Km)}}function np(i){fe(i,"svelte-djlmk4",".floorplan-plugin__rule-labels.svelte-djlmk4.svelte-djlmk4{position:absolute;display:flex}.floorplan-plugin__rule-labels--top.svelte-djlmk4.svelte-djlmk4{left:0;top:-1.25rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4.svelte-djlmk4{left:0;bottom:-1.25rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4.svelte-djlmk4{top:0;left:-1.25rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4.svelte-djlmk4{top:0;right:-1.25rem}.floorplan-plugin__rule-line.svelte-djlmk4.svelte-djlmk4{background:#fff;opacity:0.05;width:100%;height:100%}.floorplan-plugin__rule-scale-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute;width:0.3125rem;height:100%;left:50%;top:0;transform:translateX(-50%)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale-wrapper.svelte-djlmk4{width:100%;height:0.3125rem;top:50%;left:0;transform:translateY(-50%)}.floorplan-plugin__rule-scale.svelte-djlmk4.svelte-djlmk4{position:absolute;background:#fff;opacity:0.05;width:100%;height:0.0625rem}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-scale.svelte-djlmk4{width:0.0625rem;height:100%}.floorplan-plugin__rule-text-wrapper.svelte-djlmk4.svelte-djlmk4{position:absolute}.floorplan-plugin__rule-labels--top.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;top:0.625rem}.floorplan-plugin__rule-labels--bottom.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:100%;height:0;bottom:0.625rem}.floorplan-plugin__rule-labels--left.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;left:0.625rem}.floorplan-plugin__rule-labels--right.svelte-djlmk4 .floorplan-plugin__rule-text-wrapper.svelte-djlmk4{width:0;height:100%;right:0.625rem}.floorplan-plugin__rule-text-item.svelte-djlmk4.svelte-djlmk4{width:0;height:0;position:absolute;transform:rotate(90deg)}.floorplan-plugin__rule-labels.is-row.svelte-djlmk4 .floorplan-plugin__rule-text-item.svelte-djlmk4{transform:rotate(0)}.floorplan-plugin__rule-text.svelte-djlmk4.svelte-djlmk4{width:-moz-max-content;width:max-content;transform:translate(-50%, -50%);font-size:0.625rem;color:#fff;opacity:0.2}")}function Ua(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function qa(i,t,e){const n=i.slice();return n[14]=t[e],n}function Ja(i){let t;return{c(){t=z("div"),w(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),T(t,"left",i[14].left*100+"%"),T(t,"bottom",i[14].bottom*100+"%")},m(e,n){j(e,t,n)},p:K,d(e){e&&V(t)}}}function Za(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=z("div"),n=z("div"),s=_e(o),r=ne(),w(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),$(n,"is-row",t[2]),w(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),T(e,"left",t[11].left*100+"%"),T(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){j(a,e,l),O(e,n),O(n,s),O(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&Oe(s,o)},d(a){a&&V(e)}}}function ip(i){let t,e,n,o,s,r,a=[],l=new Map,c,d=i[3],h=[];for(let v=0;v<d.length;v+=1)h[v]=Ja(qa(i,d,v));let u=i[4];const m=v=>v[13];for(let v=0;v<u.length;v+=1){let g=Ua(i,u,v),A=m(g);l.set(A,a[v]=Za(A,g))}return{c(){t=z("div"),e=z("div"),n=ne(),o=z("div");for(let v=0;v<h.length;v+=1)h[v].c();s=ne(),r=z("div");for(let v=0;v<a.length;v+=1)a[v].c();w(e,"class","floorplan-plugin__rule-line svelte-djlmk4"),w(o,"class","floorplan-plugin__rule-scale-wrapper svelte-djlmk4"),$(o,"is-row",i[2]),w(r,"class","floorplan-plugin__rule-text-wrapper svelte-djlmk4"),w(t,"class",c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+i[0]+" svelte-djlmk4"),$(t,"is-row",i[2]),T(t,"width",i[2]?"100%":1/16+"rem"),T(t,"height",i[2]?1/16+"rem":"100%")},m(v,g){j(v,t,g),O(t,e),O(t,n),O(t,o);for(let A=0;A<h.length;A+=1)h[A]&&h[A].m(o,null);O(t,s),O(t,r);for(let A=0;A<a.length;A+=1)a[A]&&a[A].m(r,null)},p(v,[g]){if(g&8){d=v[3];let A;for(A=0;A<d.length;A+=1){const b=qa(v,d,A);h[A]?h[A].p(b,g):(h[A]=Ja(b),h[A].c(),h[A].m(o,null))}for(;A<h.length;A+=1)h[A].d(1);h.length=d.length}g&22&&(u=v[4],a=St(a,g,m,1,v,u,l,r,aa,Za,null,Ua)),g&1&&c!==(c="floorplan-plugin__rule-labels floorplan-plugin__rule-labels--"+v[0]+" svelte-djlmk4")&&w(t,"class",c),g&5&&$(t,"is-row",v[2])},i:K,o:K,d(v){v&&V(t),qt(h,v);for(let g=0;g<a.length;g+=1)a[g].d()}}}const Nn=1e3,Xn=180;function op(i,t,e){let{type:n}=t,{data:o}=t,{bounding:s}=t,{getRuleDistanceText:r}=t;const a=n==="top"||n==="bottom",l=s.max.x-s.min.x-(Nn-Xn)*2,c=s.max.y-s.min.y-(Nn-Xn)*2,d=o.map(([v,g])=>a?[v.x,g.x]:[v.y,g.y]).flat().sort().filter((v,g,A)=>g===0?!0:v!==A[g-1]),h=d.map(v=>{const g=a?(v-s.min.x-Nn+Xn)/l:0,A=a?0:(v-s.min.y-Nn+Xn)/c;return{left:g,bottom:A}});h.unshift({left:0,bottom:0}),h.push(a?{left:1,bottom:0}:{left:0,bottom:1});const u=d[d.length-1]-d[0],m=d.map((v,g,A)=>{const b=g===0?0:v-A[g-1],y=g===0?0:(v+A[g-1])/2,E=a?(y-s.min.x-Nn+Xn)/l:0,k=a?0:(y-s.min.y-Nn+Xn)/c;return{left:E,bottom:k,distance:b}}).filter(({distance:v})=>v/u>.1);return i.$$set=v=>{"type"in v&&e(0,n=v.type),"data"in v&&e(5,o=v.data),"bounding"in v&&e(6,s=v.bounding),"getRuleDistanceText"in v&&e(1,r=v.getRuleDistanceText)},[n,r,a,h,m,o,s]}class sp extends ce{constructor(t){super(),le(this,t,op,ip,ae,{type:0,data:5,bounding:6,getRuleDistanceText:1},np)}}function rp(i){fe(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function Ka(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function $a(i,t){let e,n,o;const s=[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}];let r={};for(let a=0;a<s.length;a+=1)r=Ze(r,s[a]);return n=new sp({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){j(a,e,l),ee(n,a,l),o=!0},p(a,l){t=a;const c=l&19?st(s,[{type:t[13],data:t[14],bounding:t[1],getRuleDistanceText:t[0]}]):{};n.$set(c)},i(a){o||(x(n.$$.fragment,a),o=!0)},o(a){L(n.$$.fragment,a),o=!1},d(a){a&&V(e),te(n,a)}}}function ap(i){let t,e=[],n=new Map,o,s=i[4];const r=a=>a[13];for(let a=0;a<s.length;a+=1){let l=Ka(i,s,a),c=r(l);n.set(c,e[a]=$a(c,l))}return{c(){t=z("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),T(t,"width",i[3]),T(t,"height",i[2])},m(a,l){j(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);o=!0},p(a,[l]){l&19&&(s=a[4],de(),e=St(e,l,r,1,a,s,n,t,un,$a,null,Ka),he()),l&8&&T(t,"width",a[3]),l&4&&T(t,"height",a[2])},i(a){if(!o){for(let l=0;l<s.length;l+=1)x(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)L(e[l]);o=!1},d(a){a&&V(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const el=1e3,tl=180;function lp(i,t,e){let n,o,s,r,a,l,c,d,h,u,{floorIndex:m}=t,{floorplanData:v}=t,{getRuleDistanceText:g}=t;return i.$$set=A=>{"floorIndex"in A&&e(5,m=A.floorIndex),"floorplanData"in A&&e(6,v=A.floorplanData),"getRuleDistanceText"in A&&e(0,g=A.getRuleDistanceText)},i.$$.update=()=>{i.$$.dirty&64&&e(1,n=v.bounding),i.$$.dirty&96&&e(11,o=v.floorDatas[m].rules),i.$$.dirty&2048&&e(12,s=Object.keys(o)),i.$$.dirty&6144&&e(4,r=s.map(A=>[A,o[A]])),i.$$.dirty&2&&e(9,a=n.max.x-n.min.x),i.$$.dirty&2&&e(7,l=n.max.y-n.min.y),i.$$.dirty&2&&e(10,c=n.max.x-n.min.x-(el-tl)*2),i.$$.dirty&2&&e(8,d=n.max.y-n.min.y-(el-tl)*2),i.$$.dirty&1536&&e(3,h=c/a*100+"%"),i.$$.dirty&384&&e(2,u=d/l*100+"%")},[g,n,u,h,r,m,v,l,d,a,c,o,s]}class cp extends ce{constructor(t){super(),le(this,t,lp,ap,ae,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},rp)}}function us(i,t={}){let e="";const{needZ:n,needA:o}=t;return(n?i.slice().concat(i[0]):i.slice()).forEach((r,a)=>{const{x:l,y:c}=t.format?t.format(r):r,d=l+","+c;return a===0?(e+="M"+d,e):o!=null&&o[a]?(e+="A"+o[a]+","+d,e):(e+="L"+d,e)}),e+(n?"Z":"")}function dh({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function dp(i,t){const e=i.x*1e3+t.bounding.origin.x,n=-i.z*1e3+t.bounding.origin.y;return{x:e,y:n}}function hp(i,t){const e=t.bounding,n=e.max.x-e.min.x,o=e.max.y-e.min.y;return{x:(i.x-e.min.x)/n,y:(e.max.y-i.y)/o}}function up(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function fp(i){let t;return{c(){t=Te("path"),w(t,"d",i[0]),w(t,"fill","#2F313A")},m(e,n){j(e,t,n)},p(e,[n]){n&1&&w(t,"d",e[0])},i:K,o:K,d(e){e&&V(t)}}}function mp(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=us(o,{needZ:!0}))},[n,o]}class pp extends ce{constructor(t){super(),le(this,t,mp,fp,ae,{path:1})}}function gp(i){let t,e,n,o,s,r;return{c(){t=Te("defs"),e=Te("pattern"),n=Te("rect"),o=Te("path"),s=ne(),r=Te("path"),w(n,"x","0"),w(n,"y","0"),w(n,"width",i[1]),w(n,"height",i[1]),w(n,"fill","#323747"),w(o,"d",i[2]),w(o,"stroke","#ffffff"),w(o,"stroke-opacity","0.06"),w(o,"stroke-width","0.5"),w(o,"fill","none"),w(e,"id","fpm-room-pattern-0"),w(e,"x","0"),w(e,"y","0"),w(e,"width",i[1]),w(e,"height",i[1]),w(e,"patternUnits","userSpaceOnUse"),w(e,"patternTransform","scale(50 50)"),w(r,"d",i[0]),w(r,"fill","url(#fpm-room-pattern-0)")},m(a,l){j(a,t,l),O(t,e),O(e,n),O(e,o),j(a,s,l),j(a,r,l)},p(a,[l]){l&1&&w(r,"d",a[0])},i:K,o:K,d(a){a&&V(t),a&&V(s),a&&V(r)}}}const fr=6;function vp(i,t,e){let n,{path:o}=t;const s=fr*2,r=`M0 ${fr} h ${s} M${fr} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=us(o,{needZ:!0}))},[n,s,r,o]}class Ap extends ce{constructor(t){super(),le(this,t,vp,gp,ae,{path:3})}}function bp(i){let t,e,n,o,s,r,a,l,c,d,h;return{c(){t=Te("defs"),e=Te("pattern"),n=Te("rect"),o=Te("pattern"),s=Te("rect"),r=ne(),a=Te("path"),l=ne(),c=Te("path"),d=ne(),h=Te("path"),w(n,"x","0"),w(n,"y","0"),w(n,"width","6"),w(n,"height","50"),w(n,"fill","none"),w(n,"stroke","#4B4B57"),w(n,"stroke-width","0.5"),w(e,"id","room-material-pattern-1"),w(e,"x","0"),w(e,"y","0"),w(e,"width","12"),w(e,"height","50"),w(e,"patternUnits","userSpaceOnUse"),w(e,"patternTransform","scale(50 50)"),w(s,"x","0"),w(s,"y","0"),w(s,"width","6"),w(s,"height","50"),w(s,"fill","none"),w(s,"stroke","#4B4B57"),w(s,"stroke-width","0.5"),w(o,"id","room-material-pattern-2"),w(o,"x","6"),w(o,"y","25"),w(o,"width","12"),w(o,"height","50"),w(o,"patternUnits","userSpaceOnUse"),w(o,"patternTransform","scale(50 50)"),w(a,"d",i[0]),w(a,"fill","#43434D"),w(c,"d",i[0]),w(c,"fill","url(#room-material-pattern-1)"),w(h,"d",i[0]),w(h,"fill","url(#room-material-pattern-2)")},m(u,m){j(u,t,m),O(t,e),O(e,n),O(t,o),O(o,s),j(u,r,m),j(u,a,m),j(u,l,m),j(u,c,m),j(u,d,m),j(u,h,m)},p(u,[m]){m&1&&w(a,"d",u[0]),m&1&&w(c,"d",u[0]),m&1&&w(h,"d",u[0])},i:K,o:K,d(u){u&&V(t),u&&V(r),u&&V(a),u&&V(l),u&&V(c),u&&V(d),u&&V(h)}}}function yp(i,t,e){let n,{path:o}=t;return i.$$set=s=>{"path"in s&&e(1,o=s.path)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=us(o,{needZ:!0}))},[n,o]}class wp extends ce{constructor(t){super(),le(this,t,yp,bp,ae,{path:1})}}function Pp(i){fe(i,"svelte-1dykexu",".floorplan-plugin__room-material.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%}svg.svelte-1dykexu{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible}")}function nl(i,t,e){const n=i.slice();return n[5]=t[e],n}function Cp(i){let t,e;return t=new Ap({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Ep(i){let t,e;return t=new wp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Ip(i){let t,e;return t=new pp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.path=n[5].path),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function il(i){let t,e,n,o;const s=[Ip,Ep,Cp],r=[];function a(l,c){return l[5].floorType===1?0:l[5].floorType===0?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=Te("svg"),n.c(),w(t,"width","100%"),w(t,"height","100%"),w(t,"viewBox",`0 0 ${i[1]} ${i[2]}`),w(t,"class","svelte-1dykexu")},m(l,c){j(l,t,c),r[e].m(t,null),o=!0},p(l,c){let d=e;e=a(l),e===d?r[e].p(l,c):(de(),L(r[d],1,1,()=>{r[d]=null}),he(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),x(n,1),n.m(t,null))},i(l){o||(x(n),o=!0)},o(l){L(n),o=!1},d(l){l&&V(t),r[e].d()}}}function kp(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=il(nl(i,n,r));const s=r=>L(o[r],1,1,()=>{o[r]=null});return{c(){t=z("div");for(let r=0;r<o.length;r+=1)o[r].c();w(t,"class","floorplan-plugin__room-material svelte-1dykexu")},m(r,a){j(r,t,a);for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(t,null);e=!0},p(r,[a]){if(a&7){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=nl(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=il(c),o[l].c(),x(o[l],1),o[l].m(t,null))}for(de(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)x(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)L(o[a]);e=!1},d(r){r&&V(t),qt(o,r)}}}function xp(i,t,e){let n,{floorIndex:o}=t,{floorplanData:s}=t;const r=s.bounding.max.x-s.bounding.min.x,a=s.bounding.max.y-s.bounding.min.y;return i.$$set=l=>{"floorIndex"in l&&e(3,o=l.floorIndex),"floorplanData"in l&&e(4,s=l.floorplanData)},i.$$.update=()=>{i.$$.dirty&24&&e(0,n=s.floorDatas[o].rooms.map(l=>ye(F({},l),{path:l.path.map(c=>dh(c,s.bounding))})))},[n,r,a,o,s]}class Dp extends ce{constructor(t){super(),le(this,t,xp,kp,ae,{floorIndex:3,floorplanData:4},Pp)}}function Mp(i){fe(i,"svelte-qq2273","path.svelte-qq2273{--opacity:0;opacity:var(--opacity)}path.svelte-qq2273:hover{opacity:calc(var(--opacity) + 0.1)}")}function Sp(i){let t,e,n,o;return{c(){t=Te("path"),w(t,"d",i[5]),w(t,"fill","#fff"),w(t,"style",i[2]),w(t,"id",e=`${i[1]}_${i[0].id}`),w(t,"class","svelte-qq2273")},m(s,r){j(s,t,r),n||(o=[Ce(t,"mouseenter",i[3]),Ce(t,"mouseleave",i[4])],n=!0)},p(s,[r]){r&4&&w(t,"style",s[2]),r&3&&e!==(e=`${s[1]}_${s[0].id}`)&&w(t,"id",e)},i:K,o:K,d(s){s&&V(t),n=!1,rt(o)}}}function Lp(i,t,e){let n,o,{room:s}=t,{floorIndex:r}=t,{floorplanData:a}=t,{highlightData:l}=t,{hoveredRoom:c}=t;function d(){c==null||c.set(s)}function h(){c==null||c.set(void 0)}const{bounding:u}=a,m=us(s.path,{needZ:!0,format:v=>dh(v,u)});return i.$$set=v=>{"room"in v&&e(0,s=v.room),"floorIndex"in v&&e(1,r=v.floorIndex),"floorplanData"in v&&e(6,a=v.floorplanData),"highlightData"in v&&e(7,l=v.highlightData),"hoveredRoom"in v&&e(8,c=v.hoveredRoom)},i.$$.update=()=>{i.$$.dirty&131&&e(9,n=l[`${r}_${s.id}`]),i.$$.dirty&512&&e(2,o=n?`fill: ${n.color}; --opacity: ${n.opacity}; pointer-events: ${n.disabled?"none":"auto"}`:null)},[s,r,o,d,h,m,a,l,c,n]}class Tp extends ce{constructor(t){super(),le(this,t,Lp,Sp,ae,{room:0,floorIndex:1,floorplanData:6,highlightData:7,hoveredRoom:8},Mp)}}function zp(i){fe(i,"svelte-1kqo6e4",".floorplan-plugin__room-highlight.svelte-1kqo6e4{position:absolute;width:100%;height:100%}svg.svelte-1kqo6e4{width:100%;height:100%;overflow:visible}")}function ol(i,t,e){const n=i.slice();return n[6]=t[e],n}function sl(i,t){let e,n,o;const s=[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}];let r={};for(let a=0;a<s.length;a+=1)r=Ze(r,s[a]);return n=new Tp({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){j(a,e,l),ee(n,a,l),o=!0},p(a,l){t=a;const c=l&15?st(s,[{room:t[6],floorplanData:t[1],hoveredRoom:t[3],floorIndex:t[0],highlightData:t[2]}]):{};n.$set(c)},i(a){o||(x(n.$$.fragment,a),o=!0)},o(a){L(n.$$.fragment,a),o=!1},d(a){a&&V(e),te(n,a)}}}function _p(i){let t,e,n=[],o=new Map,s,r=i[1].floorDatas[i[0]].rooms;const a=l=>l[6].id;for(let l=0;l<r.length;l+=1){let c=ol(i,r,l),d=a(c);o.set(d,n[l]=sl(d,c))}return{c(){t=z("div"),e=Te("svg");for(let l=0;l<n.length;l+=1)n[l].c();w(e,"width","100%"),w(e,"height","100%"),w(e,"viewBox",`0 0 ${i[4]} ${i[5]}`),w(e,"class","svelte-1kqo6e4"),w(t,"class","floorplan-plugin__room-highlight svelte-1kqo6e4")},m(l,c){j(l,t,c),O(t,e);for(let d=0;d<n.length;d+=1)n[d]&&n[d].m(e,null);s=!0},p(l,[c]){c&15&&(r=l[1].floorDatas[l[0]].rooms,de(),n=St(n,c,a,1,l,r,o,e,un,sl,null,ol),he())},i(l){if(!s){for(let c=0;c<r.length;c+=1)x(n[c]);s=!0}},o(l){for(let c=0;c<n.length;c+=1)L(n[c]);s=!1},d(l){l&&V(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function Vp(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{highlightData:s}=t,{hoveredRoom:r}=t;const a=o.bounding.max.x-o.bounding.min.x,l=o.bounding.max.y-o.bounding.min.y;return i.$$set=c=>{"floorIndex"in c&&e(0,n=c.floorIndex),"floorplanData"in c&&e(1,o=c.floorplanData),"highlightData"in c&&e(2,s=c.highlightData),"hoveredRoom"in c&&e(3,r=c.hoveredRoom)},[n,o,s,r,a,l]}class hh extends ce{constructor(t){super(),le(this,t,Vp,_p,ae,{floorIndex:0,floorplanData:1,highlightData:2,hoveredRoom:3},zp)}}function jp(i){fe(i,"svelte-bl8zrz",".floorplan-plugin__floor.svelte-bl8zrz{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;pointer-events:none}.floorplan-plugin__floor--is-current.svelte-bl8zrz{opacity:1;pointer-events:auto}")}function rl(i){let t,e;const n=[{floorIndex:i[1],floorplanData:i[8],hoveredRoom:i[14],highlightData:i[13]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new hh({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&24834?st(n,[{floorIndex:s[1],floorplanData:s[8],hoveredRoom:s[14],highlightData:s[13]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function al(i){let t,e;const n=[{floorplanData:i[8],roomAreaEnable:i[5],roomNameEnable:i[6],floorIndex:i[1],getRoomAreaText:i[9],getLabelElement:i[10],hoveredRoom:i[14],adaptiveRoomLabelVisibleEnable:i[12]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new tp({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&22370?st(n,[{floorplanData:s[8],roomAreaEnable:s[5],roomNameEnable:s[6],floorIndex:s[1],getRoomAreaText:s[9],getLabelElement:s[10],hoveredRoom:s[14],adaptiveRoomLabelVisibleEnable:s[12]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function ll(i){let t,e;const n=[{floorplanData:i[8],floorIndex:i[1],getRuleDistanceText:i[11]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new cp({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&2306?st(n,[{floorplanData:s[8],floorIndex:s[1],getRuleDistanceText:s[11]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function Op(i){let t,e,n,o,s,r,a,l,c;const d=[{floorIndex:i[1],floorplanData:i[8]}];let h={};for(let b=0;b<d.length;b+=1)h=Ze(h,d[b]);e=new Dp({props:h});let u=(i[2]||i[3])&&rl(i);const m=[{floorplanData:i[8],floorIndex:i[1]}];let v={};for(let b=0;b<m.length;b+=1)v=Ze(v,m[b]);s=new ch({props:v});let g=i[4]&&al(i),A=i[7]&&ll(i);return{c(){t=z("div"),ie(e.$$.fragment),n=ne(),u&&u.c(),o=ne(),ie(s.$$.fragment),r=ne(),g&&g.c(),a=ne(),A&&A.c(),w(t,"class",l=Be(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(b,y){j(b,t,y),ee(e,t,null),O(t,n),u&&u.m(t,null),O(t,o),ee(s,t,null),O(t,r),g&&g.m(t,null),O(t,a),A&&A.m(t,null),c=!0},p(b,[y]){const E=y&258?st(d,[{floorIndex:b[1],floorplanData:b[8]}]):{};e.$set(E),b[2]||b[3]?u?(u.p(b,y),y&12&&x(u,1)):(u=rl(b),u.c(),x(u,1),u.m(t,o)):u&&(de(),L(u,1,1,()=>{u=null}),he());const k=y&258?st(m,[{floorplanData:b[8],floorIndex:b[1]}]):{};s.$set(k),b[4]?g?(g.p(b,y),y&16&&x(g,1)):(g=al(b),g.c(),x(g,1),g.m(t,a)):g&&(de(),L(g,1,1,()=>{g=null}),he()),b[7]?A?(A.p(b,y),y&128&&x(A,1)):(A=ll(b),A.c(),x(A,1),A.m(t,null)):A&&(de(),L(A,1,1,()=>{A=null}),he()),(!c||y&1&&l!==(l=Be(`floorplan-plugin__floor${b[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz"))&&w(t,"class",l)},i(b){c||(x(e.$$.fragment,b),x(u),x(s.$$.fragment,b),x(g),x(A),c=!0)},o(b){L(e.$$.fragment,b),L(u),L(s.$$.fragment,b),L(g),L(A),c=!1},d(b){b&&V(t),te(e),u&&u.d(),te(s),g&&g.d(),A&&A.d()}}}function Bp(i,t,e){let{isCurrent:n}=t,{floorIndex:o}=t,{highlightEnable:s}=t,{hoverEnable:r}=t,{roomLabelsEnable:a}=t,{roomAreaEnable:l}=t,{roomNameEnable:c}=t,{ruleLabelsEnable:d}=t,{floorplanData:h}=t,{getRoomAreaText:u}=t,{getLabelElement:m}=t,{getRuleDistanceText:v}=t,{adaptiveRoomLabelVisibleEnable:g}=t,{highlightData:A}=t;const b=ca(void 0);return i.$$set=y=>{"isCurrent"in y&&e(0,n=y.isCurrent),"floorIndex"in y&&e(1,o=y.floorIndex),"highlightEnable"in y&&e(2,s=y.highlightEnable),"hoverEnable"in y&&e(3,r=y.hoverEnable),"roomLabelsEnable"in y&&e(4,a=y.roomLabelsEnable),"roomAreaEnable"in y&&e(5,l=y.roomAreaEnable),"roomNameEnable"in y&&e(6,c=y.roomNameEnable),"ruleLabelsEnable"in y&&e(7,d=y.ruleLabelsEnable),"floorplanData"in y&&e(8,h=y.floorplanData),"getRoomAreaText"in y&&e(9,u=y.getRoomAreaText),"getLabelElement"in y&&e(10,m=y.getLabelElement),"getRuleDistanceText"in y&&e(11,v=y.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in y&&e(12,g=y.adaptiveRoomLabelVisibleEnable),"highlightData"in y&&e(13,A=y.highlightData)},[n,o,s,r,a,l,c,d,h,u,m,v,g,A,b]}let Rp=class extends ce{constructor(t){super(),le(this,t,Bp,Op,ae,{isCurrent:0,floorIndex:1,highlightEnable:2,hoverEnable:3,roomLabelsEnable:4,roomAreaEnable:5,roomNameEnable:6,ruleLabelsEnable:7,floorplanData:8,getRoomAreaText:9,getLabelElement:10,getRuleDistanceText:11,adaptiveRoomLabelVisibleEnable:12,highlightData:13},jp)}};function Qp(i){fe(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function cl(i,t,e){const n=i.slice();return n[21]=t[e],n}function dl(i){let t,e,n,o,s,r=i[13].floorDatas,a=[];for(let h=0;h<r.length;h+=1)a[h]=hl(cl(i,r,h));const l=h=>L(a[h],1,1,()=>{a[h]=null});let c=i[5]&&ul(i),d=i[8]&&fl(i);return{c(){t=z("div");for(let h=0;h<a.length;h+=1)a[h].c();e=ne(),c&&c.c(),n=ne(),d&&d.c(),w(t,"class","floorplan-main svelte-86bqav")},m(h,u){j(h,t,u);for(let m=0;m<a.length;m+=1)a[m]&&a[m].m(t,null);O(t,e),c&&c.m(t,null),O(t,n),d&&d.m(t,null),s=!0},p(h,u){if(i=h,u&2047696){r=i[13].floorDatas;let m;for(m=0;m<r.length;m+=1){const v=cl(i,r,m);a[m]?(a[m].p(v,u),x(a[m],1)):(a[m]=hl(v),a[m].c(),x(a[m],1),a[m].m(t,e))}for(de(),m=r.length;m<a.length;m+=1)l(m);he()}i[5]?c?(c.p(i,u),u&32&&x(c,1)):(c=ul(i),c.c(),x(c,1),c.m(t,n)):c&&(de(),L(c,1,1,()=>{c=null}),he()),i[8]?d?(d.p(i,u),u&256&&x(d,1)):(d=fl(i),d.c(),x(d,1),d.m(t,null)):d&&(de(),L(d,1,1,()=>{d=null}),he())},i(h){if(!s){for(let u=0;u<r.length;u+=1)x(a[u]);x(c),x(d),o||ot(()=>{o=Dn(t,In,{duration:i[0],easing:sn}),o.start()}),s=!0}},o(h){a=a.filter(Boolean);for(let u=0;u<a.length;u+=1)L(a[u]);L(c),L(d),s=!1},d(h){h&&V(t),qt(a,h),c&&c.d(),d&&d.d()}}}function hl(i){let t,e;const n=[{hoverEnable:i[6],highlightEnable:i[7],floorplanData:i[13],getRoomAreaText:i[16],getLabelElement:i[17],getRuleDistanceText:i[18],roomLabelsEnable:i[9],roomAreaEnable:i[10],roomNameEnable:i[11],ruleLabelsEnable:i[12],adaptiveRoomLabelVisibleEnable:i[19],highlightData:i[20]},{floorIndex:i[21].floorIndex},{isCurrent:i[21].floorIndex===i[4]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new Rp({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&2047696?st(n,[r&2047680&&{hoverEnable:s[6],highlightEnable:s[7],floorplanData:s[13],getRoomAreaText:s[16],getLabelElement:s[17],getRuleDistanceText:s[18],roomLabelsEnable:s[9],roomAreaEnable:s[10],roomNameEnable:s[11],ruleLabelsEnable:s[12],adaptiveRoomLabelVisibleEnable:s[19],highlightData:s[20]},r&8192&&{floorIndex:s[21].floorIndex},r&8208&&{isCurrent:s[21].floorIndex===s[4]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function ul(i){let t,e;const n=[{panoIndex:i[3],floorplanData:i[13],lastPanoramaLongitude:i[14],cameraImageUrl:i[15]}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new Em({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&57352?st(n,[{panoIndex:s[3],floorplanData:s[13],lastPanoramaLongitude:s[14],cameraImageUrl:s[15]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function fl(i){let t,e;return t=new Lm({props:{floorplanData:i[13],northDesc:i[2]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&8192&&(s.floorplanData=n[13]),o&4&&(s.northDesc=n[2]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Hp(i){let t,e,n=i[1]&&dl(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=dl(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function Gp(i,t,e){let{duration:n=0}=t,{visible:o}=t,{northDesc:s}=t,{panoIndex:r}=t,{floorIndex:a}=t,{cameraEnable:l}=t,{hoverEnable:c}=t,{highlightEnable:d}=t,{compassEnable:h}=t,{roomLabelsEnable:u}=t,{roomAreaEnable:m}=t,{roomNameEnable:v}=t,{ruleLabelsEnable:g}=t,{floorplanData:A}=t,{lastPanoramaLongitude:b}=t,{cameraImageUrl:y}=t,{getRoomAreaText:E}=t,{getLabelElement:k}=t,{getRuleDistanceText:S}=t,{adaptiveRoomLabelVisibleEnable:C}=t,{highlightData:_}=t;return i.$$set=M=>{"duration"in M&&e(0,n=M.duration),"visible"in M&&e(1,o=M.visible),"northDesc"in M&&e(2,s=M.northDesc),"panoIndex"in M&&e(3,r=M.panoIndex),"floorIndex"in M&&e(4,a=M.floorIndex),"cameraEnable"in M&&e(5,l=M.cameraEnable),"hoverEnable"in M&&e(6,c=M.hoverEnable),"highlightEnable"in M&&e(7,d=M.highlightEnable),"compassEnable"in M&&e(8,h=M.compassEnable),"roomLabelsEnable"in M&&e(9,u=M.roomLabelsEnable),"roomAreaEnable"in M&&e(10,m=M.roomAreaEnable),"roomNameEnable"in M&&e(11,v=M.roomNameEnable),"ruleLabelsEnable"in M&&e(12,g=M.ruleLabelsEnable),"floorplanData"in M&&e(13,A=M.floorplanData),"lastPanoramaLongitude"in M&&e(14,b=M.lastPanoramaLongitude),"cameraImageUrl"in M&&e(15,y=M.cameraImageUrl),"getRoomAreaText"in M&&e(16,E=M.getRoomAreaText),"getLabelElement"in M&&e(17,k=M.getLabelElement),"getRuleDistanceText"in M&&e(18,S=M.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in M&&e(19,C=M.adaptiveRoomLabelVisibleEnable),"highlightData"in M&&e(20,_=M.highlightData)},[n,o,s,r,a,l,c,d,h,u,m,v,g,A,b,y,E,k,S,C,_]}let da=class extends ce{constructor(t){super(),le(this,t,Gp,Hp,ae,{duration:0,visible:1,northDesc:2,panoIndex:3,floorIndex:4,cameraEnable:5,hoverEnable:6,highlightEnable:7,compassEnable:8,roomLabelsEnable:9,roomAreaEnable:10,roomNameEnable:11,ruleLabelsEnable:12,floorplanData:13,lastPanoramaLongitude:14,cameraImageUrl:15,getRoomAreaText:16,getLabelElement:17,getRuleDistanceText:18,adaptiveRoomLabelVisibleEnable:19,highlightData:20},Qp)}};const Fp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALaADAAQAAAABAAAAMAAAAADe2FZjAAAEF0lEQVRoBe2WzWskRRiHf13V092TxI2oEzYeVDwITtyDuCiihwiCePGgxIM3vYgHL4J4UIhBRA8i/gPqyUvWg7AiIuIeloDiYUHJLOK6BPwIk9nNODM9Xf1RVe1b3elJRjCZmQ6euqGmuqer33rq4e23GqiOykBloDJQGagMVAYqA5WBykBlYFYD1qwP/tdzaZqOx9zYOLxeX0+L5yzLGp0X/03a25MOnGRcBtx+6Rlo9SL08G4EooFnxa8Yiivox5/h5Ys/4cl7NVorNDRnngX+0MIkVMeMSf23zyKML8J7/Dy8hwF2Buh9CnS+AEQIdLspBuGb+M7/qLW4qJrNpsLapjYhpwVnx3BMfCtNNx3Etc9xywvnMf80wG8HmQainw0RxSGrnmeBp+8k5/j9S0HbvXb5io0Lz880/0wPHV1NlhLd316He+4xOCv5ragF7L9PrH1qBJyB0626x/lC+qrSvH5r/W+n1WpxUM5nMY4GPeH8lHJaPgfeAFQHCL+ntkXT+vnUc3W6pvTIwC0wy3rA4dwLmK2avZ7Eo9uKBuYJfgJscbs8dLCxDMt+EOEPBEZNEWyBYHqTz6bPXrzUnNrSShxHIsYiOL69zrCGLLcLqJP68tB+9w5wj+YhWDafQ2s61wNqxjZhmrQ2pvMFCEvXuCUZ7wqH794ZWs28LJqlTXSUyuksF2M/yOwqgkx2c1ADa4wLAQRk2sAGQQakhN6yFC2hltfz5kSY44NKQeeh+vtI/SSzWhg2CzCgmWISmKUGmaYFBDfCSymnfxJ6/+ospVcWOLLp5DGP/y0P/Rp66O99DQNq7Po3Ds0a0wY+My2QSv2N2mO/OyxR2o6UQk+Lv7yJ06JYSnnolZVU9cUn2O9SmaMWGFBqYXRwbqAJWIi94TX5biotpcGl1DXZ6LnqIbNDTnmUgi52Mv5l5ysMxIcZcGjy2DTK4ZHlcBC14zeSge4qphICjj3bS0A7o9nSp2TOkm7aZ8bGZy/jxhO87V91G0+dfY/Z7BWIIK9KYUi5qy/Hf8YfBG3sqJTHiQWhmTVkbip+wX3x6volVSx+LPAxF+VLXhZ8VQ+iP2Rta/iWe5v42Fngj0BbdnRTXh12ZIcKhTaGbcYjybRwXBU1lu9KlndXp04NM52poKWO0RZsviNaP9a6grkO972+st05pXhE5c1hTEluJy7XUejGUQNLMbAmTdWY1rKBLW3aTJqBZ7nZkb36DhYCreeYHbMUXHvaYi5XDK70EcgulmRjm77wNtenzuXCbmnTRaAx493rbGf3Jr/njMzj920CnKdUaFCjlDioy7NYNvOdGrQJNgI32/L2tkXfFPlxgToqjWVhD6KdLnQRdARf/HHQz2r2X2Gqy8pAZaAyUBmoDFQGKgP/q4F/AJYg9/s0ZoABAAAAAElFTkSuQmCC";function Wp(i){return Y(this,null,function*(){const t=new Headers({"Content-Type":"text/plain"}),e=function(o){return Y(this,null,function*(){const s={index:o.index,url:o.url,svgUrl:o.svg_url};if(o.svg_url){const r=yield fetch(o.svg_url,{headers:t}).then(a=>a.text());s.svgContent=r}return s})};return yield Promise.all(i.map(e))})}function Np(i){return{id:i.id,size:i.size,name:i.name,path:i.path,roomType:i.room_type,floorType:i.floor_type,roomLabel:{position:i.room_label.position,positionInImage:i.room_label.position_in_image},observerIndexs:i.observer_indexs}}function Xp(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Np),rules:i.rules}}function Yp(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function Up(i){return{rad:i.rad,position:i.position,positionInImage:i.position_in_image,northRad:i.north_rad,roomId:i.room_id,floorIndex:i.floor_index}}function ln(i){return Y(this,null,function*(){const t=yield Wp(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Xp),o=i.computed_data.entrance?Up(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(Yp)}})}function qp(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:Fp,width:45,height:48},a=up(s,t),l=dp(s,e),c=hp(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function Jp(i,t){return t(i),i}function fs(i,t){return Jp({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function ml(i,t){const e=Math.max(...i.work.observers.map(n=>n.floorIndex));return t>e?i.model.bounding.max.y:Math.max(...i.work.observers.filter(n=>n.floorIndex===t).map(n=>n.standingPosition.y))}function ha(i,t,e=nn.BOUNDING_CENTER){const n=ml(i,t),o=ml(i,t+1);return e===nn.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===nn.CEILING?o:n}function ua(i,t,e,n){const o=ha(i,e,n==null?void 0:n.attachedTo),s=new I.Vector3(0,o,0),r=new I.Vector3(1,o,0),a=s.clone().project(i.camera),l=r.clone().project(i.camera);return Math.abs((l.x-a.x)/1e3)*(t.getBoundingClientRect().width/2)}let eo=class{constructor(t,e){f(this,"VERSION","2.20.7");f(this,"five");f(this,"hooks",new li);f(this,"staticPrefix","//vrlab-static.ljcdn.com");this.five=t,e!=null&&e.staticPrefix&&(this.staticPrefix=e.staticPrefix)}getCurrentState(){return this.state}isAbsoluteURL(t){return na(t)?t:`${this.staticPrefix}${t}`}},Mn=class extends eo{};var At=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(At||{});const uh=500,Zp=80;function Qr(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function fa(i,t){return Y(this,null,function*(){const[e]=yield ii(i.changeMode(...t));if(e)throw new Error("change mode canceled");yield new Promise(r=>{i.once("initAnimationWillStart",()=>{i.once("initAnimationEnded",()=>r())})});const n=t[1];if(!n)return!0;const o=i.getCurrentState();if(!Kp(n,o))throw new Error("pose 与预期不符")})}function Kp(i,t){return Object.keys(i).every(e=>{const n=t[e];if(n===void 0)return!0;const o=i[e];return typeof n=="number"&&typeof o=="number"?Qr(n,o,2):n===o})}function ma(i,t){if(i.currentMode!==t.mode)return!1;const{latitude:e,longitude:n,fov:o}=t,{latitude:s,longitude:r}=i.getCurrentState(),a=i.camera.fov;return!(!Qr(e,s,2)||!Qr(n,r,2)||o!==a)}function fh(i,t,e=!0){return Y(this,null,function*(){if(ma(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[d]=yield ii(fa(i,[t.mode,t,void 0,e]));if(d)throw new Error(At.ChangeModeError);return}const{latitude:s,longitude:r,fov:a}=o,l=Math.min(1e3,Math.max(200,Math.abs(s-Math.PI/2)*1e3,(r>Math.PI?2*Math.PI-r:r)*500,Math.abs(a-t.fov)*10)),[c]=yield ii(i.updateCamera(t,l,e));if(c)throw new Error(At.UpdateCameraError)})}function si(i,t,e=300){const n=i.getElement();n&&(n.style.opacity=t+"",n.style.transition=e===0?"none":`opacity ${e}ms linear`,e!==0&&Promise.race([new Promise(o=>n.addEventListener("transitionend",o,{once:!0})),new Promise(o=>setTimeout(o,e))]).then(()=>{n.style.transition="none"}))}function $p(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function eg(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}let tg=class extends Mn{constructor(e,n){var a;super(e);f(this,"name","modelFloorplanPlugin");f(this,"state");f(this,"data");f(this,"showState");f(this,"showPromise");f(this,"app");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"selector");f(this,"showRejection");f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"show",(...n)=>Y(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));f(this,"hide",(...n)=>Y(this,[...n],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));f(this,"updateSize",()=>{if(!this.data||!ma(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=ua(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,At.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});f(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});f(this,"_show",e=>Y(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(At.ModelNotLoaded);if(!this.data)throw new Error(At.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=F(F({},n),e),s=()=>Y(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield ii(fh(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(At.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,h=o.immediately?0:uh;si(this.five,d,h),this.render(h)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));f(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,At.BreakOffByHide),this.showPromise=void 0;const o=F(F({},{userAction:!0,isAutoHide:!1}),e);si(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});f(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});f(this,"onFiveInteriaPan",(e,n)=>{if(!n||this.state.config.autoShowEnable===!1||this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();o.mode==="Floorplan"&&(this.state.visible||eg(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})))});f(this,"onFivePanoArrived",e=>{var n;(n=this.five)!=null&&n.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();$p(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n,isAutoHide:!0}))});f(this,"onFiveWantsGesture",(e,n)=>{if(this.state.visible&&(n.length>1||e==="mouseWheel"))return!1});f(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode==="Floorplan"&&this.state.config.autoShowEnable!==!1&&n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1});f(this,"onFiveWantsTapGesture",()=>this.handleClick());f(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e==="Floorplan"&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState={mode:"Floorplan",longitude:0,latitude:Math.PI/2,fov:Zp/((a=n==null?void 0:n.scale)!=null?a:1)};const o={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,adaptiveRoomLabelVisibleEnable:!0,cameraImageUrl:an,attachedTo:nn.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"㎡",getRuleDistanceText:l=>l.toString()},s=n?fs(n,["selector","scale"]):{},r=F(F({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Y(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield ln(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}this.render()}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return Y(this,null,function*(){return yield ln(e.data)})}updateState(e,n){const o=this.state,s=e.config?F(F({},o.config),e.config):o.config;this.state=ye(F(F({},this.state),e),{config:s}),!jt(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("interiaPan",this.onFiveInteriaPan),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("interiaPan",this.onFiveInteriaPan),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ye(F({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(n);this.app=new da({target:this.container,intro:!0,props:n})}};const ng=(i,t)=>new tg(i,t);function ig(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)>5*Math.PI/180,o=e>5*(Math.PI/180)&&e<355*(Math.PI/180);return n||o}function og(i){const{latitude:t,longitude:e}=i,n=Math.abs(t-Math.PI/2)<10*Math.PI/180,o=e<30*(Math.PI/180)||e>330*(Math.PI/180);return n&&o}let sg=class extends Mn{constructor(e,n){super(e);f(this,"name","modelFloorplanPlugin");f(this,"state");f(this,"data");f(this,"showState");f(this,"showPromise");f(this,"app");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"selector");f(this,"showRejection");f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"show",(...n)=>Y(this,[...n],function*(e={}){if(!this.state.enabled||!this.showPromise&&this.state.visible)return;const o=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},o),this._show(e)}));f(this,"hide",(...n)=>Y(this,[...n],function*(e={}){this.state.enabled&&(this.isHiddenByHideFunc=!0,this.state.visible!==!1&&(this.updateState({visible:!1},e.userAction||!0),this._hide(e)))}));f(this,"updateSize",()=>{if(!this.data||!ma(this.five,this.showState)||!this.container||!this.wrapper)return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=ua(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var o,s,r;const{userAction:n}=e;this.hooks.emit("disable",{userAction:n}),(o=this.showRejection)==null||o.call(this,At.BreakOffByDisable),this.showPromise=void 0,(s=this.app)==null||s.$destroy(),this.app=void 0,(r=this.container)==null||r.remove(),this.removeEventListener()});f(this,"_enable",e=>{const{userAction:n}=e;this.addEventListener(),this.wrapper&&(this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n}))});f(this,"_show",e=>Y(this,null,function*(){var r;if(!this.state.enabled)return;if(!((r=this.five.model)!=null&&r.loaded))throw new Error(At.ModelNotLoaded);if(!this.data)throw new Error(At.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=F(F({},n),e),s=()=>Y(this,null,function*(){this.hooks.emit("show",{userAction:o.userAction,auto:o.isAutoShow});let a=!1,l;this.showRejection=u=>{a=!0,l=u};const[c]=yield ii(fh(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(At.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,h=o.immediately?0:uh;si(this.five,d,h),this.render(h)});return this.showPromise=s().then(()=>{this.hooks.emit("showAnimationEnded",{auto:o.isAutoShow,userAction:o.userAction})}).catch(a=>{if(this.updateState({visible:!1},o.userAction),!o.isAutoShow&&a instanceof Error)throw a}).finally(()=>{this.showPromise=void 0,this.showRejection=void 0}),this.showPromise}));f(this,"_hide",e=>{var s;(s=this.showRejection)==null||s.call(this,At.BreakOffByHide),this.showPromise=void 0;const o=F(F({},{userAction:!0,isAutoHide:!1}),e);si(this.five,1,0),this.hooks.emit("hide",{auto:o.isAutoHide,userAction:o.userAction}),this.render()});f(this,"handleClick",()=>{if(!this.state.visible)return;if(this.hooks.emit("click"))return!1});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",e=>{e!==this.showState.mode&&(this.updateState({visible:!1},!1),this._hide({userAction:!1}))});f(this,"onFivePanoArrived",e=>{var n;(n=this.five)!=null&&n.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,n)=>{if(!this.state.visible||this.showPromise)return;const o=this.five.getCurrentState();this.updatePosition(),this.updateSize(),ig(o)&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});f(this,"onFiveWantsPanGesture",(e,n)=>{if(this.five.getCurrentState().mode===this.showState.mode&&this.state.config.autoShowEnable!==!1){if(n&&this.state.visible)return this.five.updateCamera(this.showState,0),!1;if(n&&!this.state.visible){if(this.isHiddenByHideFunc)return;const o=this.five.getCurrentState();return o.mode!==this.showState.mode||this.state.visible?void 0:(og(o)&&(this.updateState({visible:!0},!0),this._show({isAutoShow:!0})),!1)}}});f(this,"onFiveWantsTapGesture",()=>this.handleClick());f(this,"onFiveWantsChangeMode",(e,n)=>{n==="Panorama"&&e===this.showState.mode&&(this.lastPanoramaLongitude=this.five.getCurrentState().longitude)});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法")),this.showState={mode:"Mapview",longitude:0,latitude:Math.PI/2,fov:90};const o={northDesc:"北",modelOpacity:1,cameraEnable:!0,highlightEnable:!1,hoverEnable:!0,compassEnable:!0,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,cameraImageUrl:an,attachedTo:nn.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"㎡",getRuleDistanceText:a=>a.toString()},s=n?fs(n,["selector","scale"]):{},r=F(F({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Y(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield ln(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled&&(e.enabled?this._enable({userAction:s}):this._disable({userAction:s})),e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}updatePosition(){var a;const e=ha(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}formatData(e){return Y(this,null,function*(){return yield ln(e.data)})}updateState(e,n){const o=this.state,s=e.config?F(F({},o.config),e.config):o.config;this.state=ye(F(F({},this.state),e),{config:s}),!jt(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:10,pointerEvents:"none"}),this.five.addExtraElement(this.container)}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsPanGesture",this.onFiveWantsPanGesture),e.on("wantsTapGesture",this.onFiveWantsTapGesture),e.on("wantsChangeMode",this.onFiveWantsChangeMode),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modelLoaded",this.onFiveModelLoaded),e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsPanGesture",this.onFiveWantsPanGesture),e.off("wantsTapGesture",this.onFiveWantsTapGesture),e.off("wantsChangeMode",this.onFiveWantsChangeMode),e.off("modelShownFloorChange",this.onModelShownFloorChange)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ye(F({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(n);this.app=new da({target:this.container,intro:!0,props:n})}};const rg=(i,t)=>new sg(i,t);let ag=class extends Mn{constructor(e,n){super(e);f(this,"name","topviewFloorplanPlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"selector");f(this,"panoIndex",0);f(this,"floorIndex",0);f(this,"wrapper");f(this,"container",document.createElement("div"));f(this,"lastPanoramaLongitude",0);f(this,"size",{width:0,height:0});f(this,"hasAddedEventListener",!1);f(this,"isHiddenByHideFunc",!1);f(this,"highlightData",{});f(this,"updateSize",()=>{if(!this.data||!this.container||!this.wrapper||this.five.getCurrentState().mode!=="Topview")return;const{min:e,max:n}=this.data.bounding,o=n.x-e.x,s=n.y-e.y,r=this.state.config.attachedTo?{attachedTo:this.state.config.attachedTo}:void 0,a=ua(this.five,this.wrapper,this.floorIndex,r),l=Math.ceil(o*a),c=Math.ceil(s*a);this.size.width===l&&this.size.height===c||(this.container.style.width=l+"px",this.container.style.height=c+"px",this.size={width:l,height:c})});f(this,"dispose",()=>{var e,n;this.removeEventListener(),(e=this.app)==null||e.$destroy(),this.app=void 0,(n=this.container)==null||n.remove(),this.data=void 0,this.wrapper=void 0,this.selector=void 0,this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var o,s;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,(s=this.container)==null||s.remove(),this.removeEventListener(),this.hooks.emit("disable",{userAction:n})});f(this,"onFiveModelLoaded",()=>{if(this.state.enabled===!1||this.wrapper||!this.selector)return;const e=this.selector instanceof Element?this.selector:document.querySelector(this.selector);if(!e)throw new Error("不正确的父容器选择器");this.wrapper=e,e.append(this.container)});f(this,"onFiveModeChange",(...[e,,,,n])=>{e!=="Topview"&&this.state.visible&&(this.updateState({visible:!1},n),this._hide({userAction:n}))});f(this,"onFivePanoArrived",e=>{var n;(n=this.five)!=null&&n.work&&(this.panoIndex=e,this.floorIndex=this.five.work.observers[e].floorIndex)});f(this,"onFiveCameraUpdate",(e,n)=>{this.state.visible&&(this.updatePosition(),this.updateSize())});f(this,"onFiveWantsGesture",e=>{if(!(e!=="pan"&&e!=="pinch"&&e!=="mouseWheel")&&this.state.visible&&!this.state.config.gestureEnable)return!1});f(this,"onFiveWantsMoveToPano",()=>{if(this.state.visible&&this.state.config.preventRoomClick)return!1});f(this,"onFiveInitAnimationEnded",(...[,,e])=>{const{mode:n}=this.five.getCurrentState();n==="Topview"&&!this.isHiddenByHideFunc&&!this.state.visible&&this.state.config.autoShowEnable&&(this.updateState({visible:!0},e),this._show({userAction:e}))});f(this,"onModelShownFloorChange",e=>{if(this.floorIndex!==e){if(e===null){const n=this.five.getCurrentState().panoIndex;this.floorIndex=this.five.work.observers[n].floorIndex;return}this.floorIndex=e,this.updateSize(),this.render()}});n!=null&&n.selector&&(this.selector=n.selector,console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"));const o={northDesc:"北",modelOpacity:1,cameraEnable:!0,hoverEnable:!0,highlightEnable:!1,compassEnable:!0,gestureEnable:!1,autoShowEnable:!0,ruleLabelsEnable:!0,roomLabelsEnable:!0,roomAreaEnable:!0,roomNameEnable:!0,cameraImageUrl:an,attachedTo:nn.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"㎡",getRuleDistanceText:a=>a.toString()},s=n?fs(n,["selector","scale"]):{},r=F(F({},o),s);this.state={enabled:!0,visible:!1,config:r},this.initContainer(),e.model.loaded?this.onFiveModelLoaded():e.once("modelLoaded",this.onFiveModelLoaded),e.once("dispose",this.dispose),this.addEventListener()}load(e,n,o=!0){return Y(this,null,function*(){function s(d){return Object.prototype.hasOwnProperty.apply(d,["version"])}const r=e;r&&!r.version&&console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");const a=JSON.parse(JSON.stringify(e)),l=s(a)?a.data:a,c=this.data;this.data=yield ln(l),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,c),n&&this.updateState(n,o),this.render()})}updatePosition(){var a;const e=ha(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new I.Vector3).setY(e);if(!n)return;const o=n.clone().project(this.five.camera),s=(o.x+1)/2,r=-(o.y-1)/2;this.container.style.left=s*100+"%",this.container.style.top=r*100+"%"}appendTo(e){if(this.wrapper=e,!!this.state.enabled)return e.appendChild(this.container),this.render(),this}show(){return Y(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return Y(this,arguments,function*(e={}){if(this.isHiddenByHideFunc=!0,!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}changeConfigs(e,n=!0){this.updateState({config:e},n),this.render()}formatData(e){return Y(this,null,function*(){return yield ln(e.data)})}_show(e){return Y(this,null,function*(){if(!this.state.enabled)return;this.isHiddenByHideFunc=!1;const{userAction:n}=e;this.hooks.emit("show",{userAction:n,auto:!1}),this.five.getCurrentState().mode!=="Topview"&&(yield fa(this.five,["Topview",void 0,void 0,n])),this.five.model.show(this.floorIndex),this.updatePosition(),this.updateSize();const o=500,s=this.state.config.modelOpacity;si(this.five,s,o),this.hooks.emit("showAnimationEnded",{userAction:n,auto:!1}),this.render()})}_hide(e){return Y(this,null,function*(){if(!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n,auto:!1});const o=1,s=0;si(this.five,o,s),this.render()})}_enable(e){const{userAction:n}=e;this.addEventListener(),this.wrapper&&this.wrapper.append(this.container),this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}updateState(e,n){const o=this.state,s=e.config?F(F({},o.config),e.config):o.config;this.state=ye(F(F({},this.state),e),{config:s}),!jt(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}addEventListener(){if(!this.state.enabled||this.hasAddedEventListener)return;const e=this.five;e.on("modeChange",this.onFiveModeChange),e.on("panoArrived",this.onFivePanoArrived),e.on("cameraUpdate",this.onFiveCameraUpdate),e.on("wantsGesture",this.onFiveWantsGesture),e.on("wantsMoveToPano",this.onFiveWantsMoveToPano),e.on("initAnimationEnded",this.onFiveInitAnimationEnded),e.on("modelShownFloorChange",this.onModelShownFloorChange)}removeEventListener(){const e=this.five;this.hasAddedEventListener=!1,e.off("modeChange",this.onFiveModeChange),e.off("panoArrived",this.onFivePanoArrived),e.off("cameraUpdate",this.onFiveCameraUpdate),e.off("wantsGesture",this.onFiveWantsGesture),e.off("wantsMoveToPano",this.onFiveWantsMoveToPano),e.off("initAnimationEnded",this.onFiveInitAnimationEnded),e.off("modelShownFloorChange",this.onModelShownFloorChange)}initContainer(){this.container.classList.add("floorplan-plugin"),Object.assign(this.container.style,{position:"absolute",left:"50%",top:"50%",transform:"translate3d(-50%, -50%, 10px)",zIndex:10,pointerEvents:"none","will-change":"width, height"}),this.five.addExtraElement(this.container)}render(e){if(!this.state.enabled||!this.container||!this.data||this.size.width===0)return;const n=ye(F({},this.state.config),{visible:this.state.visible,duration:e!=null?e:0,panoIndex:this.panoIndex,floorIndex:this.floorIndex,floorplanData:this.data,lastPanoramaLongitude:this.lastPanoramaLongitude,highlightData:this.highlightData});if(this.app)return this.app.$set(n);this.app=new da({target:this.container,intro:!0,props:n})}};const lg=(i,t)=>new ag(i,t);function pa(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function cg(i){fe(i,"svelte-1nqrlxd",".plugin-radar__camera-wrapper.svelte-1nqrlxd{width:100%;height:100%;position:absolute;pointer-events:none}.plugin-radar__camera-position.svelte-1nqrlxd{position:absolute;left:0;top:0;width:0;height:0;transform:none;pointer-events:none;transition:transform 1s linear}.plugin-radar__camera-rotate.svelte-1nqrlxd{position:absolute;left:-0.9375rem;top:-0.9375rem;width:1.0625rem;height:1.0625rem;transform-origin:0.9375rem 0.9375rem;transform:rotate(45deg);background-repeat:no-repeat;background-size:100%}")}function dg(i){let t,e,n;return{c(){t=z("div"),e=z("div"),n=z("div"),w(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),T(n,"background-image","url("+(i[0]||an)+")"),T(n,"transform",i[1]),w(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),T(e,"transform",i[2]),w(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){j(o,t,s),O(t,e),O(e,n)},p(o,[s]){s&1&&T(n,"background-image","url("+(o[0]||an)+")"),(s&1||s&3)&&T(n,"transform",o[1]),s&4&&T(e,"transform",o[2])},i:K,o:K,d(o){o&&V(t)}}}function hg(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function ug(i,t,e){let n,o,{five:s}=t,{pxmm:r}=t,{floorplanData:a}=t,{cameraImageUrl:l}=t,c=s.getCurrentState().panoIndex,d=s.getCurrentState().longitude;function h(v,g){const A=v.bounding,b=v.observers[g];if(!b)return"";const y=(A.max.x-A.min.x)*r,E=(A.max.y-A.min.y)*r,k=Math.floor(b.positionInImage.x*y),S=Math.floor(b.positionInImage.y*E);return`translate(${k}px, ${S}px)`}function u(v){e(6,c=v)}const m=pa(v=>{e(7,d=v.longitude)},1e3/60);return Mt(()=>(s.on("panoWillArrive",u),s.on("cameraDirectionUpdate",m),function(){s.off("panoWillArrive",u),s.off("cameraDirectionUpdate",m)})),i.$$set=v=>{"five"in v&&e(3,s=v.five),"pxmm"in v&&e(4,r=v.pxmm),"floorplanData"in v&&e(5,a=v.floorplanData),"cameraImageUrl"in v&&e(0,l=v.cameraImageUrl)},i.$$.update=()=>{i.$$.dirty&96&&e(2,n=h(a,c)),i.$$.dirty&128&&e(1,o=hg(d))},[l,o,n,s,r,a,c,d]}class fg extends ce{constructor(t){super(),le(this,t,ug,dg,ae,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},cg)}}function mg(i){fe(i,"svelte-1i87fz7",".plugin-pano-floorplan__extra-objects.svelte-1i87fz7{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.plugin-pano-floorplan__extra-object-item--position.svelte-1i87fz7{position:absolute;width:0;height:0}.plugin-pano-floorplan__extra-object-item.svelte-1i87fz7{transform:translate(-50%, -50%)}")}function pl(i,t,e){const n=i.slice();return n[1]=t[e],n}function gl(i,t){let e,n,o=`${t[1].icon.width/16}rem`,s=`${t[1].icon.height/16}rem`,r,a=`${t[1].positionInImage.y*100}%`,l=`${t[1].positionInImage.x*100}%`;return{key:i,first:null,c(){e=z("div"),n=z("div"),r=ne(),w(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),T(n,"background-image",`url(${t[1].icon.url})`),T(n,"width",o),T(n,"height",s),w(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),T(e,"top",a),T(e,"left",l),this.first=e},m(c,d){j(c,e,d),O(e,n),O(e,r)},p(c,d){t=c,d&1&&T(n,"background-image",`url(${t[1].icon.url})`);const h=d&1;h&&T(n,"width",o),h&&T(n,"height",s),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&T(e,"top",a),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&T(e,"left",l)},d(c){c&&V(e)}}}function pg(i){let t,e=[],n=new Map,o=i[0];const s=r=>r[1].id;for(let r=0;r<o.length;r+=1){let a=pl(i,o,r),l=s(a);n.set(l,e[r]=gl(l,a))}return{c(){t=z("div");for(let r=0;r<e.length;r+=1)e[r].c();w(t,"class","plugin-pano-floorplan__extra-objects svelte-1i87fz7")},m(r,a){j(r,t,a);for(let l=0;l<e.length;l+=1)e[l]&&e[l].m(t,null)},p(r,[a]){a&1&&(o=r[0],e=St(e,a,s,1,r,o,n,t,aa,gl,null,pl))},i:K,o:K,d(r){r&&V(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function gg(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class vg extends ce{constructor(t){super(),le(this,t,gg,pg,ae,{extraObjects:0},mg)}}function vl(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[7],highlightData:i[5],hoveredRoom:void 0}];let o={};for(let s=0;s<n.length;s+=1)o=Ze(o,n[s]);return t=new hh({props:o}),{c(){ie(t.$$.fragment)},m(s,r){ee(t,s,r),e=!0},p(s,r){const a=r&183?st(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[7],highlightData:s[5],hoveredRoom:void 0}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){te(t,s)}}}function Ag(i){let t,e,n,o,s,r;const a=[{floorIndex:i[2],floorplanData:i[4]}];let l={};for(let d=0;d<a.length;d+=1)l=Ze(l,a[d]);t=new ch({props:l}),n=new vg({props:{extraObjects:i[6]}});let c=i[3]&&vl(i);return{c(){ie(t.$$.fragment),e=ne(),ie(n.$$.fragment),o=ne(),c&&c.c(),s=Ee()},m(d,h){ee(t,d,h),j(d,e,h),ee(n,d,h),j(d,o,h),c&&c.m(d,h),j(d,s,h),r=!0},p(d,[h]){const u=h&20?st(a,[{floorIndex:d[2],floorplanData:d[4]}]):{};t.$set(u);const m={};h&64&&(m.extraObjects=d[6]),n.$set(m),d[3]?c?(c.p(d,h),h&8&&x(c,1)):(c=vl(d),c.c(),x(c,1),c.m(s.parentNode,s)):c&&(de(),L(c,1,1,()=>{c=null}),he())},i(d){r||(x(t.$$.fragment,d),x(n.$$.fragment,d),x(c),r=!0)},o(d){L(t.$$.fragment,d),L(n.$$.fragment,d),L(c),r=!1},d(d){te(t,d),d&&V(e),te(n,d),d&&V(o),c&&c.d(d),d&&V(s)}}}function bg(i,t,e){let n,{five:o}=t,{pxmm:s}=t,{floorIndex:r}=t,{hoverEnable:a}=t,{floorplanData:l}=t,{extraObjects:c=[]}=t,{highlightData:d}=t;const h=void 0;return i.$$set=u=>{"five"in u&&e(0,o=u.five),"pxmm"in u&&e(1,s=u.pxmm),"floorIndex"in u&&e(2,r=u.floorIndex),"hoverEnable"in u&&e(3,a=u.hoverEnable),"floorplanData"in u&&e(4,l=u.floorplanData),"extraObjects"in u&&e(8,c=u.extraObjects),"highlightData"in u&&e(5,d=u.highlightData)},i.$$.update=()=>{i.$$.dirty&260&&e(6,n=c==null?void 0:c.filter(u=>u.floorIndex===r))},[o,s,r,a,l,d,n,h,c]}class yg extends ce{constructor(t){super(),le(this,t,bg,Ag,ae,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:8,highlightData:5})}}function wg(i){fe(i,"svelte-1mvqyqq",".plugin-floorplan-radar.svelte-1mvqyqq{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plugin-floorplan-radar-container.svelte-1mvqyqq{position:relative}")}function Al(i){let t,e,n,o,s=i[7]!==0&&bl(i);return{c(){t=z("div"),s&&s.c(),w(t,"class","plugin-floorplan-radar svelte-1mvqyqq")},m(r,a){j(r,t,a),s&&s.m(t,null),e=!0,n||(o=[Ut(vi.call(null,t)),Ce(t,"clientWidth",i[13]),Ce(t,"clientHeight",i[14])],n=!0)},p(r,a){r[7]!==0?s?(s.p(r,a),a&128&&x(s,1)):(s=bl(r),s.c(),x(s,1),s.m(t,null)):s&&(de(),L(s,1,1,()=>{s=null}),he())},i(r){e||(x(s),e=!0)},o(r){L(s),e=!1},d(r){r&&V(t),s&&s.d(),n=!1,rt(o)}}}function bl(i){let t,e,n,o,s=`${i[9]}px`,r=`${i[12]}px`,a;const l=[{five:i[0],pxmm:i[10],floorIndex:i[11],floorplanData:i[3],hoverEnable:i[2],extraObjects:i[5],highlightData:i[6]}];let c={};for(let u=0;u<l.length;u+=1)c=Ze(c,l[u]);e=new yg({props:c});const d=[{pxmm:i[10],five:i[0],floorplanData:i[3],cameraImageUrl:i[4]}];let h={};for(let u=0;u<d.length;u+=1)h=Ze(h,d[u]);return o=new fg({props:h}),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),ie(o.$$.fragment),w(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),T(t,"width",s),T(t,"height",r)},m(u,m){j(u,t,m),ee(e,t,null),O(t,n),ee(o,t,null),a=!0},p(u,m){const v=m&3181?st(l,[{five:u[0],pxmm:u[10],floorIndex:u[11],floorplanData:u[3],hoverEnable:u[2],extraObjects:u[5],highlightData:u[6]}]):{};e.$set(v);const g=m&1049?st(d,[{pxmm:u[10],five:u[0],floorplanData:u[3],cameraImageUrl:u[4]}]):{};o.$set(g),m&512&&s!==(s=`${u[9]}px`)&&T(t,"width",s),m&4096&&r!==(r=`${u[12]}px`)&&T(t,"height",r)},i(u){a||(x(e.$$.fragment,u),x(o.$$.fragment,u),a=!0)},o(u){L(e.$$.fragment,u),L(o.$$.fragment,u),a=!1},d(u){u&&V(t),te(e),te(o)}}}function Pg(i){let t,e,n=i[1]&&Al(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=Al(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function Cg(i,t,e){var E,k;let{five:n}=t,{visible:o}=t,{hoverEnable:s}=t,{floorplanData:r}=t,{cameraImageUrl:a}=t,{extraObjects:l=[]}=t,{highlightData:c}=t,d=0,h=(k=(E=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:E.floorIndex)!=null?k:0,u=0,m=0,v=0,g=0;function A(S){e(11,h=n.work.observers[S].floorIndex)}Mt(()=>(n.on("panoArrived",A),()=>{n.off("panoArrived",A)}));const b=S=>{e(7,u=S.detail)},y=S=>{e(8,m=S.detail)};return i.$$set=S=>{"five"in S&&e(0,n=S.five),"visible"in S&&e(1,o=S.visible),"hoverEnable"in S&&e(2,s=S.hoverEnable),"floorplanData"in S&&e(3,r=S.floorplanData),"cameraImageUrl"in S&&e(4,a=S.cameraImageUrl),"extraObjects"in S&&e(5,l=S.extraObjects),"highlightData"in S&&e(6,c=S.highlightData)},i.$$.update=()=>{if(i.$$.dirty&904){const S=Math.min(u,m),{max:C,min:_}=r.bounding,M=C.x-_.x,X=C.y-_.y,J=function(){return M>X?[S,S/M*X]:[S/X*M,S]}();e(9,v=J[0]),e(12,g=J[1]),e(10,d=v/M)}},[n,o,s,r,a,l,c,u,m,v,d,h,g,b,y]}class Eg extends ce{constructor(t){super(),le(this,t,Cg,Pg,ae,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6},wg)}}let Ig=class extends Mn{constructor(e,n){super(e);f(this,"name","panoFloorplanRadarPlugin");f(this,"state");f(this,"data");f(this,"app");f(this,"wrapperSelector","");f(this,"wrapper",null);f(this,"disposed",!1);f(this,"extraObjects",[]);f(this,"highlightData",{});f(this,"dispose",()=>{var e;this.disposed=!0,(e=this.app)==null||e.$destroy(),this.wrapper=null,this.wrapperSelector="",this.hooks.emit("dispose")});f(this,"highlight",e=>{this.state.config.highlightEnable&&(this.highlightData=e,this.render())});f(this,"unhighlight",()=>{this.highlightData={},this.render()});f(this,"_disable",e=>{var o;const{userAction:n}=e;(o=this.app)==null||o.$destroy(),this.app=void 0,this.hooks.emit("disable",{userAction:n})});this.five=e;const o={hoverEnable:!0,highlightEnable:!0,cameraImageUrl:an},s=n!=null&&n.configs?n.configs:{},r=F(F({},o),s);this.state={enabled:!0,visible:!0,config:r},n!=null&&n.wrapper&&console.warn("不推荐继续使用 params.selector 配置父容器,请使用 appendTo 方法"),typeof(n==null?void 0:n.wrapper)=="string"?this.wrapperSelector=n.wrapper:(n==null?void 0:n.wrapper)instanceof Element&&(this.wrapper=n.wrapper),e.once("dispose",this.dispose)}load(e,n,o=!0){return Y(this,null,function*(){function s(c){return Object.prototype.hasOwnProperty.apply(c,["version"])}const r=JSON.parse(JSON.stringify(e)),a=s(r)?r.data:r,l=this.data;this.data=yield ln(a),this.hooks.emit("dataLoaded",this.data),this.hooks.emit("dataChange",this.data,l),n&&this.updateState(n,o),this.render()})}show(){return Y(this,arguments,function*(e={}){if(this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!0},n),this._show({userAction:n})})}hide(){return Y(this,arguments,function*(e={}){if(!this.state.visible)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({visible:!1},n),this._hide({userAction:n})})}enable(e={}){if(this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!0},e.userAction||n),this._enable({userAction:n})}disable(e={}){if(!this.state.enabled)return;const n=e.userAction!==void 0?e.userAction:!0;this.updateState({enabled:!1},e.userAction||n),this._disable({userAction:n})}setState(e,n={}){const o=this.state,s=n.userAction!==void 0?n.userAction:!0;if(this.updateState(e,s),e.enabled!==void 0&&o.enabled!==e.enabled){const r={userAction:s};e.enabled?this._enable(r):this._disable(r)}if(e.visible!==void 0&&o.visible!==e.visible){const r={userAction:s};e.visible?this._show(r):this._hide(r)}}appendTo(e){this.wrapper=e,this.render()}changeConfigs(e,n=!0){this.setState({config:e},{userAction:n}),this.render()}setExtraObjectsWith3DPositions(e){this.data&&(this.extraObjects=qp(e,this.five,this.data),this.render())}formatData(e){return Y(this,null,function*(){return yield ln(e.data)})}_enable(e){const{userAction:n}=e;this.hooks.emit("enable",{userAction:n}),this.state.visible&&this._show({userAction:n})}_show(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("show",{userAction:n}),this.render()}_hide(e){if(this.disposed||!this.state.enabled)return;const{userAction:n}=e;this.hooks.emit("hide",{userAction:n}),this.render()}updateState(e,n){const o=this.state;this.state=F(F({},this.state),e),!jt(this.state,o,{deep:!0})&&this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n})}render(){if(this.disposed||!this.state.enabled)return;if(!this.wrapper&&this.wrapperSelector){const n=document.querySelector(this.wrapperSelector);this.wrapper=n}if(!this.data||!this.wrapper)return;const e=ye(F({},this.state.config),{five:this.five,floorplanData:this.data,visible:this.state.visible,extraObjects:this.extraObjects,highlightData:this.highlightData});this.app?this.app.$set(e):this.app=new Eg({target:this.wrapper,props:e})}};const kg=(i,t)=>new Ig(i,t),xg=[{type:0,floorType:1,roomType:"100900000012",name:"其他"},{type:1,floorType:1,roomType:"100900000002",name:"客厅"},{type:2,floorType:1,roomType:"100900000002",name:"餐厅"},{type:3,floorType:0,roomType:"100900000001",name:"卧室"},{type:4,floorType:0,roomType:"100900000001",name:"书房"},{type:5,floorType:3,roomType:"100900000004",name:"卫生间"},{type:6,floorType:3,roomType:"100900000004",name:"淋浴间"},{type:7,floorType:3,roomType:"100900000004",name:"洗手间"},{type:8,floorType:3,roomType:"100900000003",name:"厨房"},{type:9,floorType:1,roomType:"100900000003",name:"开放厨房",onlySubArea:!0},{type:10,floorType:0,roomType:"100900000001",name:"多功能间"},{type:11,floorType:0,roomType:"100900000009",name:"保姆间"},{type:12,floorType:4,roomType:"100900000005",name:"阳台"},{type:13,floorType:4,roomType:"100900000006",name:"露台"},{type:14,floorType:0,roomType:"100900000008",name:"储物间"},{type:15,floorType:0,roomType:"100900000013",name:"衣帽间"},{type:16,floorType:0,roomType:"100900000011",name:"阁楼"},{type:17,floorType:2,roomType:"100900000007",name:"花园"},{type:18,floorType:5,roomType:"100900000010",name:"车库"},{type:19,floorType:1,roomType:"100900000012",name:"电梯"},{type:20,floorType:1,roomType:"100900000012",name:"地下室"},{type:21,floorType:1,roomType:"100900000012",name:"天井"},{type:22,floorType:1,roomType:"100900000012",name:"阳光房"},{type:23,floorType:1,roomType:"100900000012",name:"过道"},{type:24,floorType:1,roomType:"100900000012",name:"楼梯间"},{type:25,floorType:1,roomType:"100900000012",name:"门厅"},{type:26,floorType:2,roomType:"100900000012",name:"入户花园"},{type:27,floorType:1,roomType:"100900000012",name:"玄关"},{type:28,floorType:1,roomType:"100900000012",name:"挑空"},{type:29,floorType:4,roomType:"100900000012",name:"晾晒区"},{type:30,floorType:4,roomType:"100900000012",name:"洗衣房"},{type:31,floorType:0,roomType:"100900000012",name:"娱乐区"},{type:32,floorType:0,roomType:"100900000012",name:"健身区"},{type:33,floorType:0,roomType:"100900000012",name:"接待区"},{type:34,floorType:0,roomType:"100900000012",name:"影音区"},{type:35,floorType:1,roomType:"100900000012",name:"餐饮区"},{type:36,floorType:1,roomType:"100900000012",name:"其他",onlySubArea:!0},{type:37,floorType:1,roomType:"100900000002",name:"起居室"},{type:38,floorType:0,roomType:"100900000001",name:"主卧"},{type:39,floorType:0,roomType:"100900000001",name:"次卧"},{type:40,floorType:0,roomType:"100900000001",name:"优化间"},{type:41,floorType:0,roomType:"100900000001",name:"办公室"},{type:42,floorType:0,roomType:"100900000001",name:"会议室"},{type:43,floorType:0,roomType:"100900000001",name:"洽谈间"},{type:44,floorType:1,roomType:"100900000002",name:"共享大厅"},{type:45,floorType:1,roomType:"100900000012",name:"水吧"},{type:46,floorType:0,roomType:"100900000015",name:"出入口"},{type:47,floorType:0,roomType:"100900000015",name:"大厅"},{type:48,floorType:0,roomType:"100900000015",name:"包厢"},{type:49,floorType:0,roomType:"100900000015",name:"其他"},{type:50,floorType:0,roomType:"100900000016",name:"出入口"},{type:51,floorType:0,roomType:"100900000016",name:"办公区"},{type:52,floorType:0,roomType:"100900000016",name:"老板间"},{type:53,floorType:0,roomType:"100900000016",name:"会议室"},{type:54,floorType:0,roomType:"100900000016",name:"休息区/水吧"},{type:55,floorType:0,roomType:"100900000016",name:"其他"},{type:56,floorType:2,roomType:"100900000012",name:"空中花园"},{type:57,floorType:0,roomType:"100900000001",name:"洋室"},{type:58,floorType:0,roomType:"100900000001",name:"和室"}],Dg=[{type:0,description:"木质地板"},{type:1,description:"瓷砖地面"},{type:2,description:"户外地面"},{type:3,description:"卫生间地面"},{type:4,description:"阳台地面"},{type:5,description:"车库地面"}],Mg=[{roomType:"100900000001",description:"室"},{roomType:"100900000002",description:"厅"},{roomType:"100900000003",description:"厨"},{roomType:"100900000004",description:"卫"},{roomType:"100900000005",description:"阳台"},{roomType:"100900000006",description:"露台"},{roomType:"100900000007",description:"花园"},{roomType:"100900000008",description:"储"},{roomType:"100900000009",description:"保姆间"},{roomType:"100900000010",description:"车库"},{roomType:"100900000011",description:"阁楼"},{roomType:"100900000012",description:"其他"},{roomType:"100900000013",description:"衣"},{roomType:"100900000015",description:"商铺"},{roomType:"100900000016",description:"写字楼"}],mr=(i,t,e)=>{const n=new I.Matrix4,o=new I.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},Sg=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(mr(o,0,0)),s&&i.applyMatrix4(mr(0,s,0)),r&&i.applyMatrix4(mr(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function mh(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=F({map:o.material.map||{}},t);o.material=new R.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const Lg=(i,t)=>{var d;const e=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/dipan2.f38a21cc.FBX",n=(d=t.north_rad)!=null?d:void 0,o={},s=h=>Y(exports,null,function*(){var Q;const u=(h==null?void 0:h.fbx_url)||e,m=(Q=h==null?void 0:h.north_rad)!=null?Q:n;if(typeof m!="number")throw new Error('"northRad"配置参数缺失:未配置指南针指向!');const v=i.model.bounding,g=v.max.x-v.min.x,A=v.max.z-v.min.z,b=Math.max(g,A),E=yield new wd.FBXLoader().loadAsync(u);mh(E,{transparent:!0,side:I.DoubleSide,blending:I.AdditiveBlending});const k=[0,m-Math.PI/2,0],{model:{bounding:{max:{x:S,z:C},min:{x:_,y:M,z:X}}}}=i;o.yBase=M;const J={x:(S+_)/2,y:M-1.6,z:(C+X)/2},H=.0045*b;return Sg(E,{position:J,rotation:k,scale:H}),o.object=E,!0}),r=({latitude:h})=>{if(!o.object)return;const u=a(h);u&&(o.object.position.y=u)},a=h=>{if(o.yBase===void 0)return;const u=.6;if(h>=Math.PI/4)return o.yBase-(u+1.6);const m=h*(4/Math.PI);return o.yBase-(u*m+1.6)};return{load:s,disable:()=>{o.object&&(i.scene.remove(o.object),i.needsRender=!0,i.off("cameraDirectionUpdate",r))},enable:()=>{if(!o.object)return;const h=a(i.getPose().latitude);h&&(o.object.position.y=h),i.scene.add(o.object),i.needsRender=!0,i.on("cameraDirectionUpdate",r)}}};function Tg(i,t){var c,d,h,u,m;const e=(c=t==null?void 0:t.size)!=null?c:512,n=(d=t==null?void 0:t.fontSize)!=null?d:e*(35/256)*1.2,o=(h=t==null?void 0:t.backgroundColor)!=null?h:"rgba(0,0,0,0)",s=(u=t==null?void 0:t.fontColor)!=null?u:"#fff",r=(m=t==null?void 0:t.textAlign)!=null?m:"center",a=document.createElement("canvas");a.setAttribute("width",e+""),a.setAttribute("height",e+"");const l=a.getContext("2d");return l.fillStyle=o,l.fillRect(0,0,e,e),l.font=`${n}px "微软雅黑"`,l.textAlign=r,l.fillStyle=s,l.fillText(i,e/2,e*.7),new R.CanvasTexture(a)}const zg=({x:i,y:t,z:e})=>new R.Vector3(i,t,e),_g=(i,t)=>{var g,A,b;const e={},n=(g=t.animationEnabled)!=null?g:!0,o=(A=t.position)!=null?A:void 0,s=(b=t.rad)!=null?b:void 0,r=t.fbx_url||"//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx",a=[],l=y=>Y(exports,null,function*(){var J,H,Q,G,B,W,q,U;const E=(J=y==null?void 0:y.position)!=null?J:o;if(!E)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const k=zg(E),S=(H=y==null?void 0:y.rad)!=null?H:s,C=(Q=y==null?void 0:y.fbx_url)!=null?Q:r;if(e.rad=S,S===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${S}`));const _=yield new wd.FBXLoader().loadAsync(C);_.position.copy(k),_.rotation.z=S,_.scale.set(.8,.8,.8),mh(_,{transparent:!0,side:I.DoubleSide});const M=(q=(W=(B=(G=_.children)==null?void 0:G[0])==null?void 0:B.children)==null?void 0:W[3])==null?void 0:q.clone();if(!M)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${M}`));const X=(U=t.name)!=null?U:"入户门";return M.material=new R.MeshBasicMaterial({transparent:!0,map:Tg(X)}),M.renderOrder=3,_.children[0].add(M),e.object=_,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,E=new R.AnimationMixer(e.object);a.push(E);const k=E.clipAction(e.object.animations[0]);k.timeScale=y;let S;const C=()=>{let J=0,H=0;const Q=1e3/30,G=B=>{J=requestAnimationFrame(G);const W=B-H;W<Q||(H=B,a.forEach(q=>q.update(W/1e3)),i.needsRender=!0)};return J=requestAnimationFrame(G),()=>{cancelAnimationFrame(J)}},X={play:()=>{S||(k.play(),S=C(),requestAnimationFrame(()=>{e.object&&e.object.rotation.z!==e.rad&&(e.object.rotation.z=e.rad)}))},stop:()=>{k.stop(),S==null||S(),S=void 0}};e.animation=X},d=y=>{var k;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.enable(): object is ",e.object);((k=y==null?void 0:y.animationEnable)!=null?k:n)&&(e.animation||c(),e.animation.play()),i.scene.add(e.object),i.needsRender=!0},h=()=>{e.object&&(e.animation&&e.animation.stop(),i.scene.remove(e.object),i.needsRender=!0)},u=y=>y==="Floorplan"?d():h();return{load:l,enable:y=>(e.enabled||(e.enabled=!0,u(i.currentMode),i.on("modeChange",u),d(y)),!0),disable:()=>(e.enabled&&(e.enabled=!1,h(),i.off("modeChange",u)),!0)}},Vg=kt;function jg(i,t,e,n=Vg.Linear.None){const o=new is(i).to(t,e).easing(n);rs(()=>o.start(0));const s=$i(a=>{o.update(a)===!1&&s()}),r=[];return o.onDestroy=a=>(r.push(a),o),o.destroy=function(){this.stop(),Object.assign(o,{_onStartCallback:null,_onUpdateCallback:null,_onCompleteCallback:null,_onStopCallbackL:null});let a;for(;a=r.shift();)a();s()},o}function Og(i,t){return jg({progress:0},{progress:1},i,t)}var ph=(i=>(i.Move="Move",i.Rotate="Rotate",i))(ph||{}),Vt=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(Vt||{});const Bo=Math.PI*2;function yl(i){return(i%Bo+Bo)%Bo}function wl(i){return i%Bo}function pr(i,t,e){return i+(t-i)*e}const Hr=(i,t,e)=>{const n=Math.PI,o=n*2;let s=yl(i),r=yl(t);return e===Vt.Anticlockwise&&s<r&&(s+=o),e===Vt.Clockwise&&r<s&&(r+=o),e===Vt.Loop&&r-s>n?Hr(s,r,Vt.Anticlockwise):e===Vt.Loop&&s-r>n?Hr(s,r,Vt.Clockwise):{from:s,to:r}},Bg=i=>{const t={},e=(l,c,...d)=>Y(exports,[l,c,...d],function*(s,r,a={preload:!0}){return t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),s.mode&&s.mode!==i.currentMode&&(yield i.changeMode(s.mode)),a.preload&&s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(yield i.preloadPano(s.panoIndex)),a.asyncEndCallback&&(yield a.asyncEndCallback()),s.panoIndex===void 0&&s.fov===void 0&&s.latitude===void 0&&s.longitude===void 0?!0:yield new Promise((h,u)=>{const m=s.panoIndex!==void 0?s.panoIndex:i.panoIndex;m!==void 0?i.moveToPano(m,F({duration:r,moveEndCallback:()=>h(!0),moveCancelCallback:()=>u(new Error("move canceled"))},s)):u(new Error("unexpected error"))})}),n=s=>{const r=i.state,a=wl(r.latitude),l=wl(s.latitude),{from:c,to:d}=Hr(r.longitude,s.longitude,s.rotation||Vt.Loop),h=r.fov,u=s.fov;return{from:{latitude:a,longitude:c,fov:h},to:{latitude:l,longitude:d,fov:u}}};return{move:e,rotate:(l,c,...d)=>Y(exports,[l,c,...d],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==ze.Five.Mode.Panorama&&(yield i.changeMode(ze.Five.Mode.Panorama)),s.panoIndex!==void 0&&s.panoIndex!==i.panoIndex&&(a.preload&&(yield i.preloadPano(s.panoIndex)),yield new Promise((m,v)=>{if(!s.panoIndex){m(!0);return}i.moveToPano(s.panoIndex,{moveEndCallback:()=>m(!0),moveCancelCallback:()=>v(new Error("move canceled"))})})),a.asyncEndCallback&&(yield a.asyncEndCallback());const{from:h,to:u}=n(s);return yield new Promise(m=>{const v=({progress:E})=>{const k={};k.longitude=pr(h.longitude,u.longitude,E),k.latitude=pr(h.latitude,u.latitude,E),k.fov=pr(h.fov,u.fov,E),i.setState(k,!0)},g=()=>{m(!0)},A=()=>{m(!1)},b=s.rotateSpeed?Math.ceil(Math.abs(u.longitude-h.longitude)/s.rotateSpeed*1e3):r,y=Og(b,kt.Linear.None).onUpdate(v).onComplete(g).onDestroy(A);s.rotation===Vt.Loop&&y.repeat(1/0).yoyo(!0),t.interruptCallback=(E=!0)=>{y.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),m(E)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function Pl(i,t){return i.x===t.x&&i.y===t.y}function gh(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function Zo(i,t){return(t.y-i.y)/(t.x-i.x)}function vh(i,t,e){const n=Zo(i[1],i[0]),o=Zo(t[1],t[0]);if(isNaN(n)||isNaN(o)||gh(n,o))return!1;if(Io(i[0],t))return i[0];if(Io(i[1],t))return i[1];if(Io(t[0],i))return t[0];if(Io(t[1],i))return t[1];if(e&&!Rg(i,t))return!1;const s=i[0],r=t[0];if(Math.abs(n)===1/0)return{x:s.x,y:t[1].y-(t[1].x-s.x)*o};if(Math.abs(o)===1/0)return{x:r.x,y:i[1].y-(i[1].x-r.x)*n};const a=(r.y-s.y+n*s.x-o*r.x)/(n-o),l=n*a-n*s.x+s.y;return{x:a,y:l}}function Io(i,t){return Pl(i,t[0])||Pl(i,t[1])?!0:(t[0].x-i.x)*(i.x-t[1].x)>=0&&(t[0].y-i.y)*(i.y-t[1].y)>=0&&gh(Zo(t[0],i),Zo(i,t[1]))}function ko(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function Rg(i,t){return Math.max(i[0].x,i[1].x)>=Math.min(t[0].x,t[1].x)&&Math.max(t[0].x,t[1].x)>=Math.min(i[0].x,i[1].x)&&Math.max(i[0].y,i[1].y)>=Math.min(t[0].y,t[1].y)&&ko(t[0],i[1],i[0])*ko(i[1],t[1],i[0])>0&&ko(i[0],t[1],t[0])*ko(t[1],i[1],t[0])>0?1:0}function Ah(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>Ah(i,t-1))}const Qg=`<style type="text/css">
195
195
  .PanoRulerPlugin-rule-line {
196
196
  position: absolute;
197
197
  transform-origin: left center;
@@ -284,7 +284,7 @@ void main() {
284
284
  <div class="PanoRulerPlugin-rule-label-name">${e.options.distanceText(A)}</div>
285
285
  </div>
286
286
  </div>
287
- `,y=document.createElement("div");return y.setAttribute("class","PanoRulerPlugin-rule"),y.setAttribute("data-name",g),y.setAttribute("style","display: none"),y.innerHTML=b,y},o=document.createElement("div");o.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;");const s=document.createElement("div");s.innerHTML=Qg,o.appendChild(s);const r={},a=(g,A)=>{if(e.loaded)throw new Error("标尺被重复初始化!");const b=Gg(g,i),y=i.work;if(!y)return!1;for(const E in A){const k=A[E],{standingPosition:S}=y.observers[0],C=k.map(({x:j,z:M,observers:X})=>{const J=X.length>0?g.rooms[g.observers[X[0]]].name:"",H=b[J]?b[J].floor:null;let Q=1/0,G={index:0,x:S.x,y:S.y,z:S.z};X.forEach(re=>{if(!y.observers[re])return;const{standingPosition:oe}=y.observers[re],Ae={index:re,x:oe.x,y:oe.y,z:oe.z},we=Hg({x:j,z:M},Ae);H?we<Q&&Math.abs(Ae.y-H)<.3&&(Q=we,G=Ae):we<Q&&(Q=we,G=Ae)});const B=new R.Vector3(j,G.y,M);Object.assign(B,{observers:X});const W=b[J]?b[J].roof:null,q=W?new R.Vector3(j,W,M):null;return q&&Object.assign(q,{observers:X}),{origin:B,vertical:q}});r[E]={origins:C.map(j=>j.origin),rules:[]};for(const{origin:j,vertical:M}of C){if(!M)continue;const X=n(E,j.distanceTo(M));o.append(X),r[E].rules.push({vertical:!0,rule:[j,M],$element:X})}for(let j=0;j<C.length;j++){let M=j+1;M>=C.length&&(M=0);const{origin:X}=C[j],{origin:J}=C[M],H=n(E,X.distanceTo(J));o.append(H),r[E].rules.push({vertical:!1,rule:[X,J],$element:H})}}return e.loaded=!0,!0},l=(g,A,b)=>Y(exports,null,function*(){const y=g||t.roomInfo,E=A||t.roomRules;if(!y||!E)throw new Error("标尺数据依赖不齐全!");return e.loaded=!1,e.options=F(F({},e.options),b||{}),i.model.loaded?a(y,E):yield new Promise(k=>i.once("modelLoaded",()=>k(a(y,E))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(g,A,b,y)=>{const E=[[{x:0,y:0},{x:b,y:0}],[{x:0,y:0},{x:0,y}],[{x:b,y:0},{x:b,y}],[{x:0,y},{x:b,y}]],k=[];for(let S=0;S<E.length;S++){const C=vh([g,A],[E[S][0],E[S][1]],!0);C&&k.push(C)}return k.length===0?!1:k},d=()=>{var X;const g=(X=i.getElement())==null?void 0:X.parentElement;if(!g||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:A,camera:b,currentMode:y}=i;if(A===void 0)return;let E;for(const J in r)J.split(",").indexOf(A.toString())>=0&&(E=J);if(!E){for(const J in r)for(const{$element:H}of r[J].rules)H.style.display="none";return}const k=b.position,S=b.getWorldDirection(new R.Vector3),C=g.clientWidth,j=g.clientHeight;if(y!==ze.Five.Mode.Panorama){for(const J in r)for(const{$element:H}of r[J].rules)H.style.display="none";return}for(const J in r)for(const{$element:H}of r[J].rules)H.style.display=J===E?"block":"none";const[M]=r[E].origins.slice().filter(J=>J.observers.indexOf(A)>=0).sort((J,H)=>{const Q=J.clone().setY(0).sub(k).normalize().angleTo(S.clone().setY(0)),G=H.clone().setY(0).sub(k).normalize().angleTo(S.clone().setY(0));return Q-G});for(const{rule:J,vertical:H,$element:Q}of r[E].rules){const[G,B]=J,W=Q.querySelector(".PanoRulerPlugin-rule-line");if(!W)return;if(!M){Q.style.display="none";continue}if(G!==M&&B!==M){Q.style.display="none";continue}if(G.distanceTo(B)<.3){Q.style.display="none";continue}if(G.observers.indexOf(A)===-1||B.observers.indexOf(A)===-1){Q.style.display="none";continue}if(G.clone().sub(k).normalize().angleTo(S)>Math.PI/2){Q.style.display="none";continue}if(B.clone().sub(k).normalize().angleTo(S)>Math.PI/2){Q.style.display="none";continue}const Z=G.distanceTo(B);if(B.clone().sub(B.clone().sub(G).divide(new R.Vector3(2,2,2))).distanceTo(k)/Z>8){Q.style.display="none";continue}const Ae=G.clone().project(b),we=(Ae.x+1)/2*C,ge=(-Ae.y+1)/2*j,_e=B.clone().project(b),ve=(_e.x+1)/2*C,Ge=(-_e.y+1)/2*j,ue=Math.sqrt(Math.pow(ve-we,2)+Math.pow(Ge-ge,2));let be=ue,Se=50;const me=c({x:~~we,y:~~ge},{x:~~ve,y:~~Ge},C,j);if(me&&me.length===1&&(M===G?(be=Math.sqrt(Math.pow(me[0].x-we,2)+Math.pow(me[0].y-ge,2)),Se=be/ue*50):M===B&&(be=Math.sqrt(Math.pow(me[0].x-ve,2)+Math.pow(me[0].y-Ge,2)),Se=100-be/ue*50)),me&&me.length===2){const se={x:(me[0].x+me[1].x)/2,y:(me[0].y+me[1].y)/2};Se=Math.sqrt(Math.pow(se.x-we,2)+Math.pow(se.y-ge,2))/ue*100}const at=(Math.PI/2-Math.atan2(ve-we,ge-Ge))/Math.PI*180,ke=W.querySelector(".PanoRulerPlugin-rule-label"),$e=ke.children[0].clientWidth;$e>=ue||$e/2>=Se/100*ue||$e/2>=(1-Se/100)*ue?W.style.display="none":(W.style.display="block",W.style.width=ue+"px",W.style.left=we+"px",W.style.top=ge+"px",W.style.transform=`rotate(${-at}deg)`,ke.style.left=`${Se}%`)}},h=()=>Ah(d),u=()=>{var g,A;return e.loaded?(e.enable||(o.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(A=(g=i.getElement())==null?void 0:g.parentElement)==null||A.append(o),d(),i.on("modeChange",d),i.on("cameraUpdate",h),e.enable=!0),!0):!1},m=()=>(e.enable&&(i.off("modeChange",d),i.off("cameraUpdate",h),o&&o.remove(),e.enable=!1),!0);function v(g){if(g.distanceText&&g.distanceText!==e.options.distanceText){const A=g.distanceText;e.options.distanceText=A,Object.values(r).forEach(b=>{b.rules.forEach(y=>{const[E,k]=y.rule,S=E.distanceTo(k),C=y.$element.querySelector(".PanoRulerPlugin-rule-label-name");C&&(C.innerText=A(S))})})}}return{enable:u,disable:m,load:l,state:e,changeConfigs:v}};function Wg(i){fe(i,"svelte-1h27ktp",".PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1.5s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp em.svelte-1h27ktp{display:block;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-1h27ktp.svelte-1h27ktp{display:flex;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;align-items:center}.em-solid.svelte-1h27ktp.svelte-1h27ktp{height:100%;background:#ffffff}.em-dotted.svelte-1h27ktp.svelte-1h27ktp{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-1h27ktp.svelte-1h27ktp{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-1h27ktp.svelte-1h27ktp{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;animation:svelte-1h27ktp-viewport-rule-label 0.25s ease 1s;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@keyframes svelte-1h27ktp-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-1h27ktp-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-1h27ktp-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}")}function Cl(i,t,e){const n=i.slice();return n[6]=t[e],n}function Ng(i){let t,e=i[0].children,n=[];for(let o=0;o<e.length;o+=1)n[o]=El(Cl(i,e,o));return{c(){t=z("div");for(let o=0;o<n.length;o+=1)n[o].c();w(t,"class","rule-mixed-line svelte-1h27ktp")},m(o,s){V(o,t,s);for(let r=0;r<n.length;r+=1)n[r]&&n[r].m(t,null)},p(o,s){if(s&9){e=o[0].children;let r;for(r=0;r<e.length;r+=1){const a=Cl(o,e,r);n[r]?n[r].p(a,s):(n[r]=El(a),n[r].c(),n[r].m(t,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},d(o){o&&_(t),qt(n,o)}}}function Xg(i){let t,e;return{c(){t=z("em"),w(t,"class",e=Be(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),w(t,"style",i[3])},m(n,o){V(n,t,o)},p(n,o){o&1&&e!==(e=Be(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&w(t,"class",e),o&8&&w(t,"style",n[3])},d(n){n&&_(t)}}}function El(i){let t,e,n=`${i[6].width}px`;return{c(){t=z("div"),w(t,"class",e=Be(i[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),w(t,"style",i[3]),T(t,"width",n)},m(o,s){V(o,t,s)},p(o,s){s&1&&e!==(e=Be(o[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&w(t,"class",e),s&8&&w(t,"style",o[3]),(s&8||s&9&&n!==(n=`${o[6].width}px`))&&T(t,"width",n)},d(o){o&&_(t)}}}function Yg(i){let t,e,n,o,s=i[0].labelElement+"",r,a,l=`${i[0].labelOffset}%`,c=`${i[0].width}px`,d=`${i[0].left}px`,h=`${i[0].top}px`,u=`rotate(${i[0].rotateDeg}deg)`;function m(A,b){return A[0].children.length===0?Xg:Ng}let v=m(i),g=v(i);return{c(){t=z("div"),g.c(),e=ne(),n=z("div"),o=z("div"),r=je(s),w(o,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),ot(()=>i[4].call(o)),w(n,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),T(n,"left",l),w(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),T(t,"width",c),T(t,"left",d),T(t,"top",h),T(t,"transform",u),T(t,"display",i[0].visible&&i[2]?"block":"none")},m(A,b){V(A,t,b),g.m(t,null),O(t,e),O(t,n),O(n,o),O(o,r),a=ls(o,i[4].bind(o))},p(A,[b]){v===(v=m(A))&&g?g.p(A,b):(g.d(1),g=v(A),g&&(g.c(),g.m(t,e))),b&1&&s!==(s=A[0].labelElement+"")&&Oe(r,s),b&1&&l!==(l=`${A[0].labelOffset}%`)&&T(n,"left",l),b&1&&c!==(c=`${A[0].width}px`)&&T(t,"width",c),b&1&&d!==(d=`${A[0].left}px`)&&T(t,"left",d),b&1&&h!==(h=`${A[0].top}px`)&&T(t,"top",h),b&1&&u!==(u=`rotate(${A[0].rotateDeg}deg)`)&&T(t,"transform",u),b&5&&T(t,"display",A[0].visible&&A[2]?"block":"none")},i:K,o:K,d(A){A&&_(t),g.d(),a()}}}function Ug(i,t,e){let n,{rulerItemProp:o}=t,s=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41IiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSIvPjxmZU9mZnNldCBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByYWRpdXM9IjEiIHJlc3VsdD0ic2hhZG93SW5uZXIiLz48ZmVPZmZzZXQgaW49InNoYWRvd0lubmVyIiByZXN1bHQ9InNoYWRvd0lubmVyIi8+PGZlQ29tcG9zaXRlIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIGluMj0ic2hhZG93SW5uZXIiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIgc3RkRGV2aWF0aW9uPSIuNSIvPjxmZUNvbG9yTWF0cml4IGluPSJzaGFkb3dCbHVyT3V0ZXIxIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMiAwIi8+PC9maWx0ZXI+PHBhdGggaWQ9InByZWZpeF9fYiIgZD0iTS44ODkgMkgxMS41OCIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";function l(){r=this.offsetWidth,e(1,r)}return i.$$set=c=>{"rulerItemProp"in c&&e(0,o=c.rulerItemProp)},i.$$.update=()=>{i.$$.dirty&3&&(r>=o.width||r/2>=o.labelOffset/100*o.width||r/2>=(1-o.labelOffset/100)*o.width?e(2,s=!1):e(2,s=!0))},e(3,n=`--background-image: url(${a})`),[o,r,s,n,l]}class qg extends ce{constructor(t){super(),le(this,t,Ug,Yg,ae,{rulerItemProp:0},Wg)}}function Il(i,t,e){const n=i.slice();return n[12]=t[e],n}function kl(i){let t,e;return t=new qg({props:{rulerItemProp:i[12]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.rulerItemProp=n[12]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Jg(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=kl(Il(i,n,r));const s=r=>L(o[r],1,1,()=>{o[r]=null});return{c(){t=z("div");for(let r=0;r<o.length;r+=1)o[r].c()},m(r,a){V(r,t,a);for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(t,null);e=!0},p(r,[a]){if(a&1){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=Il(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=kl(c),o[l].c(),x(o[l],1),o[l].m(t,null))}for(de(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)x(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)L(o[a]);e=!1},d(r){r&&_(t),qt(o,r)}}}function Zg(i,t,e){var g,A,b,y;let{five:n}=t,{rulerDatas:o}=t,{options:s}=t,r=[];const a=((A=(g=n.getElement())==null?void 0:g.parentElement)==null?void 0:A.clientWidth)||0,l=((y=(b=n.getElement())==null?void 0:b.parentElement)==null?void 0:y.clientHeight)||0,c=(E,k)=>{const S=[[{x:0,y:0},{x:a,y:0}],[{x:0,y:0},{x:0,y:l}],[{x:a,y:0},{x:a,y:l}],[{x:0,y:l},{x:a,y:l}]],C=[];for(let j=0;j<S.length;j++){const M=vh([E,k],[S[j][0],S[j][1]],!0);M&&C.push(M)}return C.length===0?!1:C},d=(E,k)=>{const S=E.clone().project(n.camera),C=(S.x+1)/2*a,j=(-S.y+1)/2*l,M=k.clone().project(n.camera),X=(M.x+1)/2*a,J=(-M.y+1)/2*l,H=Math.sqrt(Math.pow(X-C,2)+Math.pow(J-j,2));return{startLeft:C,startTop:j,endLeft:X,endTop:J,distance:H}},h=(E,k,S)=>{const C=n.camera.position,j=n.camera.getWorldDirection(new R.Vector3),M=E.clone().sub(C).normalize().angleTo(j),X=k.clone().sub(C).normalize().angleTo(j),J=E.distanceTo(k),Q=k.clone().sub(k.clone().sub(E).divide(new R.Vector3(2,2,2))).distanceTo(C),{startLeft:G,startTop:B,endLeft:W,endTop:q,distance:U}=d(E,k),re=-((Math.PI/2-Math.atan2(W-G,B-q))/Math.PI)*180;let oe=!0;S||(oe=!1),!Vt(E,S)&&!Vt(k,S)&&(oe=!1),J<.3&&(oe=!1),M>Math.PI/2&&(oe=!1),X>Math.PI/2&&(oe=!1),Q/J>8&&(oe=!1);let Ae=50,we=U;const ge=c({x:~~G,y:~~B},{x:~~W,y:~~q});if(ge&&ge.length===1&&(Vt(E,S)?(we=Math.sqrt(Math.pow(ge[0].x-G,2)+Math.pow(ge[0].y-B,2)),Ae=we/U*50):Vt(k,S)&&(we=Math.sqrt(Math.pow(ge[0].x-W,2)+Math.pow(ge[0].y-q,2)),Ae=100-we/U*50)),ge&&ge.length===2){const _e={x:(ge[0].x+ge[1].x)/2,y:(ge[0].y+ge[1].y)/2};Ae=Math.sqrt(Math.pow(_e.x-G,2)+Math.pow(_e.y-B,2))/U*100}return{startLeft:G,startTop:B,distance:U,deg:re,visible:oe,labelOffset:Ae,ruleLength:J}},u=()=>{const E=n.panoIndex,k=o.find(H=>H.panoIndex===E);if(!k)return e(0,r=[]);if(n.currentMode!==ze.Five.Mode.Panorama)return e(0,r=[]);const S=n.camera.position,C=n.camera.getWorldDirection(new R.Vector3),j=k.lines.map(H=>new R.Vector3(H.start[0],-H.start[1],-H.start[2])),M=k.lines.map(H=>new R.Vector3(H.end[0],-H.end[1],-H.end[2])),[X]=j.concat(M).sort((H,Q)=>{const G=H.clone().setY(0).sub(S).normalize().angleTo(C.clone().setY(0)),B=Q.clone().setY(0).sub(S).normalize().angleTo(C.clone().setY(0));return G-B}),J=k.lines.map(H=>{var we,ge;const Q=H.start,G=H.end,{startLeft:B,startTop:W,distance:q,deg:U,visible:Z,labelOffset:re,ruleLength:oe}=h(new R.Vector3(Q[0],-Q[1],-Q[2]),new R.Vector3(G[0],-G[1],-G[2]),X),Ae=[];return H.children&&((we=H.children)==null?void 0:we.length)>0&&((ge=H.children)==null||ge.forEach(_e=>{const ve=_e.start,Ge=_e.end,{distance:ue}=d(new R.Vector3(ve[0],-ve[1],-ve[2]),new R.Vector3(Ge[0],-Ge[1],-Ge[2]));Ae.push({width:ue,state:_e.state})})),{width:q,left:B,top:W,rotateDeg:U,state:H.state,children:Ae,labelOffset:re,visible:Z,labelElement:s.distanceText(oe)}});e(0,r=J)},m=()=>rs(u),v=pa(u,80);return Mt(()=>{u(),n.on("panoArrived",u),n.on("modeChange",u),n.on("cameraDirectionUpdate",m),n.on("movingToPano",m),n.on("mouseWheel",()=>v()),n.on("pinchGesture",()=>v())}),hn(()=>{n.off("panoArrived",u),n.off("modeChange",u),n.off("cameraDirectionUpdate",m),n.off("movingToPano",m),n.off("mouseWheel",()=>v()),n.off("pinchGesture",()=>v())}),i.$$set=E=>{"five"in E&&e(1,n=E.five),"rulerDatas"in E&&e(2,o=E.rulerDatas),"options"in E&&e(3,s=E.options)},[r,n,o,s]}class Kg extends ce{constructor(t){super(),le(this,t,Zg,Jg,ae,{five:1,rulerDatas:2,options:3})}}let $g=class{constructor(t,e){f(this,"five");f(this,"container",document.createElement("div"));f(this,"panoRulerProData");f(this,"rulerItems");f(this,"state",{enabled:!1,loaded:!1,options:{className:"",distanceText:t=>`${t.toFixed(1)}m`}});var n,o;this.five=t,this.container.classList.add("panoRulerProPlugin-container"),this.container.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;"),e&&(e.data&&this.load(e.data),this.state.options=F(F({},this.state.options),e.options||{}),(n=e.options)!=null&&n.className&&this.container.classList.add((o=e.options)==null?void 0:o.className)),this.five.once("modelLoaded",()=>Y(this,null,function*(){var s,r;(r=(s=this.five.getElement())==null?void 0:s.parentNode)==null||r.append(this.container)})),this.five.once("dispose",()=>this.dispose())}load(t){return Y(this,null,function*(){if(!this.five.work)return;const e=t.data;if(!e)throw new Error("标尺数据依赖不齐全!");this.panoRulerProData=e,this.state.loaded=!0})}enable(){return this.state.loaded?(this.state.enabled||(this.state.enabled=!0,this.render()),!0):!1}disable(){return this.state.enabled&&(this.state.enabled=!1,this.render()),!0}render(){return Y(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new Kg({target:this.container,props:{five:this.five,rulerDatas:this.panoRulerProData,options:this.state.options}})}else(t=this.rulerItems)==null||t.$destroy(),this.rulerItems=void 0})}dispose(){this.container&&(this.rulerItems.$destroy(),this.rulerItems=void 0),this.container.remove()}};const ev=(i,t)=>new $g(i,t),tv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nr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AAAAElFTkSuQmCC";function nv(){const i=document.createElement("div"),t=document.createElement("i"),e=document.createElement("span");return i.appendChild(t),i.appendChild(e),i.style.position="relative",i.style.width="100%",i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.marginTop=`${150/16}rem`,i.style.opacity="0",i.style.transition="opacity 1000ms linear",t.style.display="block",t.style.width=`${134/16}rem`,t.style.height=`${22/16}rem`,t.style.backgroundSize="100%",t.style.backgroundRepeat="no-repeat",t.style.backgroundImage=`url(${tv})`,e.style.marginTop=`${10/16}rem`,e.style.fontSize=`${16/16}rem`,e.style.color="#fff",e.style.opacity="0.7",e.style.textShadow="0 2px 16px rgb(22 34 83 / 24%)",e.style.fontWeight="bold",{appendTo(n){n.appendChild(i)},dispose(){i.remove()},setRoom(n){e.innerHTML=n.name+" "+Math.floor(n.size/1e6)+"㎡"},show(){i.style.opacity="1"},hide(){i.style.opacity="0"}}}const iv=new I.TextureLoader;function Ui(i){return Y(this,null,function*(){return new Promise((t,e)=>{iv.load(i,t,void 0,e)}).then(t=>(t.encoding=I.sRGBEncoding,t))})}const xo={userAction:!0};class ov extends Mn{constructor(e,n){super(e);f(this,"state",{visible:!0,enabled:!0,config:{compassImageUrl:"//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png",entryDoorImageUrl:"//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png"}});f(this,"data");f(this,"group",new I.Group);f(this,"roomInfoInstance");f(this,"roomInfoWrapperInstance");f(this,"compassMeshTween");f(this,"compassMesh");f(this,"entryDoorMesh");f(this,"dispose",()=>{var e,n,o,s;this.five.scene.remove(this.group),this.group.remove(...this.group.children),(n=(e=this.compassMesh)==null?void 0:e.material.map)==null||n.dispose(),(s=(o=this.entryDoorMesh)==null?void 0:o.material.map)==null||s.dispose(),this.five.off("dispose",this.dispose),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});f(this,"_addEventListener",()=>{this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("modeChange",this.onFiveModeChange),this.five.on("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});f(this,"_removeEventListener",()=>{this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("modeChange",this.onFiveModeChange),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});f(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});f(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});f(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});f(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});f(this,"_clearEntryDoorIfNeed",()=>{var e;this.entryDoorMesh&&(this.group.remove(this.entryDoorMesh),(e=this.entryDoorMesh.material.map)==null||e.dispose(),this.entryDoorMesh=null),this.roomInfoInstance&&(this.roomInfoInstance.dispose(),this.roomInfoInstance=null),this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.dispose(),this.roomInfoWrapperInstance=null)});f(this,"onFivePanoWillArrive",e=>{var n,o;e!==this.five.panoIndex&&((n=this.compassMeshTween)==null||n.dispose(),(o=this.compassMesh)==null||o.material.setValues({opacity:0}))});f(this,"onFivePanoArrived",e=>{var o,s,r,a,l,c,d;const n=(r=(s=(o=this.five.work)==null?void 0:o.observers)==null?void 0:s[e])==null?void 0:r.standingPosition;if(this.compassMesh&&(this.compassMesh.position.copy(n.clone().setY(n.y+.01)),this.compassMesh.material.opacity===0&&((a=this.compassMeshTween)==null||a.dispose(),this.compassMeshTween=ss(1e3).onUpdate(({progress:h})=>{var u;(u=this.compassMesh)==null||u.material.setValues({opacity:h}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const u=new I.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(n.y).sub(n).normalize(),m=n.clone().add(u.clone().multiplyScalar(.7)).setY(n.y+.01);this.entryDoorMesh.rotation.z=new I.Vector3(0,0,-1).angleTo(u),this.entryDoorMesh.position.copy(m),((l=this.data)==null?void 0:l.room_observers[e].room.type)===1?(c=this.entryDoorMesh)==null||c.material.setValues({opacity:1}):(d=this.entryDoorMesh)==null||d.material.setValues({opacity:0})}this.roomInfoInstance&&this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.position.copy(n.clone().setY(n.y+.01)),this.roomInfoInstance.setRoom(this.data.room_observers[e].room)),this.five.needsRender=!0});f(this,"onFiveCameraDirectionUpdate",({longitude:e,latitude:n})=>{var o,s;this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.rotation.z=e,n>.66&&this.five.getCurrentState().mode==="Panorama"?(o=this.roomInfoInstance)==null||o.show():(s=this.roomInfoInstance)==null||s.hide())});f(this,"onFiveModeChange",(e,n,o,s,r)=>{e!==n&&this.setState({visible:e===ze.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:F(F({},this.state.config),n||{})})}enable(e=xo){this.setState({enabled:!0},e)}disable(e=xo){this.setState({enabled:!1},e)}show(e=xo){if(this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=xo){if(this.state.enabled)return this.setState({visible:!1},e),Promise.resolve()}setState(e,n={userAction:!0}){var s,r;const o=JSON.parse(JSON.stringify(this.state));this.state={visible:(s=e.visible)!=null?s:o.visible,enabled:(r=e.enabled)!=null?r:o.enabled,config:F(F({},o.config),e.config||{})},this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n.userAction}),e.enabled===!0&&(this._enable(),this.hooks.emit("enable",n)),e.enabled===!1&&(this._disable(),this.hooks.emit("disable",n)),e.visible===!1&&(this._toggleVisible(),this.hooks.emit("hide",n)),e.visible===!0&&(this._toggleVisible(),this.hooks.emit("show",n)),e.config&&this.init()}load(e,n,o=!0){return Y(this,null,function*(){const s=yield this.formatData(e);JSON.stringify(this.data)!==JSON.stringify(s)&&(this.hooks.emit("dataChange",s,this.data),this.data=F({},s),this.init(),n&&this.setState(n,{userAction:o}),this.hooks.emit("dataLoaded",this.data))})}formatData(e){return e.version&&e.data?Promise.resolve(e.data):Promise.resolve(e)}init(){return Y(this,null,function*(){var o,s,r,a;const e=(s=(o=this.data)==null?void 0:o.north_rad)!=null?s:null;this._clearCompassIfNeed(),e!==null&&(this.compassMesh=yield this.loadCompassMesh(),this.compassMesh.rotateX(-Math.PI/2),this.compassMesh.rotateZ(e-Math.PI/2),this.group.add(this.compassMesh));const n=(a=(r=this.data)==null?void 0:r.entrance)!=null?a:null;this._clearEntryDoorIfNeed(),n!==null&&(this.entryDoorMesh=yield this.loadEntryDoorMesh(),this.roomInfoWrapperInstance=this.loadRoomInfo(),this.roomInfoInstance=nv(),this.entryDoorMesh.rotateX(-Math.PI/2),this.roomInfoWrapperInstance&&this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container),this.group.add(this.entryDoorMesh)),this.onFivePanoArrived(this.five.panoIndex||0),this.five.needsRender=!0})}loadCompassMesh(){return Y(this,null,function*(){const e=this.state.config.compassImageUrl,n=yield Ui(e),o=new I.CircleGeometry(.7,32),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:0,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-mesh",r})}loadEntryDoorMesh(){return Y(this,null,function*(){const e=this.state.config.entryDoorImageUrl,n=yield Ui(e),o=new I.PlaneGeometry(.2,.16),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:.8,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new I.Vector3(-.7,0,-.7),new I.Vector3(.7,0,-.7),new I.Vector3(.7,0,.7),new I.Vector3(-.7,0,.7)];return as(this.five).create3DDomContainer(e)}}const sv=(i,t)=>new ov(i,t);function Do(i,t,e){const n=i[t],o=i[e];n===void 0||o===void 0||(i[t]=o,i[e]=n)}function rv(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Do(i,a*4+0,l*4+0),Do(i,a*4+1,l*4+1),Do(i,a*4+2,l*4+2),Do(i,a*4+3,l*4+3)}}}class bh{constructor(t,e){f(this,"width");f(this,"height");f(this,"containerDom");f(this,"hooks",new ze.Subscribe);f(this,"canvas",document.createElement("canvas"));f(this,"five");f(this,"scale");f(this,"config");f(this,"offset",{x:0,y:0});f(this,"context");f(this,"renderCenter",new I.Vector3);f(this,"hammer");f(this,"state",{enabled:!1});f(this,"offsetRange");f(this,"isPanning",!1);f(this,"onPanstart",()=>{this.isPanning=!0,this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)"});f(this,"onPan",t=>{if(!this.isPanning||!this.offsetRange||this.hooks.emit("wantsPanGesture",t))return;const{translateX:n,translateY:o}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});f(this,"onPanend",t=>{if(this.isPanning=!1,this.canvas.style.boxShadow="none",!this.offsetRange)return;const{translateX:e,translateY:n}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${e}px, ${n}px, 100px)`,this.offset={x:e,y:n}});var o,s,r;if(!t.renderer)throw new Error("Five Render 未初始化");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new Ki(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panstart",this.onPanstart),this.hammer.on("panend",this.onPanend)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){if(!this.state.enabled)return this.state.enabled=!0,this.containerDom&&this._appendTo(this.containerDom),this}disable(){if(this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){return this.containerDom=t,this.state.enabled&&this._appendTo(t),this}clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}renderWithScreenPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}resetOffset(){this.offset={x:0,y:0},this.canvas.style.transform="translate3d(0px, 0px, 100px)"}getCurrentState(){return{enabled:this.state.enabled}}getRenderCenter(){return this.renderCenter}_appendTo(t){if(this.resetOffset(),t.appendChild(this.canvas),!this.offsetRange){const e=this.canvas.getBoundingClientRect(),n=t.getBoundingClientRect(),o=n.right-e.right,s=n.bottom-e.bottom,r=n.left-e.left,a=n.top-e.top;this.offsetRange={min:{x:r,y:a},max:{x:o,y:s}}}}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,[n,o,s]=(()=>{if(this.renderCenter instanceof I.Vector3){const r=this.renderCenter.clone().project(this.five.camera);return[(r.x+1)/2*this.containerDom.clientWidth,-(r.x-1)/2*this.containerDom.clientWidth,-(r.y-1)/2*this.containerDom.clientHeight]}else return[this.renderCenter.x,this.containerDom.clientWidth-this.renderCenter.x,this.renderCenter.y]})();n<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):s<183?(this.canvas.style.top="90px",this.canvas.style.left=-t/2+"px"):o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${n}px, ${s}px, 10px)`,this.offset={x:n,y:s}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.five.renderer.getSize(new I.Vector2),[r,a]=(()=>{if(this.renderCenter instanceof I.Vector3){const A=this.renderCenter.clone().project(this.five.camera);return[(A.x+1)/2*s.x,(A.y+1)/2*s.y]}else return[this.renderCenter.x,s.y-this.renderCenter.y]})(),l=1,c=n/t,d=o/t,h=l*t,u=this.five.getPixels(r-c/2,a-c/2,c,d,h),m=Math.floor(n*l),v=Math.floor(o*l);rv(u,m,v);const g=new ImageData(m,v);g.data.set(u),e.putImageData(g,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}getPanOffset(t,e){const{min:{x:n,y:o},max:{x:s,y:r}}=e,a=this.offset.x+t.deltaX,l=this.offset.y+t.deltaY,c=Math.min(Math.max(a,n),s),d=Math.min(Math.max(l,o),r);return{translateX:c,translateY:d}}}class av{constructor(t){f(this,"edges",[]);f(this,"five");f(this,"onModelLoaded",()=>{this.five.model&&(this.edges=this.five.model.getEdges())});this.five=t,this.five.model.loaded?this.onModelLoaded():this.five.on("modelLoaded",this.onModelLoaded)}dispose(){}getAdsorbentPoint(t){if(this.edges.length===0)return null;let e=1/0,n;return this.edges.forEach(o=>{const s=o.closestPointToPoint(t.point,!0,new R.Vector3),r=s.distanceTo(t.point);r<e&&(n=s,e=r)}),e>.1?null:n||null}}const lv=1,cv=3,dv=new R.Color(16777215),hv=new R.Color(6522623),uv=new R.Color(16777215),fv=new R.Color(6522623),mv=6,pv=8,gv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",yh=new R.TextureLoader().load(gv),vv={pointTexture:yh,pointSize:mv,lineWidth:lv,lineColor:dv,pointColor:uv,lineRenderOrder:20,pointsRenderOrder:20},Av={pointTexture:yh,pointSize:pv,lineWidth:cv,lineColor:hv,pointColor:fv,lineRenderOrder:10,pointsRenderOrder:10};function bv(i,t,e){var d,h,u,m,v;const n=(d=e==null?void 0:e.lineWidth)!=null?d:2,o=(h=e==null?void 0:e.lineColor)!=null?h:new R.Color(16777215),s=(u=e==null?void 0:e.pointSize)!=null?u:5,r=(m=e==null?void 0:e.lineRenderOrder)!=null?m:10,a=(v=e==null?void 0:e.lineRenderOrder)!=null?v:20,l=new yd.Line(i,t);l.setMaterial({linewidth:n,color:o}),l.line.material.depthTest=!1,l.line.material.transparent=!0,l.line.renderOrder=r,l.points.renderOrder=a;const c=l.points.material;return c.depthTest=!1,c.size=s,e!=null&&e.pointColor&&c.color.set(e.pointColor).convertSRGBToLinear(),e!=null&&e.pointTexture&&(c.map=e.pointTexture),l}function xl(i,t){const[e,n]=i.points,o=t==="light"?Av:vv,s=bv(e.position,n.position,o);return s.name="normalLine_"+i.id,s}function qi(i){const{x:t,y:e,z:n}=i;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(n)>1)}function gr(i){const{z:t}=i;return!(Math.abs(t)>1)}function yv(){const i=document.createElement("div");return i.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);-webkit-tap-highlight-color: rgba(0,0,0,0);"),i.style.width="max-content",i.style.padding="3px 6px",i.style.lineHeight="1",i.style.textAlign="center",i.style.transform="translate(-50%, -50%)",i.style.borderRadius="100px",i.style.fontSize="14px",i.style.color="#fff",i.style.background="rgba(195,195,195,0.70)",i.style.border="0.5px solid rgba(255,255,255,0.6)",i.style.cursor="pointer",i}function wv(i){const t=document.createElement("div");return t.id="distance_"+i.id,t.classList.add("five-plugin-measure__distance"),t.style.opacity="0",t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.width="0",t.style.height="0",t.style.transform="translate3d(0, 0, 0)",t.style.transformOrigin="left top",t}function Pv(i){let t=!0;const{line:e}=i,n=e.id,o=yv(),s=wv(e),r=i.userDistanceItem,a=new R.Vector3(0,0,0),l={lineID:n,ndcPosition:a,update:u,appendTo:m,remove:v,highlight:d,unHighlight:h,getCurrentContent:g,setItemSelectable:A};s.style.pointerEvents=t?"all":"none",r!=null&&r.element?s.appendChild(r.element):s.appendChild(o);function c(){var b;(b=i.clickCallback)==null||b.call(i,l)}function d(){if(r)return r.highlight();o.style.border="0.5px solid #95AEFF",o.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}function h(){if(r)return r.unHighlight();o.style.border="0.5px solid rgba(255,255,255,0.6)",o.style.background="rgba(195,195,195,0.70)"}function u(b){if(e.mesh.visible===!1){s.style.opacity="0",s.style.pointerEvents="none";return}const y=b.getElement();if(!y)return;const E=y.clientWidth,k=y.clientHeight,S=E/2,C=k/2;if(e.points.length<2)return;const[j,M]=e.points,X=j.position.clone().project(b.camera),J=M.position.clone().project(b.camera),H=X.clone().lerp(J,.5),Q=new R.Vector2(X.x*S,X.y*C),G=new R.Vector2(J.x*S,J.y*C),B=Q.distanceTo(G);if((()=>!(Math.abs(X.z)>1||Math.abs(J.z)>1||!gr(X)&&!gr(J)||!gr(H)||B===0))()===!1){s.style.opacity="0",s.style.pointerEvents="none";return}const q=(H.x+1)/2*E,U=-(H.y-1)/2*k,re=-(Math.atan((Q.y-G.y)/(Q.x-G.x))*180)/Math.PI,oe=s.parentElement&&o.clientWidth>B?-20:0;s.style.transform=`translate(${q}px, ${U}px) rotate(${re}deg) translateY(${oe}px)`,s.style.opacity="1",s.style.pointerEvents=t?"all":"none",r&&r.update({line:e,polyline:e.getPolyline()});const Ae=g();o.innerText=Ae}function m(b){b.appendChild(s),s.addEventListener("click",c)}function v(){o.removeEventListener("click",c),s.remove()}function g(){var j,M,X;if(e.points.length<2)return"";const[b,y]=e.points,E=b.position.clone().distanceTo(y.position),k=(j=i.line.text)!=null?j:i.line.model.config.defaultText,S=(X=(M=i.line.model.config)==null?void 0:M.getDistanceText)==null?void 0:X.call(M,E),C=k!=null?k:S;return C!=null?C:E.toFixed(2)+"m"}function A(b){t=b}return l}class Sn{constructor(t,e,n){f(this,"id");f(this,"selected",!1);f(this,"text");f(this,"type","line");f(this,"model");f(this,"mesh");f(this,"points");f(this,"lightMesh");f(this,"hook");f(this,"distanceItem");f(this,"polyline");var o;if(this.id=dt(),this.model=n,t.id===e.id)throw new Error("无效的线段, 一个点无法构成线段");typeof n.config.defaultText=="string"&&(this.text=n.config.defaultText),this.hook=new ze.Subscribe,this.points=[t,e],this.mesh=xl(this,"normal"),this.lightMesh=xl(this,"light"),this.distanceItem=Pv({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:(o=this.model.config)!=null&&o.userDistanceItemCreator?this.model.config.userDistanceItemCreator():void 0}),t.lines.push(this),e.lines.push(this)}clear(){this.selected=!1,this.polyline=void 0}isEmpty(){return this.points.length===0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(e=>e.lines.includes(this));if(t)return this.polyline=t,t}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}setText(t){this.text=t,this.hook.emit("textChanged",t)}toJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),text:this.text}}clone(){const t=new Sn(this.points[0].clone(),this.points[1].clone(),this.model);return t.text=this.text,t}}function Cv(i,t){for(let e=0,n=t.length;e<n;e++)if(i===t[e])return t.splice(e,1)[0]}class Dt{constructor(t){f(this,"id");f(this,"lines");f(this,"position");f(this,"type","point");this.id=dt(),this.lines=[],this.position=new R.Vector3,t instanceof R.Vector3?this.position.copy(t):this.position.fromArray(t)}toJson(){return{id:this.id,position:this.position.toArray()}}addLine(t){this.lines.push(t)}removeLine(t){Cv(t,this.lines)}clone(){return new Dt(this.position)}}let Ji=class{constructor(t){f(this,"id",dt());f(this,"lines",[]);f(this,"points",[]);f(this,"visiblePanoIndexes");f(this,"model");f(this,"type","polyline");f(this,"hook",new ze.Subscribe);this.model=t.model}addLine(t){if(this.includes(t)){console.error(new Error("不能重复添加线段"));return}const e=this.getLastPoint(),n=e&&t.findAnotherPoint(e);e?e&&n?(this.lines.push(t),this.points.push(...t.points),this.hook.emit("lineAdded",t)):console.error(new Error("传入线段无法与当前折线进行连接")):(this.lines.push(t),this.points.push(...t.points),this.hook.emit("lineAdded",t))}removeLine(t){if(this.lines.length!==0){if(!this.isLastLine(t)){console.error(new Error("传入线段不是当前折线的最后一段"));return}this.lines.pop(),this.lines.length===0?this.points.slice(0,this.points.length):this.points.pop(),this.hook.emit("lineRemoved",t)}}isLastLine(t){const e=this.getLastLine();return e?t.id===e.id:!1}getLastLine(){return this.lines.slice(-1)[0]}clear(){const t=this.lines.slice();this.lines.slice(0,this.lines.length),this.points.slice(0,this.points.length),t.reduceRight((e,n)=>this.hook.emit("lineRemoved",n),void 0)}overlapWith(t){return t.type==="point"?this.includes(t):t.type==="line"?t.points.some(e=>this.includes(e)):t.type==="polyline"?t.points.some(e=>this.includes(e)):!0}includes(t){return t.type==="point"?this.points.find(({id:e})=>e===t.id)!==void 0:t.type==="line"?this.lines.find(({id:e})=>e===t.id)!==void 0:!1}isEmpty(){return this.points.length===0}getLastPoint(){return this.points.slice(-1)[0]}toJson(){return{id:this.id,lines:this.lines.map(t=>t.toJson()),visiblePanoIndexes:this.visiblePanoIndexes}}getPointByID(t){return this.points.find(({id:e})=>e===t)}fromJson(t){this.clear(),this.id=t.id;const{getPoint:e,getAllPoints:n}=r(),o=t.lines.map(a=>{const[l,c]=a.points,d=e(l),h=e(c);if(!d||!h)throw new Error("线上的点不存在");const u=new Sn(d,h,this.model);return u.id=a.id,u.text=a.text,u}),s=n();this.points.push(...s),this.lines.push(...o),this.visiblePanoIndexes=t.visiblePanoIndexes;function r(){const a=new Map;function l(d){const h=a.get(d.id);if(h)return h;const u=new Dt(d.position);return u.id=d.id,a.set(d.id,u),u}function c(){return Array.from(a.values())}return{getPoint:l,getAllPoints:c}}return this}replace(t){this.id=t.id,this.clear(),this.lines.push(...t.lines),this.points.push(...t.points)}};class ms{constructor(t){f(this,"config");f(this,"polylines",[]);f(this,"hook",new ze.Subscribe);this.config=t}addPolyline(t){if(this.includes(t)){console.error(new Error("不能重复添加 polyline"));return}this.polylines.push(t),this.hook.emit("polylineAdded",t)}replacePolylineByID(t,e){const n=this.getPolylineByID(t);n==null||n.replace(e)}removePolyline(t){const e=this.polylines.findIndex(({id:n})=>n===t.id);if(e===-1){console.error(new Error("polyline 不存在"));return}this.polylines.splice(e,1),this.hook.emit("polylineRemoved",t)}getPolylineByID(t){return this.polylines.find(e=>e.id===t)}getPolylineByLine(t){return this.polylines.find(e=>e.includes(t))}getLineByID(t){return this.getAllLines().find(e=>e.id===t)}getAllLines(){return this.polylines.map(t=>t.lines).flat(1)}getAllPoints(){return this.polylines.map(t=>t.points).flat(1)}includes(t){return this.polylines.find(({id:e})=>e===t.id)!==void 0}clear(){this.polylines.forEach(t=>this.hook.emit("polylineRemoved",t)),this.polylines.splice(0,this.polylines.length)}getClosestPoint(){}parse(t){this.clear(),this.polylines.push(...t.polylines.map(e=>new Ji({model:this}).fromJson(e))),this.polylines.forEach(e=>this.hook.emit("polylineAdded",e))}toJson(){return{polylines:this.polylines.map(t=>t.toJson()).filter(t=>t.lines.length>0)}}}const Mo=i=>i.preventDefault();let ps=class{constructor(t){f(this,"model");f(this,"five");f(this,"group");f(this,"config");f(this,"dashed");f(this,"disposed",!1);f(this,"isMobile");f(this,"mouseGroup");f(this,"container");f(this,"fiveHelper");f(this,"hook");f(this,"magnifier");f(this,"userDistanceItemCreator");f(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.getAllLines().forEach(t=>t.distanceItem.update(this.five))});var n,o;this.five=t.five,this.hook=t.hook,this.model=t.model,this.config=t.config,this.magnifier=t.magnifier,this.container=t.container,this.fiveHelper=t.fiveHelper,this.isMobile=(o=(n=t.openParams)==null?void 0:n.isMobile)!=null?o:!1,this.userDistanceItemCreator=t.userDistanceItemCreator,this.group=t.group,this.mouseGroup=t.mouseGroup,this.dashed=new Sn(new Dt([0,0,0]),new Dt([0,0,0]),this.model),this.dashed.distanceItem.setItemSelectable(!1),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",Mo),e.addEventListener("contextmenu",Mo))}removeLine(t){this.group.remove(t.mesh,t.lightMesh),t.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(t,e){if(!t)return this.mouseGroup;const n=this.fiveHelper.getAdsorbentPoint(t),o=n||t.point;if(this.mouseGroup.position.copy(o),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const r=t.face.normal.clone().multiplyScalar(.05),l=t.point.clone().add(r).clone().add(r);this.mouseGroup.lookAt(l)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.disable(),this.model.getAllLines().forEach(e=>this.removeLine(e));const t=this.five.getElement();t&&(t.removeEventListener("touchstart",Mo),t.removeEventListener("contextmenu",Mo))}};function Gr(i){const{x:t,y:e}=i.center,{clientWidth:n,clientHeight:o}=i.target,s=i.target.getBoundingClientRect(),r=new R.Vector2(t,e).sub(new R.Vector2(s.left,s.top)),a=new R.Vector2(r.x/n*2-1,-(r.y/o)*2+1);return{point:r,ndcPoint:a}}function vr(i,t){const e=Gr(t).ndcPoint,n=new R.Raycaster;return n.setFromCamera(e,i.camera),i.model.intersectRaycaster(n)}class So extends ps{constructor(e){var o;super(e);f(this,"type","edit");f(this,"polyline");f(this,"pressPoint");f(this,"hasAppendDashed",!1);f(this,"hasAppendMouseGroup",!1);f(this,"fiveElement");f(this,"lastPoint",null);f(this,"hammer");f(this,"onIntersectionUpdate",pa((e,n)=>{var s;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.magnifier.enable(),this.hasAppendMouseGroup=!0);const o=this.updateMouseGroup(e,n).position;(s=this.pressPoint)==null||s.position.copy(o),this.updateDashed(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(this.mouseGroup.position)),this.five.needsRender=!0},20));f(this,"revoke",()=>{if(this.polyline.lines.length===0&&this.lastPoint){this.lastPoint=null,this.hasAppendDashed=!1,this.dashed.distanceItem.remove(),this.group.remove(this.dashed.mesh),this.hook.emit("anchorChange",null),this.hook.emit("editedDashedLineChange",null),this.five.needsRender=!0;return}if(this.polyline.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.polyline.lines[this.polyline.lines.length-1],n=e.findAnotherPoint(this.lastPoint);n&&(this.lastPoint=n,this.hook.emit("anchorChange",n.position),this.group.remove(e.mesh),this.polyline.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.disable(),this.five.needsRender=!0)});f(this,"onMouseLeave",()=>{this.magnifier.disable(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});f(this,"onLineChanged",()=>{this.hook.emit("editedPolylineChange",this.polyline)});f(this,"onPress",e=>{const[n]=vr(this.five,e);if(!(n!=null&&n.face))return;const o=new Dt(n.point);this.pressPoint=o,this.onIntersectionUpdate(n)});f(this,"onPan",e=>{if(!this.pressPoint)return;const[n]=vr(this.five,e);n!=null&&n.face&&this.onIntersectionUpdate(n)});f(this,"onPanEnd",e=>{this.pressPoint&&this.onTap(e)});f(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[n]=vr(this.five,e);this.updateMouseGroup(n);const o=new Dt(this.mouseGroup.position),s=this.lastPoint;if(o&&(this.lastPoint=o),o&&s){const r=new Sn(s,o,this.model);r.distanceItem.setItemSelectable(!1),r.distanceItem.appendTo(this.container),this.polyline.addLine(r),this.group.add(r.mesh),r.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.disable(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});f(this,"onWantsTapGesture",()=>!1);f(this,"onWantsToMoveToPano",()=>!1);f(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);f(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});f(this,"updateDashed",()=>{this.lastPoint&&(this.dashed.points[0].position.copy(this.lastPoint.position),this.dashed.points[1].position.copy(this.mouseGroup.position),this.dashed.mesh.setPoints(this.lastPoint.position,this.mouseGroup.position),this.dashed.distanceItem.update(this.five),this.hook.emit("editedDashedLineChange",this.dashed))});this.model=new ms(this.config),this.polyline=new Ji({model:this.model}),this.model.addPolyline(this.polyline),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsPanGesture",this.onWantsPanGesture),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.on("intersectionOnModelUpdate",this.onIntersectionUpdate),this.polyline.hook.on("lineAdded",this.onLineChanged),this.polyline.hook.on("lineRemoved",this.onLineChanged);const n=this.five.getElement();if(n){this.fiveElement=n;const s=new Ki(n);this.hammer=s,s.on("tap",this.onTap),s.on("pan",this.onPan),s.on("press",this.onPress),s.on("panend",this.onPanEnd)}this.five.helperVisible=!1,(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.hook.emit("editedDashedLineChange",null),this.five.refresh()}dispose(){var e,n;super.dispose(),this.five.helperVisible=!0,this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.onWantsPanGesture),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.off("intersectionOnModelUpdate",this.onIntersectionUpdate),this.polyline.hook.off("lineAdded",this.onLineChanged),this.polyline.hook.off("lineRemoved",this.onLineChanged),(e=this.hammer)==null||e.destroy(),(n=this.fiveElement)==null||n.removeEventListener("mouseleave",this.onMouseLeave),this.magnifier.dispose(),this.dashed.distanceItem.remove(),this.five.needsRender=!0}getEditingLines(){return this.polyline.lines}}class Dl extends ps{constructor(e){super(e);f(this,"type","view");f(this,"hammer");f(this,"polylineRemoved",e=>{e.lines.forEach(n=>this.removeLine(n)),this.hook.emit("selectedChange",this.model.getAllLines().filter(n=>n.selected).map(n=>n))});f(this,"polylineAdded",e=>{const n=this.five.getCurrentState().panoIndex;e.lines.forEach(o=>{e.visiblePanoIndexes&&!e.visiblePanoIndexes.includes(n)&&(o.mesh.visible=!1),o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),this.group.add(o.mesh)})});f(this,"onCameraUpdate",()=>{this.updateDistanceUI()});f(this,"onFivePanoWillArrive",e=>{this.model.polylines.forEach(n=>{n.visiblePanoIndexes&&(n.visiblePanoIndexes.includes(e)||n.lines.forEach(o=>{o.mesh.visible=!1,o.distanceItem.update(this.five)}))})});f(this,"onFivePanoArrived",e=>{this.model.polylines.forEach(n=>{n.visiblePanoIndexes&&n.visiblePanoIndexes.includes(e)&&n.lines.forEach(o=>{o.mesh.visible=!0,o.distanceItem.update(this.five)})})});this.model.getAllLines().forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),this.group.add(o.mesh)});const n=this.five.getElement();if(n){const o=new Ki(n);this.hammer=o}this.onFivePanoWillArrive(this.five.getCurrentState().panoIndex),this.onFivePanoArrived(this.five.getCurrentState().panoIndex),this.updateDistanceUI(),this.five.needsRender=!0,this.model.hook.on("polylineAdded",this.polylineAdded),this.model.hook.on("polylineRemoved",this.polylineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive)}dispose(){var e;super.dispose(),this.model.hook.off("polylineAdded",this.polylineAdded),this.model.hook.off("polylineRemoved",this.polylineRemoved),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}}const Ev=`
287
+ `,y=document.createElement("div");return y.setAttribute("class","PanoRulerPlugin-rule"),y.setAttribute("data-name",g),y.setAttribute("style","display: none"),y.innerHTML=b,y},o=document.createElement("div");o.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;");const s=document.createElement("div");s.innerHTML=Qg,o.appendChild(s);const r={},a=(g,A)=>{if(e.loaded)throw new Error("标尺被重复初始化!");const b=Gg(g,i),y=i.work;if(!y)return!1;for(const E in A){const k=A[E],{standingPosition:S}=y.observers[0],C=k.map(({x:_,z:M,observers:X})=>{const J=X.length>0?g.rooms[g.observers[X[0]]].name:"",H=b[J]?b[J].floor:null;let Q=1/0,G={index:0,x:S.x,y:S.y,z:S.z};X.forEach(re=>{if(!y.observers[re])return;const{standingPosition:oe}=y.observers[re],Ae={index:re,x:oe.x,y:oe.y,z:oe.z},we=Hg({x:_,z:M},Ae);H?we<Q&&Math.abs(Ae.y-H)<.3&&(Q=we,G=Ae):we<Q&&(Q=we,G=Ae)});const B=new R.Vector3(_,G.y,M);Object.assign(B,{observers:X});const W=b[J]?b[J].roof:null,q=W?new R.Vector3(_,W,M):null;return q&&Object.assign(q,{observers:X}),{origin:B,vertical:q}});r[E]={origins:C.map(_=>_.origin),rules:[]};for(const{origin:_,vertical:M}of C){if(!M)continue;const X=n(E,_.distanceTo(M));o.append(X),r[E].rules.push({vertical:!0,rule:[_,M],$element:X})}for(let _=0;_<C.length;_++){let M=_+1;M>=C.length&&(M=0);const{origin:X}=C[_],{origin:J}=C[M],H=n(E,X.distanceTo(J));o.append(H),r[E].rules.push({vertical:!1,rule:[X,J],$element:H})}}return e.loaded=!0,!0},l=(g,A,b)=>Y(exports,null,function*(){const y=g||t.roomInfo,E=A||t.roomRules;if(!y||!E)throw new Error("标尺数据依赖不齐全!");return e.loaded=!1,e.options=F(F({},e.options),b||{}),i.model.loaded?a(y,E):yield new Promise(k=>i.once("modelLoaded",()=>k(a(y,E))))});t.roomInfo&&t.roomRules&&l(t.roomInfo,t.roomRules);const c=(g,A,b,y)=>{const E=[[{x:0,y:0},{x:b,y:0}],[{x:0,y:0},{x:0,y}],[{x:b,y:0},{x:b,y}],[{x:0,y},{x:b,y}]],k=[];for(let S=0;S<E.length;S++){const C=vh([g,A],[E[S][0],E[S][1]],!0);C&&k.push(C)}return k.length===0?!1:k},d=()=>{var X;const g=(X=i.getElement())==null?void 0:X.parentElement;if(!g||!e.loaded||Object.keys(r).length<=0)return;const{panoIndex:A,camera:b,currentMode:y}=i;if(A===void 0)return;let E;for(const J in r)J.split(",").indexOf(A.toString())>=0&&(E=J);if(!E){for(const J in r)for(const{$element:H}of r[J].rules)H.style.display="none";return}const k=b.position,S=b.getWorldDirection(new R.Vector3),C=g.clientWidth,_=g.clientHeight;if(y!==ze.Five.Mode.Panorama){for(const J in r)for(const{$element:H}of r[J].rules)H.style.display="none";return}for(const J in r)for(const{$element:H}of r[J].rules)H.style.display=J===E?"block":"none";const[M]=r[E].origins.slice().filter(J=>J.observers.indexOf(A)>=0).sort((J,H)=>{const Q=J.clone().setY(0).sub(k).normalize().angleTo(S.clone().setY(0)),G=H.clone().setY(0).sub(k).normalize().angleTo(S.clone().setY(0));return Q-G});for(const{rule:J,vertical:H,$element:Q}of r[E].rules){const[G,B]=J,W=Q.querySelector(".PanoRulerPlugin-rule-line");if(!W)return;if(!M){Q.style.display="none";continue}if(G!==M&&B!==M){Q.style.display="none";continue}if(G.distanceTo(B)<.3){Q.style.display="none";continue}if(G.observers.indexOf(A)===-1||B.observers.indexOf(A)===-1){Q.style.display="none";continue}if(G.clone().sub(k).normalize().angleTo(S)>Math.PI/2){Q.style.display="none";continue}if(B.clone().sub(k).normalize().angleTo(S)>Math.PI/2){Q.style.display="none";continue}const Z=G.distanceTo(B);if(B.clone().sub(B.clone().sub(G).divide(new R.Vector3(2,2,2))).distanceTo(k)/Z>8){Q.style.display="none";continue}const Ae=G.clone().project(b),we=(Ae.x+1)/2*C,ge=(-Ae.y+1)/2*_,Ve=B.clone().project(b),ve=(Ve.x+1)/2*C,Ge=(-Ve.y+1)/2*_,ue=Math.sqrt(Math.pow(ve-we,2)+Math.pow(Ge-ge,2));let be=ue,Se=50;const me=c({x:~~we,y:~~ge},{x:~~ve,y:~~Ge},C,_);if(me&&me.length===1&&(M===G?(be=Math.sqrt(Math.pow(me[0].x-we,2)+Math.pow(me[0].y-ge,2)),Se=be/ue*50):M===B&&(be=Math.sqrt(Math.pow(me[0].x-ve,2)+Math.pow(me[0].y-Ge,2)),Se=100-be/ue*50)),me&&me.length===2){const se={x:(me[0].x+me[1].x)/2,y:(me[0].y+me[1].y)/2};Se=Math.sqrt(Math.pow(se.x-we,2)+Math.pow(se.y-ge,2))/ue*100}const at=(Math.PI/2-Math.atan2(ve-we,ge-Ge))/Math.PI*180,ke=W.querySelector(".PanoRulerPlugin-rule-label"),$e=ke.children[0].clientWidth;$e>=ue||$e/2>=Se/100*ue||$e/2>=(1-Se/100)*ue?W.style.display="none":(W.style.display="block",W.style.width=ue+"px",W.style.left=we+"px",W.style.top=ge+"px",W.style.transform=`rotate(${-at}deg)`,ke.style.left=`${Se}%`)}},h=()=>Ah(d),u=()=>{var g,A;return e.loaded?(e.enable||(o.setAttribute("class","PanoRulerPlugin"+(e.options.className?" "+e.options.className:"")),(A=(g=i.getElement())==null?void 0:g.parentElement)==null||A.append(o),d(),i.on("modeChange",d),i.on("cameraUpdate",h),e.enable=!0),!0):!1},m=()=>(e.enable&&(i.off("modeChange",d),i.off("cameraUpdate",h),o&&o.remove(),e.enable=!1),!0);function v(g){if(g.distanceText&&g.distanceText!==e.options.distanceText){const A=g.distanceText;e.options.distanceText=A,Object.values(r).forEach(b=>{b.rules.forEach(y=>{const[E,k]=y.rule,S=E.distanceTo(k),C=y.$element.querySelector(".PanoRulerPlugin-rule-label-name");C&&(C.innerText=A(S))})})}}return{enable:u,disable:m,load:l,state:e,changeConfigs:v}};function Wg(i){fe(i,"svelte-1h27ktp",".PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp{position:absolute;transform-origin:left 0.0625rem;width:0;height:0.125rem;pointer-events:none}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::after{content:'';position:absolute;left:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp.svelte-1h27ktp::before{content:'';position:absolute;right:-0.125rem;top:-0.1rem;width:0.25rem;height:0.25rem;border-radius:50%;background:#fff;z-index:1;animation:svelte-1h27ktp-viewport-rule-point 0.1s 1.5s;animation-fill-mode:both}.PanoRulerPlugin-rule-line.svelte-1h27ktp em.svelte-1h27ktp{display:block;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;box-shadow:0 0 0.25rem rgb(0 0 0 / 40%);position:relative}.rule-mixed-line.svelte-1h27ktp.svelte-1h27ktp{display:flex;height:0.0625rem;animation:svelte-1h27ktp-viewport-rule-line 0.5s ease 1s;animation-fill-mode:both;align-items:center}.em-solid.svelte-1h27ktp.svelte-1h27ktp{height:100%;background:#ffffff}.em-dotted.svelte-1h27ktp.svelte-1h27ktp{height:0.125rem;background:var(--background-image);background-position:center;background-repeat:repeat}.PanoRulerPlugin-rule-label.svelte-1h27ktp.svelte-1h27ktp{position:absolute;width:0;height:0;top:0.0625rem;pointer-events:none}.PanoRulerPlugin-rule-label-name.svelte-1h27ktp.svelte-1h27ktp{position:absolute;padding:0.1875rem 0.375rem;background:rgba(195, 195, 195, 0.3);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem);border-radius:6.25rem;border:0.0625rem solid rgba(255, 255, 255, 0.6);white-space:nowrap;overflow:hidden;color:#ffffff;font-weight:500;font-size:0.75rem;line-height:1;animation:svelte-1h27ktp-viewport-rule-label 0.25s ease 1s;animation-fill-mode:both;box-shadow:inset 0 0 0.625rem 0 rgba(255, 255, 255, 0.3)}@keyframes svelte-1h27ktp-viewport-rule-line{0%{width:0%}100%{width:100%}}@keyframes svelte-1h27ktp-viewport-rule-label{0%{opacity:0;transform:scaleX(0)}100%{opacity:1;transform:translate(-50%, -50%) scaleX(1)}}@keyframes svelte-1h27ktp-viewport-rule-point{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}")}function Cl(i,t,e){const n=i.slice();return n[6]=t[e],n}function Ng(i){let t,e=i[0].children,n=[];for(let o=0;o<e.length;o+=1)n[o]=El(Cl(i,e,o));return{c(){t=z("div");for(let o=0;o<n.length;o+=1)n[o].c();w(t,"class","rule-mixed-line svelte-1h27ktp")},m(o,s){j(o,t,s);for(let r=0;r<n.length;r+=1)n[r]&&n[r].m(t,null)},p(o,s){if(s&9){e=o[0].children;let r;for(r=0;r<e.length;r+=1){const a=Cl(o,e,r);n[r]?n[r].p(a,s):(n[r]=El(a),n[r].c(),n[r].m(t,null))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},d(o){o&&V(t),qt(n,o)}}}function Xg(i){let t,e;return{c(){t=z("em"),w(t,"class",e=Be(i[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),w(t,"style",i[3])},m(n,o){j(n,t,o)},p(n,o){o&1&&e!==(e=Be(n[0].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&w(t,"class",e),o&8&&w(t,"style",n[3])},d(n){n&&V(t)}}}function El(i){let t,e,n=`${i[6].width}px`;return{c(){t=z("div"),w(t,"class",e=Be(i[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp"),w(t,"style",i[3]),T(t,"width",n)},m(o,s){j(o,t,s)},p(o,s){s&1&&e!==(e=Be(o[6].state?"em-solid":"em-dotted")+" svelte-1h27ktp")&&w(t,"class",e),s&8&&w(t,"style",o[3]),(s&8||s&9&&n!==(n=`${o[6].width}px`))&&T(t,"width",n)},d(o){o&&V(t)}}}function Yg(i){let t,e,n,o,s=i[0].labelElement+"",r,a,l=`${i[0].labelOffset}%`,c=`${i[0].width}px`,d=`${i[0].left}px`,h=`${i[0].top}px`,u=`rotate(${i[0].rotateDeg}deg)`;function m(A,b){return A[0].children.length===0?Xg:Ng}let v=m(i),g=v(i);return{c(){t=z("div"),g.c(),e=ne(),n=z("div"),o=z("div"),r=_e(s),w(o,"class","PanoRulerPlugin-rule-label-name svelte-1h27ktp"),ot(()=>i[4].call(o)),w(n,"class","PanoRulerPlugin-rule-label svelte-1h27ktp"),T(n,"left",l),w(t,"class","PanoRulerPlugin-rule-line svelte-1h27ktp"),T(t,"width",c),T(t,"left",d),T(t,"top",h),T(t,"transform",u),T(t,"display",i[0].visible&&i[2]?"block":"none")},m(A,b){j(A,t,b),g.m(t,null),O(t,e),O(t,n),O(n,o),O(o,r),a=ls(o,i[4].bind(o))},p(A,[b]){v===(v=m(A))&&g?g.p(A,b):(g.d(1),g=v(A),g&&(g.c(),g.m(t,e))),b&1&&s!==(s=A[0].labelElement+"")&&Oe(r,s),b&1&&l!==(l=`${A[0].labelOffset}%`)&&T(n,"left",l),b&1&&c!==(c=`${A[0].width}px`)&&T(t,"width",c),b&1&&d!==(d=`${A[0].left}px`)&&T(t,"left",d),b&1&&h!==(h=`${A[0].top}px`)&&T(t,"top",h),b&1&&u!==(u=`rotate(${A[0].rotateDeg}deg)`)&&T(t,"transform",u),b&5&&T(t,"display",A[0].visible&&A[2]?"block":"none")},i:K,o:K,d(A){A&&V(t),g.d(),a()}}}function Ug(i,t,e){let n,{rulerItemProp:o}=t,s=!0,r,a="data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQiIHdpZHRoPSIxMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PGZpbHRlciBpZD0icHJlZml4X19hIiBoZWlnaHQ9IjQwMCUiIHdpZHRoPSIxMzcuNCUiIHg9Ii0xOC43JSIgeT0iLTE1MCUiPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiBvcGVyYXRvcj0iZGlsYXRlIiByYWRpdXM9Ii41IiByZXN1bHQ9InNoYWRvd1NwcmVhZE91dGVyMSIvPjxmZU9mZnNldCBpbj0ic2hhZG93U3ByZWFkT3V0ZXIxIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZU1vcnBob2xvZ3kgaW49IlNvdXJjZUFscGhhIiByYWRpdXM9IjEiIHJlc3VsdD0ic2hhZG93SW5uZXIiLz48ZmVPZmZzZXQgaW49InNoYWRvd0lubmVyIiByZXN1bHQ9InNoYWRvd0lubmVyIi8+PGZlQ29tcG9zaXRlIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIGluMj0ic2hhZG93SW5uZXIiIG9wZXJhdG9yPSJvdXQiIHJlc3VsdD0ic2hhZG93T2Zmc2V0T3V0ZXIxIi8+PGZlR2F1c3NpYW5CbHVyIGluPSJzaGFkb3dPZmZzZXRPdXRlcjEiIHJlc3VsdD0ic2hhZG93Qmx1ck91dGVyMSIgc3RkRGV2aWF0aW9uPSIuNSIvPjxmZUNvbG9yTWF0cml4IGluPSJzaGFkb3dCbHVyT3V0ZXIxIiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMiAwIi8+PC9maWx0ZXI+PHBhdGggaWQ9InByZWZpeF9fYiIgZD0iTS44ODkgMkgxMS41OCIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48dXNlIGZpbGw9IiMwMDAiIGZpbHRlcj0idXJsKCNwcmVmaXhfX2EpIiB4bGluazpocmVmPSIjcHJlZml4X19iIi8+PHVzZSBzdHJva2U9IiNmZmYiIHN0cm9rZS1vcGFjaXR5PSIuNCIgeGxpbms6aHJlZj0iI3ByZWZpeF9fYiIvPjwvZz48L3N2Zz4=";function l(){r=this.offsetWidth,e(1,r)}return i.$$set=c=>{"rulerItemProp"in c&&e(0,o=c.rulerItemProp)},i.$$.update=()=>{i.$$.dirty&3&&(r>=o.width||r/2>=o.labelOffset/100*o.width||r/2>=(1-o.labelOffset/100)*o.width?e(2,s=!1):e(2,s=!0))},e(3,n=`--background-image: url(${a})`),[o,r,s,n,l]}class qg extends ce{constructor(t){super(),le(this,t,Ug,Yg,ae,{rulerItemProp:0},Wg)}}function Il(i,t,e){const n=i.slice();return n[12]=t[e],n}function kl(i){let t,e;return t=new qg({props:{rulerItemProp:i[12]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.rulerItemProp=n[12]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Jg(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=kl(Il(i,n,r));const s=r=>L(o[r],1,1,()=>{o[r]=null});return{c(){t=z("div");for(let r=0;r<o.length;r+=1)o[r].c()},m(r,a){j(r,t,a);for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(t,null);e=!0},p(r,[a]){if(a&1){n=r[0];let l;for(l=0;l<n.length;l+=1){const c=Il(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=kl(c),o[l].c(),x(o[l],1),o[l].m(t,null))}for(de(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)x(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)L(o[a]);e=!1},d(r){r&&V(t),qt(o,r)}}}function Zg(i,t,e){var g,A,b,y;let{five:n}=t,{rulerDatas:o}=t,{options:s}=t,r=[];const a=((A=(g=n.getElement())==null?void 0:g.parentElement)==null?void 0:A.clientWidth)||0,l=((y=(b=n.getElement())==null?void 0:b.parentElement)==null?void 0:y.clientHeight)||0,c=(E,k)=>{const S=[[{x:0,y:0},{x:a,y:0}],[{x:0,y:0},{x:0,y:l}],[{x:a,y:0},{x:a,y:l}],[{x:0,y:l},{x:a,y:l}]],C=[];for(let _=0;_<S.length;_++){const M=vh([E,k],[S[_][0],S[_][1]],!0);M&&C.push(M)}return C.length===0?!1:C},d=(E,k)=>{const S=E.clone().project(n.camera),C=(S.x+1)/2*a,_=(-S.y+1)/2*l,M=k.clone().project(n.camera),X=(M.x+1)/2*a,J=(-M.y+1)/2*l,H=Math.sqrt(Math.pow(X-C,2)+Math.pow(J-_,2));return{startLeft:C,startTop:_,endLeft:X,endTop:J,distance:H}},h=(E,k,S)=>{const C=n.camera.position,_=n.camera.getWorldDirection(new R.Vector3),M=E.clone().sub(C).normalize().angleTo(_),X=k.clone().sub(C).normalize().angleTo(_),J=E.distanceTo(k),Q=k.clone().sub(k.clone().sub(E).divide(new R.Vector3(2,2,2))).distanceTo(C),{startLeft:G,startTop:B,endLeft:W,endTop:q,distance:U}=d(E,k),re=-((Math.PI/2-Math.atan2(W-G,B-q))/Math.PI)*180;let oe=!0;S||(oe=!1),!jt(E,S)&&!jt(k,S)&&(oe=!1),J<.3&&(oe=!1),M>Math.PI/2&&(oe=!1),X>Math.PI/2&&(oe=!1),Q/J>8&&(oe=!1);let Ae=50,we=U;const ge=c({x:~~G,y:~~B},{x:~~W,y:~~q});if(ge&&ge.length===1&&(jt(E,S)?(we=Math.sqrt(Math.pow(ge[0].x-G,2)+Math.pow(ge[0].y-B,2)),Ae=we/U*50):jt(k,S)&&(we=Math.sqrt(Math.pow(ge[0].x-W,2)+Math.pow(ge[0].y-q,2)),Ae=100-we/U*50)),ge&&ge.length===2){const Ve={x:(ge[0].x+ge[1].x)/2,y:(ge[0].y+ge[1].y)/2};Ae=Math.sqrt(Math.pow(Ve.x-G,2)+Math.pow(Ve.y-B,2))/U*100}return{startLeft:G,startTop:B,distance:U,deg:re,visible:oe,labelOffset:Ae,ruleLength:J}},u=()=>{const E=n.panoIndex,k=o.find(H=>H.panoIndex===E);if(!k)return e(0,r=[]);if(n.currentMode!==ze.Five.Mode.Panorama)return e(0,r=[]);const S=n.camera.position,C=n.camera.getWorldDirection(new R.Vector3),_=k.lines.map(H=>new R.Vector3(H.start[0],-H.start[1],-H.start[2])),M=k.lines.map(H=>new R.Vector3(H.end[0],-H.end[1],-H.end[2])),[X]=_.concat(M).sort((H,Q)=>{const G=H.clone().setY(0).sub(S).normalize().angleTo(C.clone().setY(0)),B=Q.clone().setY(0).sub(S).normalize().angleTo(C.clone().setY(0));return G-B}),J=k.lines.map(H=>{var we,ge;const Q=H.start,G=H.end,{startLeft:B,startTop:W,distance:q,deg:U,visible:Z,labelOffset:re,ruleLength:oe}=h(new R.Vector3(Q[0],-Q[1],-Q[2]),new R.Vector3(G[0],-G[1],-G[2]),X),Ae=[];return H.children&&((we=H.children)==null?void 0:we.length)>0&&((ge=H.children)==null||ge.forEach(Ve=>{const ve=Ve.start,Ge=Ve.end,{distance:ue}=d(new R.Vector3(ve[0],-ve[1],-ve[2]),new R.Vector3(Ge[0],-Ge[1],-Ge[2]));Ae.push({width:ue,state:Ve.state})})),{width:q,left:B,top:W,rotateDeg:U,state:H.state,children:Ae,labelOffset:re,visible:Z,labelElement:s.distanceText(oe)}});e(0,r=J)},m=()=>rs(u),v=pa(u,80);return Mt(()=>{u(),n.on("panoArrived",u),n.on("modeChange",u),n.on("cameraDirectionUpdate",m),n.on("movingToPano",m),n.on("mouseWheel",()=>v()),n.on("pinchGesture",()=>v())}),hn(()=>{n.off("panoArrived",u),n.off("modeChange",u),n.off("cameraDirectionUpdate",m),n.off("movingToPano",m),n.off("mouseWheel",()=>v()),n.off("pinchGesture",()=>v())}),i.$$set=E=>{"five"in E&&e(1,n=E.five),"rulerDatas"in E&&e(2,o=E.rulerDatas),"options"in E&&e(3,s=E.options)},[r,n,o,s]}class Kg extends ce{constructor(t){super(),le(this,t,Zg,Jg,ae,{five:1,rulerDatas:2,options:3})}}let $g=class{constructor(t,e){f(this,"five");f(this,"container",document.createElement("div"));f(this,"panoRulerProData");f(this,"rulerItems");f(this,"state",{enabled:!1,loaded:!1,options:{className:"",distanceText:t=>`${t.toFixed(1)}m`}});var n,o;this.five=t,this.container.classList.add("panoRulerProPlugin-container"),this.container.setAttribute("style","position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;"),e&&(e.data&&this.load(e.data),this.state.options=F(F({},this.state.options),e.options||{}),(n=e.options)!=null&&n.className&&this.container.classList.add((o=e.options)==null?void 0:o.className)),this.five.once("modelLoaded",()=>Y(this,null,function*(){var s,r;(r=(s=this.five.getElement())==null?void 0:s.parentNode)==null||r.append(this.container)})),this.five.once("dispose",()=>this.dispose())}load(t){return Y(this,null,function*(){if(!this.five.work)return;const e=t.data;if(!e)throw new Error("标尺数据依赖不齐全!");this.panoRulerProData=e,this.state.loaded=!0})}enable(){return this.state.loaded?(this.state.enabled||(this.state.enabled=!0,this.render()),!0):!1}disable(){return this.state.enabled&&(this.state.enabled=!1,this.render()),!0}render(){return Y(this,null,function*(){var t;if(this.state.enabled){if(!this.panoRulerProData||!this.container)return;this.rulerItems=new Kg({target:this.container,props:{five:this.five,rulerDatas:this.panoRulerProData,options:this.state.options}})}else(t=this.rulerItems)==null||t.$destroy(),this.rulerItems=void 0})}dispose(){this.container&&(this.rulerItems.$destroy(),this.rulerItems=void 0),this.container.remove()}};const ev=(i,t)=>new $g(i,t),tv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcsn5nPRM6WmVU55KfO+J0mdKj8f5rVu3skNMoET6RSBE0m/fdVNzGWII4StKXy65y18t58aEAVGcUjDkGHsLhIOYfCC1xUT4QDJjgnmkc58qkT8sa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4Tddbenohy4nDwKnQGAPG4rdZALehA09KpGo8bhou9iUbbs0/jMNTscBdRgJAm0hIF1+wzWSrt52OXkQOCUC0kNsNNuHsatz24iHqI709GxLAjcmktJQEwj5WPA+aCiuWB4YHKOT4yYRkF7zUNkg0lueSI4EgbMiIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function nv(){const i=document.createElement("div"),t=document.createElement("i"),e=document.createElement("span");return i.appendChild(t),i.appendChild(e),i.style.position="relative",i.style.width="100%",i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.marginTop=`${150/16}rem`,i.style.opacity="0",i.style.transition="opacity 1000ms linear",t.style.display="block",t.style.width=`${134/16}rem`,t.style.height=`${22/16}rem`,t.style.backgroundSize="100%",t.style.backgroundRepeat="no-repeat",t.style.backgroundImage=`url(${tv})`,e.style.marginTop=`${10/16}rem`,e.style.fontSize=`${16/16}rem`,e.style.color="#fff",e.style.opacity="0.7",e.style.textShadow="0 2px 16px rgb(22 34 83 / 24%)",e.style.fontWeight="bold",{appendTo(n){n.appendChild(i)},dispose(){i.remove()},setRoom(n){e.innerHTML=n.name+" "+Math.floor(n.size/1e6)+"㎡"},show(){i.style.opacity="1"},hide(){i.style.opacity="0"}}}const iv=new I.TextureLoader;function Ui(i){return Y(this,null,function*(){return new Promise((t,e)=>{iv.load(i,t,void 0,e)}).then(t=>(t.encoding=I.sRGBEncoding,t))})}const xo={userAction:!0};class ov extends Mn{constructor(e,n){super(e);f(this,"state",{visible:!0,enabled:!0,config:{compassImageUrl:"//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png",entryDoorImageUrl:"//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png"}});f(this,"data");f(this,"group",new I.Group);f(this,"roomInfoInstance");f(this,"roomInfoWrapperInstance");f(this,"compassMeshTween");f(this,"compassMesh");f(this,"entryDoorMesh");f(this,"dispose",()=>{var e,n,o,s;this.five.scene.remove(this.group),this.group.remove(...this.group.children),(n=(e=this.compassMesh)==null?void 0:e.material.map)==null||n.dispose(),(s=(o=this.entryDoorMesh)==null?void 0:o.material.map)==null||s.dispose(),this.five.off("dispose",this.dispose),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});f(this,"_addEventListener",()=>{this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("modeChange",this.onFiveModeChange),this.five.on("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});f(this,"_removeEventListener",()=>{this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("modeChange",this.onFiveModeChange),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});f(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});f(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});f(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});f(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});f(this,"_clearEntryDoorIfNeed",()=>{var e;this.entryDoorMesh&&(this.group.remove(this.entryDoorMesh),(e=this.entryDoorMesh.material.map)==null||e.dispose(),this.entryDoorMesh=null),this.roomInfoInstance&&(this.roomInfoInstance.dispose(),this.roomInfoInstance=null),this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.dispose(),this.roomInfoWrapperInstance=null)});f(this,"onFivePanoWillArrive",e=>{var n,o;e!==this.five.panoIndex&&((n=this.compassMeshTween)==null||n.dispose(),(o=this.compassMesh)==null||o.material.setValues({opacity:0}))});f(this,"onFivePanoArrived",e=>{var o,s,r,a,l,c,d;const n=(r=(s=(o=this.five.work)==null?void 0:o.observers)==null?void 0:s[e])==null?void 0:r.standingPosition;if(this.compassMesh&&(this.compassMesh.position.copy(n.clone().setY(n.y+.01)),this.compassMesh.material.opacity===0&&((a=this.compassMeshTween)==null||a.dispose(),this.compassMeshTween=ss(1e3).onUpdate(({progress:h})=>{var u;(u=this.compassMesh)==null||u.material.setValues({opacity:h}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const u=new I.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(n.y).sub(n).normalize(),m=n.clone().add(u.clone().multiplyScalar(.7)).setY(n.y+.01);this.entryDoorMesh.rotation.z=new I.Vector3(0,0,-1).angleTo(u),this.entryDoorMesh.position.copy(m),((l=this.data)==null?void 0:l.room_observers[e].room.type)===1?(c=this.entryDoorMesh)==null||c.material.setValues({opacity:1}):(d=this.entryDoorMesh)==null||d.material.setValues({opacity:0})}this.roomInfoInstance&&this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.position.copy(n.clone().setY(n.y+.01)),this.roomInfoInstance.setRoom(this.data.room_observers[e].room)),this.five.needsRender=!0});f(this,"onFiveCameraDirectionUpdate",({longitude:e,latitude:n})=>{var o,s;this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.rotation.z=e,n>.66&&this.five.getCurrentState().mode==="Panorama"?(o=this.roomInfoInstance)==null||o.show():(s=this.roomInfoInstance)==null||s.hide())});f(this,"onFiveModeChange",(e,n,o,s,r)=>{e!==n&&this.setState({visible:e===ze.Five.Mode.Panorama},{userAction:r})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:F(F({},this.state.config),n||{})})}enable(e=xo){this.setState({enabled:!0},e)}disable(e=xo){this.setState({enabled:!1},e)}show(e=xo){if(this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=xo){if(this.state.enabled)return this.setState({visible:!1},e),Promise.resolve()}setState(e,n={userAction:!0}){var s,r;const o=JSON.parse(JSON.stringify(this.state));this.state={visible:(s=e.visible)!=null?s:o.visible,enabled:(r=e.enabled)!=null?r:o.enabled,config:F(F({},o.config),e.config||{})},this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:n.userAction}),e.enabled===!0&&(this._enable(),this.hooks.emit("enable",n)),e.enabled===!1&&(this._disable(),this.hooks.emit("disable",n)),e.visible===!1&&(this._toggleVisible(),this.hooks.emit("hide",n)),e.visible===!0&&(this._toggleVisible(),this.hooks.emit("show",n)),e.config&&this.init()}load(e,n,o=!0){return Y(this,null,function*(){const s=yield this.formatData(e);JSON.stringify(this.data)!==JSON.stringify(s)&&(this.hooks.emit("dataChange",s,this.data),this.data=F({},s),this.init(),n&&this.setState(n,{userAction:o}),this.hooks.emit("dataLoaded",this.data))})}formatData(e){return e.version&&e.data?Promise.resolve(e.data):Promise.resolve(e)}init(){return Y(this,null,function*(){var o,s,r,a;const e=(s=(o=this.data)==null?void 0:o.north_rad)!=null?s:null;this._clearCompassIfNeed(),e!==null&&(this.compassMesh=yield this.loadCompassMesh(),this.compassMesh.rotateX(-Math.PI/2),this.compassMesh.rotateZ(e-Math.PI/2),this.group.add(this.compassMesh));const n=(a=(r=this.data)==null?void 0:r.entrance)!=null?a:null;this._clearEntryDoorIfNeed(),n!==null&&(this.entryDoorMesh=yield this.loadEntryDoorMesh(),this.roomInfoWrapperInstance=this.loadRoomInfo(),this.roomInfoInstance=nv(),this.entryDoorMesh.rotateX(-Math.PI/2),this.roomInfoWrapperInstance&&this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container),this.group.add(this.entryDoorMesh)),this.onFivePanoArrived(this.five.panoIndex||0),this.five.needsRender=!0})}loadCompassMesh(){return Y(this,null,function*(){const e=this.state.config.compassImageUrl,n=yield Ui(e),o=new I.CircleGeometry(.7,32),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:0,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-mesh",r})}loadEntryDoorMesh(){return Y(this,null,function*(){const e=this.state.config.entryDoorImageUrl,n=yield Ui(e),o=new I.PlaneGeometry(.2,.16),s=new I.MeshBasicMaterial({map:n,transparent:!0,opacity:.8,depthTest:!1}),r=new I.Mesh(o,s);return r.name="pano-compass-entry-door",r})}loadRoomInfo(){const e=[new I.Vector3(-.7,0,-.7),new I.Vector3(.7,0,-.7),new I.Vector3(.7,0,.7),new I.Vector3(-.7,0,.7)];return as(this.five).create3DDomContainer(e)}}const sv=(i,t)=>new ov(i,t);function Do(i,t,e){const n=i[t],o=i[e];n===void 0||o===void 0||(i[t]=o,i[e]=n)}function rv(i,t,e){const n=e/2;for(let o=1;o<=n;o++){const s=e-(o-1);for(let r=1;r<=t;r++){const a=(o-1)*t+r-1,l=(s-1)*t+r-1;Do(i,a*4+0,l*4+0),Do(i,a*4+1,l*4+1),Do(i,a*4+2,l*4+2),Do(i,a*4+3,l*4+3)}}}class bh{constructor(t,e){f(this,"width");f(this,"height");f(this,"containerDom");f(this,"hooks",new ze.Subscribe);f(this,"canvas",document.createElement("canvas"));f(this,"five");f(this,"scale");f(this,"config");f(this,"offset",{x:0,y:0});f(this,"context");f(this,"renderCenter",new I.Vector3);f(this,"hammer");f(this,"state",{enabled:!1});f(this,"offsetRange");f(this,"isPanning",!1);f(this,"onPanstart",()=>{this.isPanning=!0,this.canvas.style.boxShadow="0 2px 30px 0 rgba(0,0,0,0.20)"});f(this,"onPan",t=>{if(!this.isPanning||!this.offsetRange||this.hooks.emit("wantsPanGesture",t))return;const{translateX:n,translateY:o}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${n}px, ${o}px, 100px)`});f(this,"onPanend",t=>{if(this.isPanning=!1,this.canvas.style.boxShadow="none",!this.offsetRange)return;const{translateX:e,translateY:n}=this.getPanOffset(t,this.offsetRange);this.canvas.style.transform=`translate3d(${e}px, ${n}px, 100px)`,this.offset={x:e,y:n}});var o,s,r;if(!t.renderer)throw new Error("Five Render 未初始化");this.five=t,this.scale=(o=e==null?void 0:e.scale)!=null?o:2,this.width=(s=e==null?void 0:e.width)!=null?s:190,this.height=(r=e==null?void 0:e.height)!=null?r:190,this.config={dragEnabled:(e==null?void 0:e.dragEnabled)||!1,autoFixPCPosition:(e==null?void 0:e.autoFixPCPosition)||!1,initialPosition:(e==null?void 0:e.initialPosition)||{left:"0",top:"0"}};const n=this.canvas.getContext("2d");if(!n)throw new Error("CANNOT CREATE CONTEXT2D");this.context=n,this.config.dragEnabled&&(this.hammer=new Ki(this.canvas),this.hammer.on("pan",this.onPan),this.hammer.on("panstart",this.onPanstart),this.hammer.on("panend",this.onPanend)),this.initStyle()}dispose(){var t;this.clear(),this.disable(),(t=this.hammer)==null||t.destroy()}enable(){if(!this.state.enabled)return this.state.enabled=!0,this.containerDom&&this._appendTo(this.containerDom),this}disable(){if(this.state.enabled)return this.state.enabled=!1,this.canvas.remove(),this}appendTo(t){return this.containerDom=t,this.state.enabled&&this._appendTo(t),this}clear(){return this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this}renderWithPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}renderWithScreenPoint(t){this.containerDom&&this.state.enabled&&(this.renderCenter=t,this.render(),this.config.autoFixPCPosition&&this.autoFixPCPosition())}resetOffset(){this.offset={x:0,y:0},this.canvas.style.transform="translate3d(0px, 0px, 100px)"}getCurrentState(){return{enabled:this.state.enabled}}getRenderCenter(){return this.renderCenter}_appendTo(t){if(this.resetOffset(),t.appendChild(this.canvas),!this.offsetRange){const e=this.canvas.getBoundingClientRect(),n=t.getBoundingClientRect(),o=n.right-e.right,s=n.bottom-e.bottom,r=n.left-e.left,a=n.top-e.top;this.offsetRange={min:{x:r,y:a},max:{x:o,y:s}}}}autoFixPCPosition(){if(!this.containerDom)return;const{width:t,height:e}=this,[n,o,s]=(()=>{if(this.renderCenter instanceof I.Vector3){const r=this.renderCenter.clone().project(this.five.camera);return[(r.x+1)/2*this.containerDom.clientWidth,-(r.x-1)/2*this.containerDom.clientWidth,-(r.y-1)/2*this.containerDom.clientHeight]}else return[this.renderCenter.x,this.containerDom.clientWidth-this.renderCenter.x,this.renderCenter.y]})();n<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left="90px"):s<183?(this.canvas.style.top="90px",this.canvas.style.left=-t/2+"px"):o<183?(this.canvas.style.top=-e/2+"px",this.canvas.style.left=-t-90+"px"):(this.canvas.style.left=-t/2+"px",this.canvas.style.top=-e-90+"px"),this.canvas.style.transform=`translate3d(${n}px, ${s}px, 10px)`,this.offset={x:n,y:s}}render(){if(!this.five.renderer||!this.containerDom)return;const{scale:t,context:e,width:n,height:o}=this,s=this.five.renderer.getSize(new I.Vector2),[r,a]=(()=>{if(this.renderCenter instanceof I.Vector3){const A=this.renderCenter.clone().project(this.five.camera);return[(A.x+1)/2*s.x,(A.y+1)/2*s.y]}else return[this.renderCenter.x,s.y-this.renderCenter.y]})(),l=1,c=n/t,d=o/t,h=l*t,u=this.five.getPixels(r-c/2,a-c/2,c,d,h),m=Math.floor(n*l),v=Math.floor(o*l);rv(u,m,v);const g=new ImageData(m,v);g.data.set(u),e.putImageData(g,0,0)}initStyle(){const t=this.canvas;t.classList.add("five-plugin__magnifier"),t.style.position="absolute",t.style.pointerEvents="all",t.style.borderRadius="50%",t.style.zIndex="99";const e=1;t.setAttribute("width",(this.width*e).toString()),t.setAttribute("height",(this.height*e).toString()),t.style.border="2px solid rgba(255,255,255,0.20)",t.style.width=this.width+"px",t.style.height=this.height+"px",t.style.top=this.config.initialPosition.top,t.style.left=this.config.initialPosition.left,t.style.transform="translate(0,0,100px)",this.config.dragEnabled&&(this.canvas.style.cursor="pointer")}getPanOffset(t,e){const{min:{x:n,y:o},max:{x:s,y:r}}=e,a=this.offset.x+t.deltaX,l=this.offset.y+t.deltaY,c=Math.min(Math.max(a,n),s),d=Math.min(Math.max(l,o),r);return{translateX:c,translateY:d}}}class av{constructor(t){f(this,"edges",[]);f(this,"five");f(this,"onModelLoaded",()=>{this.five.model&&(this.edges=this.five.model.getEdges())});this.five=t,this.five.model.loaded?this.onModelLoaded():this.five.on("modelLoaded",this.onModelLoaded)}dispose(){}getAdsorbentPoint(t){if(this.edges.length===0)return null;let e=1/0,n;return this.edges.forEach(o=>{const s=o.closestPointToPoint(t.point,!0,new R.Vector3),r=s.distanceTo(t.point);r<e&&(n=s,e=r)}),e>.1?null:n||null}}const lv=1,cv=3,dv=new R.Color(16777215),hv=new R.Color(6522623),uv=new R.Color(16777215),fv=new R.Color(6522623),mv=6,pv=8,gv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAIVBMVEUAAAD////////////////////////////////////////PIev5AAAACnRSTlMAG/Py2baba05un7UgfgAAAHJJREFUKM9joBpgLHVSCRdA4metAoJlCJHmVWBgAeNzroKCCVCBLpjACqgJVjCBxRBT2FbBQQJYQAohsBAsUIUQWA4WiEIILAULeCEEloAFtBACizAEMLRgGIphLabDMJ2O6TlM72MGECIIMQIZIxqoBQCPvpJ/e9FaAAAAAABJRU5ErkJggg==",yh=new R.TextureLoader().load(gv),vv={pointTexture:yh,pointSize:mv,lineWidth:lv,lineColor:dv,pointColor:uv,lineRenderOrder:20,pointsRenderOrder:20},Av={pointTexture:yh,pointSize:pv,lineWidth:cv,lineColor:hv,pointColor:fv,lineRenderOrder:10,pointsRenderOrder:10};function bv(i,t,e){var d,h,u,m,v;const n=(d=e==null?void 0:e.lineWidth)!=null?d:2,o=(h=e==null?void 0:e.lineColor)!=null?h:new R.Color(16777215),s=(u=e==null?void 0:e.pointSize)!=null?u:5,r=(m=e==null?void 0:e.lineRenderOrder)!=null?m:10,a=(v=e==null?void 0:e.lineRenderOrder)!=null?v:20,l=new yd.Line(i,t);l.setMaterial({linewidth:n,color:o}),l.line.material.depthTest=!1,l.line.material.transparent=!0,l.line.renderOrder=r,l.points.renderOrder=a;const c=l.points.material;return c.depthTest=!1,c.size=s,e!=null&&e.pointColor&&c.color.set(e.pointColor).convertSRGBToLinear(),e!=null&&e.pointTexture&&(c.map=e.pointTexture),l}function xl(i,t){const[e,n]=i.points,o=t==="light"?Av:vv,s=bv(e.position,n.position,o);return s.name="normalLine_"+i.id,s}function qi(i){const{x:t,y:e,z:n}=i;return!(Math.abs(t)>1||Math.abs(e)>1||Math.abs(n)>1)}function gr(i){const{z:t}=i;return!(Math.abs(t)>1)}function yv(){const i=document.createElement("div");return i.setAttribute("style","backdrop-filter: blur(4px);-webkit-backdrop-filter: blur(4px);-webkit-tap-highlight-color: rgba(0,0,0,0);"),i.style.width="max-content",i.style.padding="3px 6px",i.style.lineHeight="1",i.style.textAlign="center",i.style.transform="translate(-50%, -50%)",i.style.borderRadius="100px",i.style.fontSize="14px",i.style.color="#fff",i.style.background="rgba(195,195,195,0.70)",i.style.border="0.5px solid rgba(255,255,255,0.6)",i.style.cursor="pointer",i}function wv(i){const t=document.createElement("div");return t.id="distance_"+i.id,t.classList.add("five-plugin-measure__distance"),t.style.opacity="0",t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.width="0",t.style.height="0",t.style.transform="translate3d(0, 0, 0)",t.style.transformOrigin="left top",t}function Pv(i){let t=!0;const{line:e}=i,n=e.id,o=yv(),s=wv(e),r=i.userDistanceItem,a=new R.Vector3(0,0,0),l={lineID:n,ndcPosition:a,update:u,appendTo:m,remove:v,highlight:d,unHighlight:h,getCurrentContent:g,setItemSelectable:A};s.style.pointerEvents=t?"all":"none",r!=null&&r.element?s.appendChild(r.element):s.appendChild(o);function c(){var b;(b=i.clickCallback)==null||b.call(i,l)}function d(){if(r)return r.highlight();o.style.border="0.5px solid #95AEFF",o.style.background="linear-gradient(90deg, #95AEFF 0%, #6386FF 100%)"}function h(){if(r)return r.unHighlight();o.style.border="0.5px solid rgba(255,255,255,0.6)",o.style.background="rgba(195,195,195,0.70)"}function u(b){if(e.mesh.visible===!1){s.style.opacity="0",s.style.pointerEvents="none";return}const y=b.getElement();if(!y)return;const E=y.clientWidth,k=y.clientHeight,S=E/2,C=k/2;if(e.points.length<2)return;const[_,M]=e.points,X=_.position.clone().project(b.camera),J=M.position.clone().project(b.camera),H=X.clone().lerp(J,.5),Q=new R.Vector2(X.x*S,X.y*C),G=new R.Vector2(J.x*S,J.y*C),B=Q.distanceTo(G);if((()=>!(Math.abs(X.z)>1||Math.abs(J.z)>1||!gr(X)&&!gr(J)||!gr(H)||B===0))()===!1){s.style.opacity="0",s.style.pointerEvents="none";return}const q=(H.x+1)/2*E,U=-(H.y-1)/2*k,re=-(Math.atan((Q.y-G.y)/(Q.x-G.x))*180)/Math.PI,oe=s.parentElement&&o.clientWidth>B?-20:0;s.style.transform=`translate(${q}px, ${U}px) rotate(${re}deg) translateY(${oe}px)`,s.style.opacity="1",s.style.pointerEvents=t?"all":"none",r&&r.update({line:e,polyline:e.getPolyline()});const Ae=g();o.innerText=Ae}function m(b){b.appendChild(s),s.addEventListener("click",c)}function v(){o.removeEventListener("click",c),s.remove()}function g(){var _,M,X;if(e.points.length<2)return"";const[b,y]=e.points,E=b.position.clone().distanceTo(y.position),k=(_=i.line.text)!=null?_:i.line.model.config.defaultText,S=(X=(M=i.line.model.config)==null?void 0:M.getDistanceText)==null?void 0:X.call(M,E),C=k!=null?k:S;return C!=null?C:E.toFixed(2)+"m"}function A(b){t=b}return l}class Sn{constructor(t,e,n){f(this,"id");f(this,"selected",!1);f(this,"text");f(this,"type","line");f(this,"model");f(this,"mesh");f(this,"points");f(this,"lightMesh");f(this,"hook");f(this,"distanceItem");f(this,"polyline");var o;if(this.id=dt(),this.model=n,t.id===e.id)throw new Error("无效的线段, 一个点无法构成线段");typeof n.config.defaultText=="string"&&(this.text=n.config.defaultText),this.hook=new ze.Subscribe,this.points=[t,e],this.mesh=xl(this,"normal"),this.lightMesh=xl(this,"light"),this.distanceItem=Pv({line:this,clickCallback:()=>this.hook.emit("selected",this),userDistanceItem:(o=this.model.config)!=null&&o.userDistanceItemCreator?this.model.config.userDistanceItemCreator():void 0}),t.lines.push(this),e.lines.push(this)}clear(){this.selected=!1,this.polyline=void 0}isEmpty(){return this.points.length===0}getPolyline(){if(this.polyline)return this.polyline;const t=this.model.polylines.find(e=>e.lines.includes(this));if(t)return this.polyline=t,t}findAnotherPoint(t){return this.points.find(({id:e})=>e!==t.id)}setText(t){this.text=t,this.hook.emit("textChanged",t)}toJson(){return{id:this.id,points:this.points.map(t=>t.toJson()),text:this.text}}clone(){const t=new Sn(this.points[0].clone(),this.points[1].clone(),this.model);return t.text=this.text,t}}function Cv(i,t){for(let e=0,n=t.length;e<n;e++)if(i===t[e])return t.splice(e,1)[0]}class Dt{constructor(t){f(this,"id");f(this,"lines");f(this,"position");f(this,"type","point");this.id=dt(),this.lines=[],this.position=new R.Vector3,t instanceof R.Vector3?this.position.copy(t):this.position.fromArray(t)}toJson(){return{id:this.id,position:this.position.toArray()}}addLine(t){this.lines.push(t)}removeLine(t){Cv(t,this.lines)}clone(){return new Dt(this.position)}}let Ji=class{constructor(t){f(this,"id",dt());f(this,"lines",[]);f(this,"points",[]);f(this,"visiblePanoIndexes");f(this,"model");f(this,"type","polyline");f(this,"hook",new ze.Subscribe);this.model=t.model}addLine(t){if(this.includes(t)){console.error(new Error("不能重复添加线段"));return}const e=this.getLastPoint(),n=e&&t.findAnotherPoint(e);e?e&&n?(this.lines.push(t),this.points.push(...t.points),this.hook.emit("lineAdded",t)):console.error(new Error("传入线段无法与当前折线进行连接")):(this.lines.push(t),this.points.push(...t.points),this.hook.emit("lineAdded",t))}removeLine(t){if(this.lines.length!==0){if(!this.isLastLine(t)){console.error(new Error("传入线段不是当前折线的最后一段"));return}this.lines.pop(),this.lines.length===0?this.points.slice(0,this.points.length):this.points.pop(),this.hook.emit("lineRemoved",t)}}isLastLine(t){const e=this.getLastLine();return e?t.id===e.id:!1}getLastLine(){return this.lines.slice(-1)[0]}clear(){const t=this.lines.slice();this.lines.slice(0,this.lines.length),this.points.slice(0,this.points.length),t.reduceRight((e,n)=>this.hook.emit("lineRemoved",n),void 0)}overlapWith(t){return t.type==="point"?this.includes(t):t.type==="line"?t.points.some(e=>this.includes(e)):t.type==="polyline"?t.points.some(e=>this.includes(e)):!0}includes(t){return t.type==="point"?this.points.find(({id:e})=>e===t.id)!==void 0:t.type==="line"?this.lines.find(({id:e})=>e===t.id)!==void 0:!1}isEmpty(){return this.points.length===0}getLastPoint(){return this.points.slice(-1)[0]}toJson(){return{id:this.id,lines:this.lines.map(t=>t.toJson()),visiblePanoIndexes:this.visiblePanoIndexes}}getPointByID(t){return this.points.find(({id:e})=>e===t)}fromJson(t){this.clear(),this.id=t.id;const{getPoint:e,getAllPoints:n}=r(),o=t.lines.map(a=>{const[l,c]=a.points,d=e(l),h=e(c);if(!d||!h)throw new Error("线上的点不存在");const u=new Sn(d,h,this.model);return u.id=a.id,u.text=a.text,u}),s=n();this.points.push(...s),this.lines.push(...o),this.visiblePanoIndexes=t.visiblePanoIndexes;function r(){const a=new Map;function l(d){const h=a.get(d.id);if(h)return h;const u=new Dt(d.position);return u.id=d.id,a.set(d.id,u),u}function c(){return Array.from(a.values())}return{getPoint:l,getAllPoints:c}}return this}replace(t){this.id=t.id,this.clear(),this.lines.push(...t.lines),this.points.push(...t.points)}};class ms{constructor(t){f(this,"config");f(this,"polylines",[]);f(this,"hook",new ze.Subscribe);this.config=t}addPolyline(t){if(this.includes(t)){console.error(new Error("不能重复添加 polyline"));return}this.polylines.push(t),this.hook.emit("polylineAdded",t)}replacePolylineByID(t,e){const n=this.getPolylineByID(t);n==null||n.replace(e)}removePolyline(t){const e=this.polylines.findIndex(({id:n})=>n===t.id);if(e===-1){console.error(new Error("polyline 不存在"));return}this.polylines.splice(e,1),this.hook.emit("polylineRemoved",t)}getPolylineByID(t){return this.polylines.find(e=>e.id===t)}getPolylineByLine(t){return this.polylines.find(e=>e.includes(t))}getLineByID(t){return this.getAllLines().find(e=>e.id===t)}getAllLines(){return this.polylines.map(t=>t.lines).flat(1)}getAllPoints(){return this.polylines.map(t=>t.points).flat(1)}includes(t){return this.polylines.find(({id:e})=>e===t.id)!==void 0}clear(){this.polylines.forEach(t=>this.hook.emit("polylineRemoved",t)),this.polylines.splice(0,this.polylines.length)}getClosestPoint(){}parse(t){this.clear(),this.polylines.push(...t.polylines.map(e=>new Ji({model:this}).fromJson(e))),this.polylines.forEach(e=>this.hook.emit("polylineAdded",e))}toJson(){return{polylines:this.polylines.map(t=>t.toJson()).filter(t=>t.lines.length>0)}}}const Mo=i=>i.preventDefault();let ps=class{constructor(t){f(this,"model");f(this,"five");f(this,"group");f(this,"config");f(this,"dashed");f(this,"disposed",!1);f(this,"isMobile");f(this,"mouseGroup");f(this,"container");f(this,"fiveHelper");f(this,"hook");f(this,"magnifier");f(this,"userDistanceItemCreator");f(this,"updateDistanceUI",()=>{this.dashed.distanceItem.update(this.five),this.model.getAllLines().forEach(t=>t.distanceItem.update(this.five))});var n,o;this.five=t.five,this.hook=t.hook,this.model=t.model,this.config=t.config,this.magnifier=t.magnifier,this.container=t.container,this.fiveHelper=t.fiveHelper,this.isMobile=(o=(n=t.openParams)==null?void 0:n.isMobile)!=null?o:!1,this.userDistanceItemCreator=t.userDistanceItemCreator,this.group=t.group,this.mouseGroup=t.mouseGroup,this.dashed=new Sn(new Dt([0,0,0]),new Dt([0,0,0]),this.model),this.dashed.distanceItem.setItemSelectable(!1),this.dashed.mesh.setMaterial({dashed:!0,dashScale:100}),this.dashed.mesh.name="dashLine";const e=this.five.getElement();e&&(e.addEventListener("touchstart",Mo),e.addEventListener("contextmenu",Mo))}removeLine(t){this.group.remove(t.mesh,t.lightMesh),t.distanceItem.remove(),this.five.needsRender=!0}updateMouseGroup(t,e){if(!t)return this.mouseGroup;const n=this.fiveHelper.getAdsorbentPoint(t),o=n||t.point;if(this.mouseGroup.position.copy(o),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const r=t.face.normal.clone().multiplyScalar(.05),l=t.point.clone().add(r).clone().add(r);this.mouseGroup.lookAt(l)}return this.mouseGroup}dispose(){this.disposed=!0,this.magnifier.disable(),this.model.getAllLines().forEach(e=>this.removeLine(e));const t=this.five.getElement();t&&(t.removeEventListener("touchstart",Mo),t.removeEventListener("contextmenu",Mo))}};function Gr(i){const{x:t,y:e}=i.center,{clientWidth:n,clientHeight:o}=i.target,s=i.target.getBoundingClientRect(),r=new R.Vector2(t,e).sub(new R.Vector2(s.left,s.top)),a=new R.Vector2(r.x/n*2-1,-(r.y/o)*2+1);return{point:r,ndcPoint:a}}function vr(i,t){const e=Gr(t).ndcPoint,n=new R.Raycaster;return n.setFromCamera(e,i.camera),i.model.intersectRaycaster(n)}class So extends ps{constructor(e){var o;super(e);f(this,"type","edit");f(this,"polyline");f(this,"pressPoint");f(this,"hasAppendDashed",!1);f(this,"hasAppendMouseGroup",!1);f(this,"fiveElement");f(this,"lastPoint",null);f(this,"hammer");f(this,"onIntersectionUpdate",pa((e,n)=>{var s;this.hasAppendMouseGroup===!1&&(this.group.add(this.mouseGroup),this.magnifier.appendTo(this.container),this.magnifier.enable(),this.hasAppendMouseGroup=!0);const o=this.updateMouseGroup(e,n).position;(s=this.pressPoint)==null||s.position.copy(o),this.updateDashed(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(this.mouseGroup.position)),this.five.needsRender=!0},20));f(this,"revoke",()=>{if(this.polyline.lines.length===0&&this.lastPoint){this.lastPoint=null,this.hasAppendDashed=!1,this.dashed.distanceItem.remove(),this.group.remove(this.dashed.mesh),this.hook.emit("anchorChange",null),this.hook.emit("editedDashedLineChange",null),this.five.needsRender=!0;return}if(this.polyline.lines.length===0&&!this.lastPoint||!this.lastPoint)return;const e=this.polyline.lines[this.polyline.lines.length-1],n=e.findAnotherPoint(this.lastPoint);n&&(this.lastPoint=n,this.hook.emit("anchorChange",n.position),this.group.remove(e.mesh),this.polyline.removeLine(e),this.hasAppendMouseGroup=!1,this.mouseGroup.position.copy(this.lastPoint.position),this.group.remove(this.mouseGroup),e.distanceItem.remove(),this.updateDashed(),this.magnifier.disable(),this.five.needsRender=!0)});f(this,"onMouseLeave",()=>{this.magnifier.disable(),this.group.remove(this.mouseGroup),this.hasAppendMouseGroup=!1,this.lastPoint&&(this.mouseGroup.position.copy(this.lastPoint.position),this.updateDashed())});f(this,"onLineChanged",()=>{this.hook.emit("editedPolylineChange",this.polyline)});f(this,"onPress",e=>{const[n]=vr(this.five,e);if(!(n!=null&&n.face))return;const o=new Dt(n.point);this.pressPoint=o,this.onIntersectionUpdate(n)});f(this,"onPan",e=>{if(!this.pressPoint)return;const[n]=vr(this.five,e);n!=null&&n.face&&this.onIntersectionUpdate(n)});f(this,"onPanEnd",e=>{this.pressPoint&&this.onTap(e)});f(this,"onTap",e=>{this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh)),this.hasAppendDashed=!0;const[n]=vr(this.five,e);this.updateMouseGroup(n);const o=new Dt(this.mouseGroup.position),s=this.lastPoint;if(o&&(this.lastPoint=o),o&&s){const r=new Sn(s,o,this.model);r.distanceItem.setItemSelectable(!1),r.distanceItem.appendTo(this.container),this.polyline.addLine(r),this.group.add(r.mesh),r.distanceItem.update(this.five)}this.pressPoint=void 0,this.hasAppendMouseGroup=!1,this.magnifier.disable(),this.group.remove(this.mouseGroup),this.updateDashed(),this.five.needsRender=!0,this.hook.emit("anchorChange",o.position)});f(this,"onWantsTapGesture",()=>!1);f(this,"onWantsToMoveToPano",()=>!1);f(this,"onWantsPanGesture",()=>this.pressPoint?!1:void 0);f(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});f(this,"updateDashed",()=>{this.lastPoint&&(this.dashed.points[0].position.copy(this.lastPoint.position),this.dashed.points[1].position.copy(this.mouseGroup.position),this.dashed.mesh.setPoints(this.lastPoint.position,this.mouseGroup.position),this.dashed.distanceItem.update(this.five),this.hook.emit("editedDashedLineChange",this.dashed))});this.model=new ms(this.config),this.polyline=new Ji({model:this.model}),this.model.addPolyline(this.polyline),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsPanGesture",this.onWantsPanGesture),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.on("intersectionOnModelUpdate",this.onIntersectionUpdate),this.polyline.hook.on("lineAdded",this.onLineChanged),this.polyline.hook.on("lineRemoved",this.onLineChanged);const n=this.five.getElement();if(n){this.fiveElement=n;const s=new Ki(n);this.hammer=s,s.on("tap",this.onTap),s.on("pan",this.onPan),s.on("press",this.onPress),s.on("panend",this.onPanEnd)}this.five.helperVisible=!1,(o=this.fiveElement)==null||o.addEventListener("mouseleave",this.onMouseLeave),this.hook.emit("anchorChange",null),this.hook.emit("editedDashedLineChange",null),this.five.refresh()}dispose(){var e,n;super.dispose(),this.five.helperVisible=!0,this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.onWantsPanGesture),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.off("intersectionOnModelUpdate",this.onIntersectionUpdate),this.polyline.hook.off("lineAdded",this.onLineChanged),this.polyline.hook.off("lineRemoved",this.onLineChanged),(e=this.hammer)==null||e.destroy(),(n=this.fiveElement)==null||n.removeEventListener("mouseleave",this.onMouseLeave),this.magnifier.dispose(),this.dashed.distanceItem.remove(),this.five.needsRender=!0}getEditingLines(){return this.polyline.lines}}class Dl extends ps{constructor(e){super(e);f(this,"type","view");f(this,"hammer");f(this,"polylineRemoved",e=>{e.lines.forEach(n=>this.removeLine(n)),this.hook.emit("selectedChange",this.model.getAllLines().filter(n=>n.selected).map(n=>n))});f(this,"polylineAdded",e=>{const n=this.five.getCurrentState().panoIndex;e.lines.forEach(o=>{e.visiblePanoIndexes&&!e.visiblePanoIndexes.includes(n)&&(o.mesh.visible=!1),o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),this.group.add(o.mesh)})});f(this,"onCameraUpdate",()=>{this.updateDistanceUI()});f(this,"onFivePanoWillArrive",e=>{this.model.polylines.forEach(n=>{n.visiblePanoIndexes&&(n.visiblePanoIndexes.includes(e)||n.lines.forEach(o=>{o.mesh.visible=!1,o.distanceItem.update(this.five)}))})});f(this,"onFivePanoArrived",e=>{this.model.polylines.forEach(n=>{n.visiblePanoIndexes&&n.visiblePanoIndexes.includes(e)&&n.lines.forEach(o=>{o.mesh.visible=!0,o.distanceItem.update(this.five)})})});this.model.getAllLines().forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),this.group.add(o.mesh)});const n=this.five.getElement();if(n){const o=new Ki(n);this.hammer=o}this.onFivePanoWillArrive(this.five.getCurrentState().panoIndex),this.onFivePanoArrived(this.five.getCurrentState().panoIndex),this.updateDistanceUI(),this.five.needsRender=!0,this.model.hook.on("polylineAdded",this.polylineAdded),this.model.hook.on("polylineRemoved",this.polylineRemoved),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive)}dispose(){var e;super.dispose(),this.model.hook.off("polylineAdded",this.polylineAdded),this.model.hook.off("polylineRemoved",this.polylineRemoved),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}}const Ev=`
288
288
  <svg class="fpm__delete-icon" width="16px" height="17px" viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
289
289
  <defs>
290
290
  <linearGradient x1="22.185491%" y1="100%" x2="66.8316686%" y2="6.67239121%" id="linearGradient-1">
@@ -297,14 +297,14 @@ void main() {
297
297
  `,Ml="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTciIGhlaWdodD0iMjUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIxMC43MDYlIiB5MT0iNDIuNzQ0JSIgeDI9Ijg5LjA2NCUiIHkyPSI1Ny4yMDglIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9Ii4zMDgiIG9mZnNldD0iNDkuNTY5JSIvPjxzdG9wIHN0b3AtY29sb3I9IiNGRkYiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0P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++C/D6lMWcoZndf3zd13+OR3g9fqi/6/pC8nn8rUEnz7pByIHvgvF4mZwA31DjRwvfWOP0MmTdTN6+9dp957keGz6A2jVtplvepmDXo+8yS2sy9QHN5ekGsIBO7eCz3Lr0ZUovL1HcO+788/zhtd6jEUInp369DJf3MaG7ir/9hqEYHxXiK8F+F04/mSa7uljqv17HfSN+gJ582eW3ftTeGGcT8t68Gcv73vkicM36necXqmb/GJ9h+OC77LwkcJvDMW8OfjOB/eTm3P2xUWxVocJ6uaiBRr32orc8NafI6m40Q/vs/qYjT16Q3v96JnSkK4XlQD32h3A/NJvZomR+MaVBzrnDeY6l2hW2PceDgs/nofEKxp6AemVcedsifNcxi87L36+IOYP3vgXQWUi7qVeB7+g18Pb7rzv8JPfdf/FH6Xvs7nXMZ/NFqfeP/6zl5+rN8HX6NdqX6on4yu1fxZ3lJvKG4SPHuzk3LS8QXDKTTQOgVXPglMueVYmbuJWn55+sukDZ+gTMouX/Og7V+YB29eM9YWgeqxwwz+nbf7smaG0G6689TOv8/MBmJBlXuHz/NGz54W7FEeNZW66Kg7Tz+ZrpthHTx88eehzfe+8CcKr/fdE+zk9/tPh1sNDD3zTxe+2/tMUMMcf+/K3Zq8dvlgvuhfqyfhC3aXP10eQ5+lzxLt1c+7SkHcJv/3sEzWnF1n/r8sqON9hq1L1Jmxk9vGTRF0Bvc+ts7i4JesX34YXr51vYPqY7wFG1zY9YieaKm36xS817VizJm96rSoEPa6Y0+MNUcKNp0D9l//jem4fFf6ontdHFH9Yz+3v6I3xW3qjfkDfGv2173719f+sQc/zLAb/D0EI6cG68deIAAAAAElFTkSuQmCC";class wh{constructor(t,e){f(this,"visible",!1);f(this,"five");f(this,"lines",[]);f(this,"points",[]);f(this,"onClick");f(this,"cancelDelete");f(this,"content",document.createElement("div"));f(this,"container",document.createElement("div"));f(this,"masking",document.createElement("div"));f(this,"onMouseEnter",()=>{this.content.style.backgroundImage=`url(${Iv})`});f(this,"onMouseLeave",()=>{this.content.style.backgroundImage=`url(${Ml})`});var o,s;this.five=t,this.onClick=(e==null?void 0:e.onClick)||(()=>{}),this.cancelDelete=(e==null?void 0:e.cancelDelete)||(()=>{}),this.container.classList.add("fpm__delete"),this.container.style.opacity="0",this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="10px",this.container.style.transform="translate3d(0, 0, 10px)",this.container.style.pointerEvents="none",this.container.style.transition="top 200ms ease, opacity 200ms ease",this.container.style.zIndex="99",this.content.classList.add("fpm__delete-content"),this.content.style.width="62px",this.content.style.height="26px",this.content.style.display="flex",this.content.style.alignItems="center",this.content.style.justifyContent="center",this.content.style.transform="translate(-50%, -50%)",this.content.style.color="#fff",this.content.style.fontSize="12px",this.content.style.lineHeight="17px",this.content.style.borderRadius="11px",this.content.style.backgroundSize="100% 100%",this.content.style.cursor="pointer",this.content.style.userSelect="none",this.content.style.backgroundImage=`url(${Ml})`,this.content.innerHTML=`
298
298
  ${Ev}
299
299
  <span>${(s=(o=e.i18n)==null?void 0:o.call(e,"删除"))!=null?s:"删除"}</span>
300
- `,this.container.append(this.content);const n=this.content.querySelector(".fpm__delete-icon");n&&(n.style.width="16px",n.style.height="17px",n.style.marginRight="1px"),this.content.addEventListener("click",this.onClick),this.content.addEventListener("mouseenter",this.onMouseEnter),this.content.addEventListener("mouseleave",this.onMouseLeave),this.masking.setAttribute("style","position: absolute;top: 0;left: 0;bottom: 0;right: 0;pointer-events: none;"),this.masking.addEventListener("click",this.cancelDelete),this.masking.addEventListener("touchstart",this.cancelDelete)}dispose(){this.content.removeEventListener("click",this.onClick),this.content.removeEventListener("mouseenter",this.onMouseEnter),this.content.removeEventListener("mouseleave",this.onMouseLeave),this.container.remove(),this.masking.removeEventListener("click",this.cancelDelete),this.masking.removeEventListener("touchstart",this.cancelDelete),this.masking.remove()}appendTo(t){return t.append(this.container),t.append(this.masking),this}setLines(t){return this.lines=t,this.points=Array.from(new Set(this.lines.map(e=>[e.points[0],e.points[1]]).flat(1))),this}updatePosition(){if(this.lines.length===0)return this;const t=this.points.map(u=>u.position),e=t.map(u=>u.clone().project(this.five.camera));if(e.some(u=>Math.abs(u.z)>1))return this.hide();const n=e.map(u=>u.x),o=e.map(u=>u.y),s=(Math.min(...n)+Math.max(...n))/2,r=Math.max(...o),a=this.container.parentElement;if(!a)return this;const l=(s+1)/2*a.clientWidth,c=-(r-1)/2*a.clientHeight;let d=l,h=c-34;if(this.lines.length===1&&t.length===2){const u=(o[1]-o[0])/(n[1]-n[0]),v=-((o[1]+o[0])/2-1)/2*a.clientHeight;Math.abs(u)>.4&&(d=l+57,h=v)}return this.container.style.transform=`translate3d(${d}px, ${h}px, 10px)`,this.show()}hide(){return this.visible=!1,this.masking.style.pointerEvents="none",this.container.style.opacity="0",this.container.style.top="10px",this.container.style.pointerEvents="none",this}show(){return this.visible=!0,this.masking.style.pointerEvents="auto",this.container.style.opacity="1",this.container.style.top="0",this.container.style.pointerEvents="auto",this}}function Ph(i,t){const e=i.x-t[0].x,n=i.y-t[0].y,o=t[1].x-t[0].x,s=t[1].y-t[0].y,r=e*o+n*s,a=o*o+s*s,l=r/a;let c,d;return l<0||kv(t[0],t[1])?(c=t[0].x,d=t[0].y):l>1?(c=t[1].x,d=t[1].y):(c=t[0].x+l*o,d=t[0].y+l*s),new R.Vector2(c,d)}function kv(i,t){return i.x===t.x&&i.y===t.y}function xv(i,t){const e=(i.x+1)/2*t.width,n=-(i.y-1)/2*t.height;return new R.Vector2(e,n)}function Dv(i,t,e,n){const o=i.getElement();if(!o||t.length===0)return null;const s={width:o.clientWidth,height:o.clientHeight},r=t.map(a=>{const l=a.position.clone().project(i.camera);return qi(l)?{distance:xv(l,s).distanceTo(e),point:a}:{distance:1/0,point:a}}).sort((a,l)=>a.distance-l.distance);return typeof n=="number"&&r[0].distance>n?null:r[0]}function Fr(i){const t=(s,r,a)=>{const l=s.lines.find(d=>d.points.findIndex(({id:u})=>u===s.id)!==r);if(!l)return a;const c=l.points[r];return c?t(c,r,a.concat(l)):a},e=t(i.points[0],1,[]),n=t(i.points[0],0,[]);return e.concat(n)}class Sl extends ps{constructor(e){super(e);f(this,"type","watch");f(this,"deleteDom");f(this,"highlightedLines",[]);f(this,"fiveElement");f(this,"editPointState");f(this,"hammer");f(this,"onPanStart",e=>{var a;if(this.model.getAllLines().length===0||!this.fiveElement)return;const n=Gr(e).point,o=(a=Dv(this.five,this.model.getAllPoints(),n,20))==null?void 0:a.point;if(!o){this.editPointState=void 0;return}const s={point:o,associatedLines:Fr(o.lines[0])};this.hook.emit("wantsDragLine",{point:o.id,lines:s.associatedLines.map(({id:l})=>l)})||(this.editPointState=s,this.magnifier.appendTo(this.container),this.magnifier.enable(),this.group.add(this.mouseGroup))});f(this,"onPanEnd",()=>{this.editPointState&&(this.editPointState.point.lines.forEach(e=>e.mesh.setMaterial({dashed:!1})),this.highlightLines(this.editPointState.associatedLines),this.editPointState=void 0,this.magnifier.disable(),this.group.remove(this.mouseGroup))});f(this,"onPan",e=>{if(!this.editPointState||!this.fiveElement)return;const n=Gr(e).ndcPoint,o=new R.Raycaster;o.setFromCamera(n,this.five.camera);const[s]=this.five.model.intersectRaycaster(o);s&&this.onIntersectionUpdate(s)});f(this,"onIntersectionUpdate",(e,n)=>{if(this.editPointState){if(this.clearHighlightLines(),this.editPointState.point.position.copy(e.point),this.editPointState.point.lines.forEach(o=>{o.mesh.setPoints(o.points[0].position.clone(),o.points[1].position.clone()),o.lightMesh.setPoints(o.points[0].position.clone(),o.points[1].position.clone()),o.mesh.setMaterial({dashed:!0})}),this.updateDistanceUI(),this.magnifier.renderWithPoint(e.point),this.mouseGroup.position.copy(e.point),n)this.mouseGroup.quaternion.copy(n.quaternion);else if(e.face){const s=e.face.normal.clone().multiplyScalar(.05),a=e.point.clone().add(s).clone().add(s);this.mouseGroup.lookAt(a)}this.five.needsRender=!0,this.hook.emit("selectedChange",this.editPointState.associatedLines.map(o=>o))}});f(this,"wantsPanGesture",()=>{if(this.editPointState)return!1});f(this,"wantsTapGesture",e=>{const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new R.Vector2(s.x*r,s.y*a),c=this.model.getAllLines().map(m=>{const[v,g]=m.points,A=v.position.clone().project(o),b=g.position.clone().project(o);if(!qi(A)&&!qi(b))return null;const y=new R.Vector2(A.x*r,A.y*a),E=new R.Vector2(b.x*r,b.y*a);return{id:m.id,points:[y,E]}}).filter(m=>!!m);if(c.length===0)return;const h=c.map(m=>{const v=Ph(l,m.points);return{id:m.id,distance:v.distanceTo(l)}}).sort((m,v)=>m.distance-v.distance)[0];if(h.distance>20)return;const u=this.model.getAllLines().find(({id:m})=>m===h.id);if(u)return this.chooseLine(u),!1});f(this,"chooseLine",e=>{const n=Fr(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o))});f(this,"polylineRemoved",e=>{e.lines.forEach(n=>this.removeLine(n)),this.hook.emit("selectedChange",this.model.getAllLines().filter(n=>n.selected).map(n=>n))});f(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.highlightedLines.length>0&&this.deleteDom.updatePosition()});f(this,"deleteDomClickCallback",()=>{const e=this.highlightedLines[0],n=this.model.getPolylineByLine(e);n&&(this.model.removePolyline(n),this.highlightedLines=[],this.deleteDom.setLines([]).hide())});f(this,"cancelDeleteClickCallback",()=>{this.clearHighlightLines()});this.deleteDom=new wh(this.five,{i18n:this.config.i18n,onClick:this.deleteDomClickCallback,cancelDelete:this.cancelDeleteClickCallback}).appendTo(this.container),this.model.getAllLines().forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),o.distanceItem.setItemSelectable(!0),this.group.add(o.mesh)});const n=this.five.getElement();if(n){this.fiveElement=n;const o=new Ki(n);this.hammer=o,o.on("pan",this.onPan),o.on("panstart",this.onPanStart),o.on("panend",this.onPanEnd)}this.updateDistanceUI(),this.five.needsRender=!0,this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.wantsTapGesture),this.five.on("wantsPanGesture",this.wantsPanGesture),this.model.hook.on("polylineRemoved",this.polylineRemoved)}dispose(){var e;super.dispose(),this.deleteDom.dispose(),this.model.hook.off("polylineRemoved",this.polylineRemoved),this.model.getAllLines().forEach(n=>n.hook.off("selected",this.chooseLine)),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.wantsPanGesture),this.five.off("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.deleteDom.setLines([]).hide(),this.model.getAllLines().forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,this.deleteDom.setLines(e).updatePosition().show(),e.forEach(n=>this.highlightLine(n))}}function Mv(){}const{Vector2:Sv}=I;function Lv(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new Sv,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}const Tv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIA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ebJ0hliTufKGnJJSNzc0gcU82/eUh62iVNCRqP6ZUISCzjKAfq7tNev6Kd0mKzsBZJrlgQ+hXvQG1OwGi8hc4moxDrMRF/cjo8iDrLYc7brjRjegq/jHvTEJKzAtgtqrx1YhvHojrvxDbwNBepxLfaczaqA2lBrSUtqLmlKTahYe/1FVAaRS0KGymk6kTvzO0KH/9NuHZsAEAJAEFy+/0pfY2O7EMGZq2Hhmo3+Vq9yI83sCzjhythAbIDYQGyA2EBsIDZAbCA2QGwgNhAbIDYQGyA2EBuIDRAbiA0QG4gNxAaIDcQGiA3EBmIDxAZiA8QGYgOxAWIDsQEb7ePiGN5/UYAAAAAASUVORK5CYII=",jv=`
300
+ `,this.container.append(this.content);const n=this.content.querySelector(".fpm__delete-icon");n&&(n.style.width="16px",n.style.height="17px",n.style.marginRight="1px"),this.content.addEventListener("click",this.onClick),this.content.addEventListener("mouseenter",this.onMouseEnter),this.content.addEventListener("mouseleave",this.onMouseLeave),this.masking.setAttribute("style","position: absolute;top: 0;left: 0;bottom: 0;right: 0;pointer-events: none;"),this.masking.addEventListener("click",this.cancelDelete),this.masking.addEventListener("touchstart",this.cancelDelete)}dispose(){this.content.removeEventListener("click",this.onClick),this.content.removeEventListener("mouseenter",this.onMouseEnter),this.content.removeEventListener("mouseleave",this.onMouseLeave),this.container.remove(),this.masking.removeEventListener("click",this.cancelDelete),this.masking.removeEventListener("touchstart",this.cancelDelete),this.masking.remove()}appendTo(t){return t.append(this.container),t.append(this.masking),this}setLines(t){return this.lines=t,this.points=Array.from(new Set(this.lines.map(e=>[e.points[0],e.points[1]]).flat(1))),this}updatePosition(){if(this.lines.length===0)return this;const t=this.points.map(u=>u.position),e=t.map(u=>u.clone().project(this.five.camera));if(e.some(u=>Math.abs(u.z)>1))return this.hide();const n=e.map(u=>u.x),o=e.map(u=>u.y),s=(Math.min(...n)+Math.max(...n))/2,r=Math.max(...o),a=this.container.parentElement;if(!a)return this;const l=(s+1)/2*a.clientWidth,c=-(r-1)/2*a.clientHeight;let d=l,h=c-34;if(this.lines.length===1&&t.length===2){const u=(o[1]-o[0])/(n[1]-n[0]),v=-((o[1]+o[0])/2-1)/2*a.clientHeight;Math.abs(u)>.4&&(d=l+57,h=v)}return this.container.style.transform=`translate3d(${d}px, ${h}px, 10px)`,this.show()}hide(){return this.visible=!1,this.masking.style.pointerEvents="none",this.container.style.opacity="0",this.container.style.top="10px",this.container.style.pointerEvents="none",this}show(){return this.visible=!0,this.masking.style.pointerEvents="auto",this.container.style.opacity="1",this.container.style.top="0",this.container.style.pointerEvents="auto",this}}function Ph(i,t){const e=i.x-t[0].x,n=i.y-t[0].y,o=t[1].x-t[0].x,s=t[1].y-t[0].y,r=e*o+n*s,a=o*o+s*s,l=r/a;let c,d;return l<0||kv(t[0],t[1])?(c=t[0].x,d=t[0].y):l>1?(c=t[1].x,d=t[1].y):(c=t[0].x+l*o,d=t[0].y+l*s),new R.Vector2(c,d)}function kv(i,t){return i.x===t.x&&i.y===t.y}function xv(i,t){const e=(i.x+1)/2*t.width,n=-(i.y-1)/2*t.height;return new R.Vector2(e,n)}function Dv(i,t,e,n){const o=i.getElement();if(!o||t.length===0)return null;const s={width:o.clientWidth,height:o.clientHeight},r=t.map(a=>{const l=a.position.clone().project(i.camera);return qi(l)?{distance:xv(l,s).distanceTo(e),point:a}:{distance:1/0,point:a}}).sort((a,l)=>a.distance-l.distance);return typeof n=="number"&&r[0].distance>n?null:r[0]}function Fr(i){const t=(s,r,a)=>{const l=s.lines.find(d=>d.points.findIndex(({id:u})=>u===s.id)!==r);if(!l)return a;const c=l.points[r];return c?t(c,r,a.concat(l)):a},e=t(i.points[0],1,[]),n=t(i.points[0],0,[]);return e.concat(n)}class Sl extends ps{constructor(e){super(e);f(this,"type","watch");f(this,"deleteDom");f(this,"highlightedLines",[]);f(this,"fiveElement");f(this,"editPointState");f(this,"hammer");f(this,"onPanStart",e=>{var a;if(this.model.getAllLines().length===0||!this.fiveElement)return;const n=Gr(e).point,o=(a=Dv(this.five,this.model.getAllPoints(),n,20))==null?void 0:a.point;if(!o){this.editPointState=void 0;return}const s={point:o,associatedLines:Fr(o.lines[0])};this.hook.emit("wantsDragLine",{point:o.id,lines:s.associatedLines.map(({id:l})=>l)})||(this.editPointState=s,this.magnifier.appendTo(this.container),this.magnifier.enable(),this.group.add(this.mouseGroup))});f(this,"onPanEnd",()=>{this.editPointState&&(this.editPointState.point.lines.forEach(e=>e.mesh.setMaterial({dashed:!1})),this.highlightLines(this.editPointState.associatedLines),this.editPointState=void 0,this.magnifier.disable(),this.group.remove(this.mouseGroup))});f(this,"onPan",e=>{if(!this.editPointState||!this.fiveElement)return;const n=Gr(e).ndcPoint,o=new R.Raycaster;o.setFromCamera(n,this.five.camera);const[s]=this.five.model.intersectRaycaster(o);s&&this.onIntersectionUpdate(s)});f(this,"onIntersectionUpdate",(e,n)=>{if(this.editPointState){if(this.clearHighlightLines(),this.editPointState.point.position.copy(e.point),this.editPointState.point.lines.forEach(o=>{o.mesh.setPoints(o.points[0].position.clone(),o.points[1].position.clone()),o.lightMesh.setPoints(o.points[0].position.clone(),o.points[1].position.clone()),o.mesh.setMaterial({dashed:!0})}),this.updateDistanceUI(),this.magnifier.renderWithPoint(e.point),this.mouseGroup.position.copy(e.point),n)this.mouseGroup.quaternion.copy(n.quaternion);else if(e.face){const s=e.face.normal.clone().multiplyScalar(.05),a=e.point.clone().add(s).clone().add(s);this.mouseGroup.lookAt(a)}this.five.needsRender=!0,this.hook.emit("selectedChange",this.editPointState.associatedLines.map(o=>o))}});f(this,"wantsPanGesture",()=>{if(this.editPointState)return!1});f(this,"wantsTapGesture",e=>{const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new R.Vector2(s.x*r,s.y*a),c=this.model.getAllLines().map(m=>{const[v,g]=m.points,A=v.position.clone().project(o),b=g.position.clone().project(o);if(!qi(A)&&!qi(b))return null;const y=new R.Vector2(A.x*r,A.y*a),E=new R.Vector2(b.x*r,b.y*a);return{id:m.id,points:[y,E]}}).filter(m=>!!m);if(c.length===0)return;const h=c.map(m=>{const v=Ph(l,m.points);return{id:m.id,distance:v.distanceTo(l)}}).sort((m,v)=>m.distance-v.distance)[0];if(h.distance>20)return;const u=this.model.getAllLines().find(({id:m})=>m===h.id);if(u)return this.chooseLine(u),!1});f(this,"chooseLine",e=>{const n=Fr(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o))});f(this,"polylineRemoved",e=>{e.lines.forEach(n=>this.removeLine(n)),this.hook.emit("selectedChange",this.model.getAllLines().filter(n=>n.selected).map(n=>n))});f(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.highlightedLines.length>0&&this.deleteDom.updatePosition()});f(this,"deleteDomClickCallback",()=>{const e=this.highlightedLines[0],n=this.model.getPolylineByLine(e);n&&(this.model.removePolyline(n),this.highlightedLines=[],this.deleteDom.setLines([]).hide())});f(this,"cancelDeleteClickCallback",()=>{this.clearHighlightLines()});this.deleteDom=new wh(this.five,{i18n:this.config.i18n,onClick:this.deleteDomClickCallback,cancelDelete:this.cancelDeleteClickCallback}).appendTo(this.container),this.model.getAllLines().forEach(o=>{o.distanceItem.appendTo(this.container),o.distanceItem.update(this.five),o.hook.on("selected",this.chooseLine),o.distanceItem.setItemSelectable(!0),this.group.add(o.mesh)});const n=this.five.getElement();if(n){this.fiveElement=n;const o=new Ki(n);this.hammer=o,o.on("pan",this.onPan),o.on("panstart",this.onPanStart),o.on("panend",this.onPanEnd)}this.updateDistanceUI(),this.five.needsRender=!0,this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.wantsTapGesture),this.five.on("wantsPanGesture",this.wantsPanGesture),this.model.hook.on("polylineRemoved",this.polylineRemoved)}dispose(){var e;super.dispose(),this.deleteDom.dispose(),this.model.hook.off("polylineRemoved",this.polylineRemoved),this.model.getAllLines().forEach(n=>n.hook.off("selected",this.chooseLine)),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsPanGesture",this.wantsPanGesture),this.five.off("wantsTapGesture",this.wantsTapGesture),this.five.needsRender=!0,this.hook.emit("selectedChange",[]),(e=this.hammer)==null||e.destroy()}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.deleteDom.setLines([]).hide(),this.model.getAllLines().forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,this.deleteDom.setLines(e).updatePosition().show(),e.forEach(n=>this.highlightLine(n))}}function Mv(){}const{Vector2:Sv}=I;function Lv(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new Sv,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}const Tv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAGwCAYAAADFUEBtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABtqADAAQAAAABAAABsAAAAABTZ8U6AAAtiklEQVR4Ae2dAXJbSbJdp+d7AfYSHOGVeAPek5fkNXgLjviLmRkZl+CRbtc8UBKRRalZpyIesiorMx/eIcjb+QCh//Y3hwQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlI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IbCChsG6Ba8lgCCBtCxjrdWt+GZH4sKC9cAjsJKGw76Vr7NAIRMkQrc8bVvH3EaSUggQECCtsAREtI4JVAC1u/p7YCemtvjXUtAQn8JAGF7SeBGS6BNwjkW0f+/rof8boaVx3dVZw+CUjgnQQUtneCM00CFwS6Y7vY/uqyY/uKwokE5gkobPNMrXguAd43i23x6u5t3TuXllcugU0EFLZNYC17JIGIVosbEPD1evWxp5WABJ4koLA9CdB0CRQBhI1u7apTq3CnEpDADgIK2w6q1jyVQH8wJKLGunnYqTUN5xLYQEBh2wDVkscSaNF6mf/xxx9fbuNm7vZYMl64BCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQlIQAISkIAEJCABCUhAAhKQgAQkIAEJSEACEpCABCQgAQn8NQn8fyHnyuSABiy2AAAAAElFTkSuQmCC",zv="data:image/png;base64,iVBORw0KGgoAAAANSUhE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kTvzO0KH/9NuHZsAEAJAEFy+/0pfY2O7EMGZq2Hhmo3+Vq9yI83sCzjhythAbIDYQGyA2EBsIDZAbCA2QGwgNhAbIDYQGyA2EBuIDRAbiA0QG4gNxAaIDcQGiA3EBmIDxAZiA8QGYgOxAWIDsQEb7ePiGN5/UYAAAAAASUVORK5CYII=",_v=`
301
301
  varying vec2 vUv;
302
302
  void main() {
303
303
  vUv = uv;
304
304
  vec4 mvPosition = modelViewMatrix * vec4(position, 1);
305
305
  gl_Position = projectionMatrix * mvPosition;
306
306
  }
307
- `,_v=`
307
+ `,Vv=`
308
308
  varying vec2 vUv;
309
309
  void main() {
310
310
  vec2 uv = vec2(vUv.x, vUv.y);
@@ -312,7 +312,7 @@ void main() {
312
312
  float match = 1.0 - uv.x;
313
313
  gl_FragColor = vec4(1.0,1.0,1.0,match);
314
314
  }
315
- `;function Ch(i){var b,y;const t=(b=i.isMobile)!=null?b:!0,e=(y=i.useNormalVector)!=null?y:!0;let n=10349931;e&&i.ballColor>=0&&(n=i.ballColor);const o=new R.Group,s=new R.PlaneGeometry(.3,.3),r=t?Tv:zv,a=new R.TextureLoader().load(r);a.encoding=R.sRGBEncoding,a.minFilter=R.LinearFilter;const l=new R.MeshBasicMaterial({map:a,transparent:!0,depthTest:!1}),c=new R.Mesh(s,l),d=new R.CurvePath;d.add(new R.LineCurve3(new R.Vector3(0,0,0),new R.Vector3(0,0,.1)));const h=new R.TubeGeometry(d,8,.003),u=new R.ShaderMaterial({vertexShader:jv,fragmentShader:_v,depthTest:!1,transparent:!0}),m=new R.Mesh(h,u),v=new R.SphereGeometry(.01,20,20),g=new R.MeshBasicMaterial({color:n,depthTest:!1,transparent:!0,side:R.DoubleSide}),A=new R.Mesh(v,g);return A.position.set(0,0,.1),o.name="mouse-current",o.add(c),e&&o.add(m,A),o}class Vv{constructor(t){f(this,"container",document.createElement("div"));f(this,"five");f(this,"group");f(this,"mouseGroup");f(this,"hasAppendMouseGroup",!1);f(this,"fiveHelper");f(this,"hook");f(this,"content");f(this,"intersectMesh");f(this,"centerMouseXY");f(this,"raycaster",new R.Raycaster);f(this,"pieceStyl",{matrix3d:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],scale:1,opacity:.4});f(this,"onCameraDirectionUpdate",()=>{const t=this.getIntersection();if(t){this.pieceChange(t),this.updateMouseGroup(t);const e=new Dt(this.mouseGroup.position);this.hook.emit("nowPointChange",e)}});f(this,"onWillChangeState",(t,e)=>{var o;this.dotAnimation();const n=(o=this.getIntersection())==null?void 0:o.point;n&&(e==="editing"?this.hook.emit("getStartPoint",new Dt(n)):this.hook.emit("getEndPoint",new Dt(n)))});f(this,"computedCenterMouseXY",()=>{const t=this.container.querySelector(".range-piece__aim");if(!t)return null;const{left:e,top:n,width:o,height:s}=t.getBoundingClientRect(),r=Math.round(e+o/2),a=Math.round(n+s/2),c=Lv({x:r,y:a},this.five.getElement());this.centerMouseXY=c});f(this,"getIntersection",()=>{if(!this.centerMouseXY)return null;this.raycaster.setFromCamera(this.centerMouseXY,this.five.camera);const t=this.five.model.intersectRaycaster(this.raycaster)[0];return t||null});this.five=t.five,this.hook=t.hook,this.group=t.group,this.mouseGroup=Ch(F({isMobile:!0},t.openParams.crossHairParameter)),this.fiveHelper=t.fiveHelper,this.container.innerHTML=Af,this.container.classList.add("range-piece-controller"),this.content=this.container.querySelector(".range-piece__content"),this.content&&(this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`),t.container.append(this.container),this.intersectMesh=new R.Mesh(new R.RingGeometry(.04,.08,32),new R.MeshBasicMaterial({color:1245179,opacity:0,side:R.DoubleSide,transparent:!0})),this.container.addEventListener("animationend",this.computedCenterMouseXY),this.five.on("cameraUpdate",this.onCameraDirectionUpdate),this.hook.on("willChangeState",this.onWillChangeState)}dispose(){this.container.removeEventListener("animationend",this.computedCenterMouseXY),this.five.off("cameraUpdate",this.onCameraDirectionUpdate),this.hook.off("willChangeState",this.onWillChangeState),this.container.remove(),this.group.remove(this.mouseGroup),this.mouseGroup.remove(),this.hasAppendMouseGroup=!1,this.five.scene.remove(this.intersectMesh)}pieceChange(t){const e=t.face,n=t.point;if(e&&n){const s=e.normal.clone().clone().multiplyScalar(.05),r=n.clone().add(s);this.intersectMesh.position.copy(r);const a=r.clone().add(s);this.intersectMesh.lookAt(a),this.five.scene.add(this.intersectMesh);const l=this.intersectMesh.modelViewMatrix.clone().toArray();this.changePieceStyl("matrix3d",l);const c=this.calculateSize(n);this.changePieceStyl("scale",c)}}calculateSize(t){if(!t)return;const e=this.five.camera.position;let n=t.distanceTo(e);const o=4,s=1;return n>o&&(n=o),n<s&&(n=s),-.51/(o-s)*n+1}dotAnimation(){const t=za.Easing.Quadratic.InOut,e={opacity:.4,scale:this.pieceStyl.scale},n={opacity:[1,.4],scale:[this.pieceStyl.scale*.8,this.pieceStyl.scale]};let o=Mv;const s=new za.Tween(e).to(n,500).easing(t).start(0).onUpdate(({opacity:r,scale:a})=>{this.changePieceStyl("scale",a),this.changePieceStyl("opacity",r)}).onComplete(()=>{o()});o=$i(r=>{s.update(r)})}changePieceStyl(t,e){this.content&&(this.pieceStyl[t]=e,this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`)}updateMouseGroup(t,e){if(!this.hasAppendMouseGroup){this.group.add(this.mouseGroup),this.hasAppendMouseGroup=!0;const n=this.container.querySelector(".range-piece__aim");n&&(n.style.opacity="0")}if(!t)return this.mouseGroup;if(this.mouseGroup.position.copy(t.point),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const o=t.face.normal.clone().multiplyScalar(.05),r=t.point.clone().add(o).clone().add(o);this.mouseGroup.lookAt(r)}return this.mouseGroup}}class ji extends ps{constructor(e){super(e);f(this,"state","watching");f(this,"polyline");f(this,"hasAppendDashed",!1);f(this,"mobileStartPoint",null);f(this,"mobileNowPoint",null);f(this,"highlightedLines",[]);f(this,"deleteDom");f(this,"rangePieceController");f(this,"disposers",[]);f(this,"onWantsTapGesture",e=>{if(this.state==="editing")return!1;const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new R.Vector2(s.x*r,s.y*a),c=this.model.getAllLines().map(m=>{const[v,g]=m.points,A=v.position.clone().project(o),b=g.position.clone().project(o);if(!qi(A)&&!qi(b))return null;const y=new R.Vector2(A.x*r,A.y*a),E=new R.Vector2(b.x*r,b.y*a);return{id:m.id,points:[y,E]}}).filter(m=>!!m);if(c.length===0)return;const h=c.map(m=>{const v=Ph(l,m.points);return{id:m.id,distance:v.distanceTo(l)}}).sort((m,v)=>m.distance-v.distance)[0];if(h.distance>20)return;const u=this.model.getAllLines().find(({id:m})=>m===h.id);if(u)return this.chooseLine(u),!1});f(this,"onWantsToMoveToPano",()=>this.state==="watching");f(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});f(this,"updateMobileDashed",()=>{!this.mobileStartPoint||!this.mobileNowPoint||(this.dashed.points[0].position.copy(this.mobileStartPoint.position),this.dashed.points[1].position.copy(this.mobileNowPoint.position),this.dashed.mesh.setPoints(this.mobileStartPoint.position,this.mobileNowPoint.position),this.dashed.distanceItem.update(this.five),this.hook.emit("editedDashedLineChange",this.dashed))});f(this,"updateMagnifier",e=>{this.magnifier.containerDom!==this.container&&this.magnifier.appendTo(this.container),this.magnifier.getCurrentState().enabled||this.magnifier.enable(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(e.position)),this.five.needsRender=!0});f(this,"onGetStartPoint",e=>{this.mobileStartPoint=e,this.polyline=new Ji({model:this.model}),this.polyline.hook.on("lineAdded",()=>this.hook.emit("editedPolylineChange",this.polyline)),this.polyline.hook.on("lineRemoved",()=>this.hook.emit("editedPolylineChange",this.polyline))});f(this,"onGetEndPoint",()=>{const e=this.mobileNowPoint;if(this.removeLine(this.dashed),this.hasAppendDashed=!1,this.mobileStartPoint&&e){const n=new Sn(this.mobileStartPoint,e,this.model);this.polyline.addLine(n),n.distanceItem.appendTo(this.container),n.distanceItem.update(this.five),n.hook.on("selected",this.chooseLine),this.disposers.push(()=>n.hook.off("selected",this.chooseLine)),this.group.add(n.mesh),this.model.addPolyline(this.polyline)}this.mobileStartPoint=null,this.mobileNowPoint=null,this.five.needsRender=!0});f(this,"onNowPointChange",e=>{if(this.state==="watching"){this.mobileNowPoint=e,this.updateMagnifier(e);return}this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh),this.hasAppendDashed=!0),this.five.needsRender=!0,this.mobileNowPoint=e,this.updateMobileDashed(),this.updateMagnifier(e),this.five.needsRender=!0});f(this,"onWillChangeState",(e,n)=>{this.state=n,this.state==="watching"?this.five.helperVisible=!0:this.five.helperVisible=!1});f(this,"chooseLine",e=>{const n=Fr(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o))});f(this,"deleteDomClickCallback",()=>{this.highlightedLines.forEach(e=>{this.removeLine(e);const n=this.model.getPolylineByLine(e);this.model.removePolyline(n)}),this.highlightedLines=[],this.deleteDom.setLines([]).hide()});f(this,"cancelDeleteClickCallback",()=>{this.clearHighlightLines()});this.model=new ms(this.config),this.polyline=new Ji({model:this.model}),this.rangePieceController=new Vv(e),this.deleteDom=new wh(this.five,{i18n:this.config.i18n,onClick:this.deleteDomClickCallback,cancelDelete:this.cancelDeleteClickCallback}).appendTo(this.container),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.helperVisible=!1,this.hook.emit("editedDashedLineChange",null),this.hook.on("getStartPoint",this.onGetStartPoint),this.hook.on("getEndPoint",this.onGetEndPoint),this.hook.on("nowPointChange",this.onNowPointChange),this.hook.on("willChangeState",this.onWillChangeState),this.five.refresh()}dispose(){super.dispose(),this.disposers.forEach(e=>e()),this.five.helperVisible=!0,this.rangePieceController.dispose(),this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.hook.off("getStartPoint",this.onGetStartPoint),this.hook.off("getEndPoint",this.onGetEndPoint),this.hook.off("nowPointChange",this.onNowPointChange),this.hook.off("willChangeState",this.onWillChangeState),this.hook.emit("selectedChange",[]),this.dashed.distanceItem.remove(),this.five.needsRender=!0}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.deleteDom.setLines([]).hide(),this.model.getAllLines().forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}getEditingLines(){return this.model.polylines}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,this.deleteDom.setLines(e).updatePosition().show(),e.forEach(n=>this.highlightLine(n))}}const Eh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxmaWx0ZXIgeD0iLTUuMyUiIHk9Ii01LjMlIiB3aWR0aD0iMTEwLjUlIiBoZWlnaHQ9IjExMC41JSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0icHJlZml4X19hIj48ZmVPZmZzZXQgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09mZnNldE91dGVyMSIvPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjEiIGluPSJzaGFkb3dPZmZzZXRPdXR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wYWNpdHk9Ii43IiBjeD0iMzYiIGN5PSIzNiIgcj0iMjguMjQ0Ii8+PGVsbGlwc2UgZmlsbD0iIzdDOTBEQSIgb3BhY2l0eT0iLjU5NiIgZmlsdGVyPSJ1cmwoI3ByZWZpeF9fYykiIGN4PSIzNiIgY3k9IjM2IiByeD0iMTguOTYzIiByeT0iNy4xMTEiLz48cGF0aCBkPSJNMzYgMEMxNi4xMTggMCAwIDE2LjExOCAwIDM2czE2LjExOCAzNiAzNiAzNiAzNi0xNi4xMTggMzYtMzZTNTUuODgyIDAgMzYgMHptMCA0LjQ0NGMxNy40MjggMCAzMS41NTYgMTQuMTI4IDMxLjU1NiAzMS41NTZTNTMuNDI4IDY3LjU1NiAzNiA2Ny41NTYgNC40NDQgNTMuNDI4IDQuNDQ0IDM2IDE4LjU3MiA0LjQ0NCAzNiA0LjQ0NHoiIGZpbGw9InVybCgjcHJlZml4X19kKSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9nPjwvc3ZnPg==",Ov=`
315
+ `;function Ch(i){var b,y;const t=(b=i.isMobile)!=null?b:!0,e=(y=i.useNormalVector)!=null?y:!0;let n=10349931;e&&i.ballColor>=0&&(n=i.ballColor);const o=new R.Group,s=new R.PlaneGeometry(.3,.3),r=t?Tv:zv,a=new R.TextureLoader().load(r);a.encoding=R.sRGBEncoding,a.minFilter=R.LinearFilter;const l=new R.MeshBasicMaterial({map:a,transparent:!0,depthTest:!1}),c=new R.Mesh(s,l),d=new R.CurvePath;d.add(new R.LineCurve3(new R.Vector3(0,0,0),new R.Vector3(0,0,.1)));const h=new R.TubeGeometry(d,8,.003),u=new R.ShaderMaterial({vertexShader:_v,fragmentShader:Vv,depthTest:!1,transparent:!0}),m=new R.Mesh(h,u),v=new R.SphereGeometry(.01,20,20),g=new R.MeshBasicMaterial({color:n,depthTest:!1,transparent:!0,side:R.DoubleSide}),A=new R.Mesh(v,g);return A.position.set(0,0,.1),o.name="mouse-current",o.add(c),e&&o.add(m,A),o}class jv{constructor(t){f(this,"container",document.createElement("div"));f(this,"five");f(this,"group");f(this,"mouseGroup");f(this,"hasAppendMouseGroup",!1);f(this,"fiveHelper");f(this,"hook");f(this,"content");f(this,"intersectMesh");f(this,"centerMouseXY");f(this,"raycaster",new R.Raycaster);f(this,"pieceStyl",{matrix3d:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],scale:1,opacity:.4});f(this,"onCameraDirectionUpdate",()=>{const t=this.getIntersection();if(t){this.pieceChange(t),this.updateMouseGroup(t);const e=new Dt(this.mouseGroup.position);this.hook.emit("nowPointChange",e)}});f(this,"onWillChangeState",(t,e)=>{var o;this.dotAnimation();const n=(o=this.getIntersection())==null?void 0:o.point;n&&(e==="editing"?this.hook.emit("getStartPoint",new Dt(n)):this.hook.emit("getEndPoint",new Dt(n)))});f(this,"computedCenterMouseXY",()=>{const t=this.container.querySelector(".range-piece__aim");if(!t)return null;const{left:e,top:n,width:o,height:s}=t.getBoundingClientRect(),r=Math.round(e+o/2),a=Math.round(n+s/2),c=Lv({x:r,y:a},this.five.getElement());this.centerMouseXY=c});f(this,"getIntersection",()=>{if(!this.centerMouseXY)return null;this.raycaster.setFromCamera(this.centerMouseXY,this.five.camera);const t=this.five.model.intersectRaycaster(this.raycaster)[0];return t||null});this.five=t.five,this.hook=t.hook,this.group=t.group,this.mouseGroup=Ch(F({isMobile:!0},t.openParams.crossHairParameter)),this.fiveHelper=t.fiveHelper,this.container.innerHTML=Af,this.container.classList.add("range-piece-controller"),this.content=this.container.querySelector(".range-piece__content"),this.content&&(this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`),t.container.append(this.container),this.intersectMesh=new R.Mesh(new R.RingGeometry(.04,.08,32),new R.MeshBasicMaterial({color:1245179,opacity:0,side:R.DoubleSide,transparent:!0})),this.container.addEventListener("animationend",this.computedCenterMouseXY),this.five.on("cameraUpdate",this.onCameraDirectionUpdate),this.hook.on("willChangeState",this.onWillChangeState)}dispose(){this.container.removeEventListener("animationend",this.computedCenterMouseXY),this.five.off("cameraUpdate",this.onCameraDirectionUpdate),this.hook.off("willChangeState",this.onWillChangeState),this.container.remove(),this.group.remove(this.mouseGroup),this.mouseGroup.remove(),this.hasAppendMouseGroup=!1,this.five.scene.remove(this.intersectMesh)}pieceChange(t){const e=t.face,n=t.point;if(e&&n){const s=e.normal.clone().clone().multiplyScalar(.05),r=n.clone().add(s);this.intersectMesh.position.copy(r);const a=r.clone().add(s);this.intersectMesh.lookAt(a),this.five.scene.add(this.intersectMesh);const l=this.intersectMesh.modelViewMatrix.clone().toArray();this.changePieceStyl("matrix3d",l);const c=this.calculateSize(n);this.changePieceStyl("scale",c)}}calculateSize(t){if(!t)return;const e=this.five.camera.position;let n=t.distanceTo(e);const o=4,s=1;return n>o&&(n=o),n<s&&(n=s),-.51/(o-s)*n+1}dotAnimation(){const t=za.Easing.Quadratic.InOut,e={opacity:.4,scale:this.pieceStyl.scale},n={opacity:[1,.4],scale:[this.pieceStyl.scale*.8,this.pieceStyl.scale]};let o=Mv;const s=new za.Tween(e).to(n,500).easing(t).start(0).onUpdate(({opacity:r,scale:a})=>{this.changePieceStyl("scale",a),this.changePieceStyl("opacity",r)}).onComplete(()=>{o()});o=$i(r=>{s.update(r)})}changePieceStyl(t,e){this.content&&(this.pieceStyl[t]=e,this.content.style.transform=`matrix3d(${this.pieceStyl.matrix3d.toString()}) scale(${this.pieceStyl.scale})`,this.content.style.opacity=`${this.pieceStyl.opacity}`)}updateMouseGroup(t,e){if(!this.hasAppendMouseGroup){this.group.add(this.mouseGroup),this.hasAppendMouseGroup=!0;const n=this.container.querySelector(".range-piece__aim");n&&(n.style.opacity="0")}if(!t)return this.mouseGroup;if(this.mouseGroup.position.copy(t.point),e)this.mouseGroup.quaternion.copy(e.quaternion);else if(t.face){const o=t.face.normal.clone().multiplyScalar(.05),r=t.point.clone().add(o).clone().add(o);this.mouseGroup.lookAt(r)}return this.mouseGroup}}class _i extends ps{constructor(e){super(e);f(this,"state","watching");f(this,"polyline");f(this,"hasAppendDashed",!1);f(this,"mobileStartPoint",null);f(this,"mobileNowPoint",null);f(this,"highlightedLines",[]);f(this,"deleteDom");f(this,"rangePieceController");f(this,"disposers",[]);f(this,"onWantsTapGesture",e=>{if(this.state==="editing")return!1;const[n]=this.five.model.intersectRaycaster(e);if(!n)return;const o=this.five.camera,s=n.point.clone().project(o),r=this.container.clientWidth,a=this.container.clientHeight,l=new R.Vector2(s.x*r,s.y*a),c=this.model.getAllLines().map(m=>{const[v,g]=m.points,A=v.position.clone().project(o),b=g.position.clone().project(o);if(!qi(A)&&!qi(b))return null;const y=new R.Vector2(A.x*r,A.y*a),E=new R.Vector2(b.x*r,b.y*a);return{id:m.id,points:[y,E]}}).filter(m=>!!m);if(c.length===0)return;const h=c.map(m=>{const v=Ph(l,m.points);return{id:m.id,distance:v.distanceTo(l)}}).sort((m,v)=>m.distance-v.distance)[0];if(h.distance>20)return;const u=this.model.getAllLines().find(({id:m})=>m===h.id);if(u)return this.chooseLine(u),!1});f(this,"onWantsToMoveToPano",()=>this.state==="watching");f(this,"onCameraUpdate",()=>{this.updateDistanceUI(),this.dashed.distanceItem.update(this.five)});f(this,"updateMobileDashed",()=>{!this.mobileStartPoint||!this.mobileNowPoint||(this.dashed.points[0].position.copy(this.mobileStartPoint.position),this.dashed.points[1].position.copy(this.mobileNowPoint.position),this.dashed.mesh.setPoints(this.mobileStartPoint.position,this.mobileNowPoint.position),this.dashed.distanceItem.update(this.five),this.hook.emit("editedDashedLineChange",this.dashed))});f(this,"updateMagnifier",e=>{this.magnifier.containerDom!==this.container&&this.magnifier.appendTo(this.container),this.magnifier.getCurrentState().enabled||this.magnifier.enable(),requestAnimationFrame(()=>this.magnifier.renderWithPoint(e.position)),this.five.needsRender=!0});f(this,"onGetStartPoint",e=>{this.mobileStartPoint=e,this.polyline=new Ji({model:this.model}),this.polyline.hook.on("lineAdded",()=>this.hook.emit("editedPolylineChange",this.polyline)),this.polyline.hook.on("lineRemoved",()=>this.hook.emit("editedPolylineChange",this.polyline))});f(this,"onGetEndPoint",()=>{const e=this.mobileNowPoint;if(this.removeLine(this.dashed),this.hasAppendDashed=!1,this.mobileStartPoint&&e){const n=new Sn(this.mobileStartPoint,e,this.model);this.polyline.addLine(n),n.distanceItem.appendTo(this.container),n.distanceItem.update(this.five),n.hook.on("selected",this.chooseLine),this.disposers.push(()=>n.hook.off("selected",this.chooseLine)),this.group.add(n.mesh),this.model.addPolyline(this.polyline)}this.mobileStartPoint=null,this.mobileNowPoint=null,this.five.needsRender=!0});f(this,"onNowPointChange",e=>{if(this.state==="watching"){this.mobileNowPoint=e,this.updateMagnifier(e);return}this.hasAppendDashed||(this.dashed.distanceItem.appendTo(this.container),this.group.add(this.dashed.mesh),this.hasAppendDashed=!0),this.five.needsRender=!0,this.mobileNowPoint=e,this.updateMobileDashed(),this.updateMagnifier(e),this.five.needsRender=!0});f(this,"onWillChangeState",(e,n)=>{this.state=n,this.state==="watching"?this.five.helperVisible=!0:this.five.helperVisible=!1});f(this,"chooseLine",e=>{const n=Fr(e);this.highlightLines(n),this.five.needsRender=!0,this.hook.emit("selectedChange",n.map(o=>o))});f(this,"deleteDomClickCallback",()=>{this.highlightedLines.forEach(e=>{this.removeLine(e);const n=this.model.getPolylineByLine(e);this.model.removePolyline(n)}),this.highlightedLines=[],this.deleteDom.setLines([]).hide()});f(this,"cancelDeleteClickCallback",()=>{this.clearHighlightLines()});this.model=new ms(this.config),this.polyline=new Ji({model:this.model}),this.rangePieceController=new jv(e),this.deleteDom=new wh(this.five,{i18n:this.config.i18n,onClick:this.deleteDomClickCallback,cancelDelete:this.cancelDeleteClickCallback}).appendTo(this.container),this.five.on("cameraUpdate",this.onCameraUpdate),this.five.on("wantsTapGesture",this.onWantsTapGesture),this.five.on("wantsToMoveToPano",this.onWantsToMoveToPano),this.five.helperVisible=!1,this.hook.emit("editedDashedLineChange",null),this.hook.on("getStartPoint",this.onGetStartPoint),this.hook.on("getEndPoint",this.onGetEndPoint),this.hook.on("nowPointChange",this.onNowPointChange),this.hook.on("willChangeState",this.onWillChangeState),this.five.refresh()}dispose(){super.dispose(),this.disposers.forEach(e=>e()),this.five.helperVisible=!0,this.rangePieceController.dispose(),this.group.remove(this.mouseGroup,this.dashed.mesh),this.five.off("cameraUpdate",this.onCameraUpdate),this.five.off("wantsTapGesture",this.onWantsTapGesture),this.five.off("wantsToMoveToPano",this.onWantsToMoveToPano),this.hook.off("getStartPoint",this.onGetStartPoint),this.hook.off("getEndPoint",this.onGetEndPoint),this.hook.off("nowPointChange",this.onNowPointChange),this.hook.off("willChangeState",this.onWillChangeState),this.hook.emit("selectedChange",[]),this.dashed.distanceItem.remove(),this.five.needsRender=!0}highlightLine(e){e.selected||(e.selected=!0,this.group.add(e.lightMesh),e.distanceItem.highlight(),this.five.needsRender=!0)}clearHighlightLines(){this.group.children.length!==0&&(this.deleteDom.setLines([]).hide(),this.model.getAllLines().forEach(e=>{e.selected=!1,e.distanceItem.unHighlight(),this.group.remove(e.lightMesh)}),this.highlightedLines=[],this.five.needsRender=!0)}getEditingLines(){return this.model.polylines}highlightLines(e){this.clearHighlightLines(),this.highlightedLines=e,this.deleteDom.setLines(e).updatePosition().show(),e.forEach(n=>this.highlightLine(n))}}const Eh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxmaWx0ZXIgeD0iLTUuMyUiIHk9Ii01LjMlIiB3aWR0aD0iMTEwLjUlIiBoZWlnaHQ9IjExMC41JSIgZmlsdGVyVW5pdHM9Im9iamVjdEJvdW5kaW5nQm94IiBpZD0icHJlZml4X19hIj48ZmVPZmZzZXQgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9InNoYWRvd09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rZT0idXJsKCNwcmVmaXhfX2EpIiBzdHJva2Utd2lkdGg9Ii40IiBmaWxsPSJ1cmwoI3ByZWZpeF9fYikiIG9wYWNpdHk9Ii43IiBjeD0iMzYiIGN5PSIzNiIgcj0iMjguMjQ0Ii8+PGVsbGlwc2UgZmlsbD0iIzdDOTBEQSIgb3BhY2l0eT0iLjU5NiIgZmlsdGVyPSJ1cmwoI3ByZWZpeF9fYykiIGN4PSIzNiIgY3k9IjM2IiByeD0iMTguOTYzIiByeT0iNy4xMTEiLz48cGF0aCBkPSJNMzYgMEMxNi4xMTggMCAwIDE2LjExOCAwIDM2czE2LjExOCAzNiAzNiAzNiAzNi0xNi4xMTggMzYtMzZTNTUuODgyIDAgMzYgMHptMCA0LjQ0NGMxNy40MjggMCAzMS41NTYgMTQuMTI4IDMxLjU1NiAzMS41NTZTNTMuNDI4IDY3LjU1NiAzNiA2Ny41NTYgNC40NDQgNTMuNDI4IDQuNDQ0IDM2IDE4LjU3MiA0LjQ0NCAzNiA0LjQ0NHoiIGZpbGw9InVybCgjcHJlZml4X19kKSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9nPjwvc3ZnPg==",Ov=`
316
316
  <svg class="fpm__exit-icon width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
317
317
  <defs>
318
318
  <radialGradient cx="50%" cy="50%" fx="50%" fy="50%" r="86.3016741%" id="radialGradient-1">
@@ -512,15 +512,15 @@ void main() {
512
512
  </div>
513
513
  </div>
514
514
  </div>
515
- `,Gv={display:"none",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:"0",transform:"translate(0, 10px)",transition:"opacity 500ms ease-in-out, transform 500ms ease-in-out"},Fv={position:"absolute",left:"50%",bottom:"32px",transform:"translateX(-50%)",height:"89px",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",pointerEvents:"all",color:"#fff",zIndex:"10"},Wv={position:"absolute",bottom:"0",left:"0",opacity:"0.5",width:"100%",height:"184px",background:"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, #000000 100%)",zIndex:"0"},kh={margin:"0 64px"},Nv={opacity:"0.85"},xh={width:"72px",height:"72px",backgroundSize:"100%",cursor:"pointer",transition:"all 200ms ease-in-out"},Xv={width:"24px",height:"24px",marginRight:"4px",backgroundSize:"100%",cursor:"pointer"},Yv={userSelect:"none",pointerEvents:"none"};class Uv{constructor(t,e,n){f(this,"container");f(this,"measureController");f(this,"mainElement");f(this,"_params");f(this,"_btnTexts",{start:"开始",end:"结束",revoke:"撤销",exit:"退出"});f(this,"onMouseEnter",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="1"});f(this,"onMouseLeave",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="0.85"});f(this,"onClick",()=>{this.measureController.getCurrentMode()!=="Edit"?this.measureController.changeMode("Edit"):this.measureController.save().changeMode("Watch")});f(this,"modeChangeHandler",t=>{t==="Edit"?this.change2Done():this.change2Add()});var r,a,l,c;this._params=n,this._btnTexts={start:(r=this._params.startButtonText)!=null?r:this._btnTexts.start,end:(a=this._params.endButtonText)!=null?a:this._btnTexts.end,revoke:(l=this._params.revokeButtonText)!=null?l:this._btnTexts.revoke,exit:(c=this._params.exitButtonText)!=null?c:this._btnTexts.exit},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),Object.assign(this.mainElement.mainIcon.style,xh),Object.assign(this.mainElement.mainItem.style,kh);const{revokeTextDom:o,exitTextDom:s}=this._getTextElement();o&&(o.innerText=this._btnTexts.revoke),s&&(s.innerText=this._btnTexts.exit),this.change2Add(),this.measureController.hook.on("modeChange",this.modeChangeHandler),this.mainElement.mainItem.addEventListener("click",this.onClick),this.mainElement.mainItem.addEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.addEventListener("mouseleave",this.onMouseLeave)}dispose(){this.measureController.hook.off("modeChange",this.modeChangeHandler),this.mainElement.mainItem.removeEventListener("click",this.onClick),this.mainElement.mainItem.removeEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.removeEventListener("mouseleave",this.onMouseLeave)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),n=this.container.querySelector(".fpm__main-icon");if(!e||!t||!n)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:n}}_getTextElement(){const t=this.container.querySelector(".fpm__revoke-text"),e=this.container.querySelector(".fpm__exit-text");return{revokeTextDom:t,exitTextDom:e}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.getMainElement();t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class qv{constructor(t,e,n){f(this,"container");f(this,"measureController");f(this,"mainElement");f(this,"_params");f(this,"_btnTexts",{start:"开始",end:"结束"});f(this,"onClick",()=>{var t;this.mainElement.mainTextDom.innerText===((t=this._params.startButtonText)!=null?t:"开始")?(this.measureController.hook.emit("willChangeState","watching","editing"),this.change2Done()):(this.measureController.hook.emit("willChangeState","editing","watching"),this.change2Add())});var o,s;this._params=n,this._btnTexts={start:(o=this._params.startButtonText)!=null?o:this._btnTexts.start,end:(s=this._params.endButtonText)!=null?s:this._btnTexts.end},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),this.mainElement.mainIcon.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),Object.assign(this.mainElement.mainIcon.style,xh),Object.assign(this.mainElement.mainItem.style,kh),this.change2Add(),this.mainElement.mainItem.addEventListener("click",this.onClick)}dispose(){this.mainElement.mainItem.removeEventListener("click",this.onClick)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),n=this.container.querySelector(".fpm__main-icon");if(!e||!t||!n)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:n}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.mainElement;t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class Jv{constructor(t,e){f(this,"container");f(this,"revokeIcon");f(this,"revokeItem");f(this,"measureController");f(this,"onClick",()=>{this.measureController.revoke()});f(this,"onModeChange",t=>{if(t!=="Edit"&&this.revokeItem.className.includes("enabled")){this.revokeItem.classList.remove("enabled"),this.measureController.hook.off("anchorChange",this.onAnchorChange);return}this.measureController.hook.on("anchorChange",this.onAnchorChange)});f(this,"onAnchorChange",t=>{t&&this.revokeItem.classList.add("enabled")});this.measureController=t,this.container=e;const n=this.container.querySelector(".fpm__revoke-icon"),o=this.container.querySelector(".fpm__revoke");if(!n||!o)throw new Error("不正确的选择器");this.revokeIcon=n,this.revokeItem=o,this.revokeItem.addEventListener("click",this.onClick),t.hook.on("modeChange",this.onModeChange)}dispose(){this.revokeItem.removeEventListener("click",this.onClick),this.measureController.hook.off("modeChange",this.onModeChange)}}class Ll{constructor(t,e){f(this,"revoke");f(this,"container");f(this,"mainController");f(this,"disposers",[]);f(this,"measureController");f(this,"mode");f(this,"_params");f(this,"handleExit",()=>{const t=this.container.querySelector(".fpm__exit-icon"),e=this.container.querySelector(".fpm__exit");if(!e||!t)throw new Error("cannot find dom");this.mode==="pc"&&(Object.assign(e.style,Nv),Object.assign(t==null?void 0:t.style,Xv));const n=()=>{e.style.opacity="1"},o=()=>{e.style.opacity="0.85"},s=()=>{this.measureController.disable()};return e.addEventListener("click",s),e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",o),()=>{e.removeEventListener("click",s),e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",o)}});var r;this._params=e,this.measureController=t,this.mode=(r=e.mode)!=null?r:"pc",this.container=document.createElement("div"),this.container.innerHTML=this.mode==="mobile"?Bv:Hv,this.container.classList.add("fpm__ui-controller",this.mode),this.container.style.background="rgba(0, 0, 0, 0.15)",e.container.appendChild(this.container);const n=this.container.querySelectorAll(".fpm__text"),o=this.container.querySelector(".fpm_ui-bg"),s=this.container.querySelector(".fpm_operating-space");Object.assign(o==null?void 0:o.style,Wv),Object.assign(s==null?void 0:s.style,Fv),Object.assign(this.container.style,Gv),n.forEach(a=>Object.assign(a.style,Yv))}dispose(){this.hide(),this.container.remove()}show(){return this.container.style.display="block",this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this.mode==="pc"?(this.revoke=new Jv(this.measureController,this.container),this.mainController=new Uv(this.measureController,this.container,this._params)):this.mainController=new qv(this.measureController,this.container,this._params),this.disposers.push(this.handleExit()),this}hide(){var t,e;return this.container.style.display="none",this.container.style.opacity="0",this.container.style.transform="translate(0, 10px)",this.mode==="pc"&&((t=this.revoke)==null||t.dispose()),(e=this.mainController)==null||e.dispose(),this.disposers.forEach(n=>n()),this.disposers=[],this}}class Zv{constructor(t,e){f(this,"measureController");f(this,"textDom",document.createElement("span"));f(this,"container",document.createElement("div"));f(this,"hasAnchor",!1);f(this,"hasChangedToWatch",!1);f(this,"_params");f(this,"onModelChange",t=>{var e;if(t==="View"){this.hide();return}if(t==="Watch"){this.hasChangedToWatch?(this.textDom.innerText="",this.hide()):(this.show(),this.hasChangedToWatch=!0);return}t==="Edit"&&(this.textDom.innerText=(e=this._params.firstPointTip)!=null?e:"请选择第一个测量点,Esc或单击鼠标右键可取消选择",this.show())});f(this,"anchorChange",t=>{var e,n;!this.hasAnchor&&t?(this.hasAnchor=!0,this.textDom.innerText=(e=this._params.nextPointTip)!=null?e:"选择下一个测量点,Esc或单击鼠标右键取消选择"):t||(this.hasAnchor=!1,this.textDom.innerText=(n=this._params.firstPointTip)!=null?n:"请选择第一个测量点,Esc或单击鼠标右键可取消选择")});f(this,"onEditedLineChange",t=>{var e;t.lines.length===1&&(this.textDom.innerText=(e=this._params.endTip)!=null?e:"可以连续选择测量点,或点击下方“结束”按钮完成测量(Esc取消,Command+S保存)")});this._params=e,this.initDom(),e.container.append(this.container),this.measureController=t,t.hook.on("modeChange",this.onModelChange),t.hook.on("anchorChange",this.anchorChange),t.hook.on("editedPolylineChange",this.onEditedLineChange)}dispose(){this.hide(),this.container.remove()}show(){return this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this}hide(){return this.container.style.opacity="0",this.container.style.transform="translate(0, -10px)",this.measureController.hook.off("modeChange",this.onModelChange),this.measureController.hook.off("anchorChange",this.anchorChange),this.measureController.hook.off("editedPolylineChange",this.onEditedLineChange),this}initDom(){var n;const t=this.container,e=this.textDom;t.classList.add("fpm__guide-container"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.width="100%",t.style.height="110px",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.transform="translate(0, -10px)",t.style.background="linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.00) 100%)",t.style.transition="opacity 500ms ease-in-out, transform 500ms ease-in-out",t.style.opacity="0",e.classList.add("fpm__guide-text"),e.style.color="#fff",e.style.fontSize="20px",e.innerText=(n=this._params.startTip)!=null?n:"点击下方“开始”按钮开始测距",t.appendChild(e)}}class Kv{constructor(t,e){f(this,"five");f(this,"measureController");f(this,"onKeyDown",t=>{if(t.metaKey&&t.code==="KeyS"){this.measureController.save().changeMode("Watch"),t.preventDefault();return}if(t.code==="Escape")return this.escape()});f(this,"onMouseDown",t=>{t.button===2&&(t.preventDefault(),this.escape())});this.five=e,this.measureController=t;const n=this.five.getElement();n&&(document.body.addEventListener("keydown",this.onKeyDown),n.addEventListener("mousedown",this.onMouseDown))}dispose(){const t=this.five.getElement();t&&(document.body.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("mousedown",this.onMouseDown))}escape(){return this.measureController.getCurrentMode()==="Watch"?this.measureController.disable():this.measureController.changeMode("Watch")}}class $v{constructor(t,e){f(this,"hasOpen",!1);f(this,"hook",new ze.Subscribe);f(this,"magnifier");f(this,"five");f(this,"model");f(this,"group");f(this,"config");f(this,"isMobile");f(this,"fiveHelper");f(this,"useUIController");f(this,"params");f(this,"useGuideController");f(this,"container",document.createElement("div"));f(this,"shortcutKeyController");f(this,"controller",null);f(this,"getCurrentMode",()=>this.controller instanceof So?"Edit":this.controller instanceof Sl?"Watch":this.controller instanceof ji?"Mixed":this.controller instanceof Dl?"View":null);f(this,"changeMode",t=>{var o;if(!this.hasOpen||this.getCurrentMode()===t)return;(o=this.controller)==null||o.dispose();const e={View:Dl,Watch:Sl,Edit:So,Mixed:ji};if(!e[t])throw new Error("不存在的 Mode");const n=this.createControllerParams();this.controller=new e[t](n),this.hook.emit("modeChange",t)});var o,s,r,a;this.five=t,this.params=e,this.config=fs(e,["openParams","magnifierParams"]),this.model=new ms(this.config),this.fiveHelper=new av(t),this.isMobile=(s=(o=e==null?void 0:e.openParams)==null?void 0:o.isMobile)!=null?s:!1,this.magnifier=new bh(t,(r=e.magnifierParams)!=null?r:{width:190,height:190,scale:2}),this.group=new R.Group,this.group.name="plugin-measure-group",this.container.classList.add("five-plugin-measure-container"),this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="0",this.container.style.pointerEvents="none",this.container.style.width="100%",this.container.style.height="100%",this.container.style.opacity="0";const n=(a=this.params.openParams)!=null?a:{};if(this.params.useUIController!==!1){const l=F({container:this.container,openParams:n},typeof this.params.useUIController=="object"?this.params.useUIController:{});this.useUIController=new Ll(this,l)}if(this.params.useGuideController!==!1){const l=F({container:this.container},typeof this.params.useGuideController=="object"?this.params.useGuideController:{});this.useGuideController=new Zv(this,l)}}appendTo(t){t.append(this.container)}dispose(){var t,e;this.disable(),(t=this.useUIController)==null||t.dispose(),(e=this.magnifier)==null||e.dispose(),this.five.needsRender=!0}load(t){this.model.parse(t),this.save()}enable(t){var e;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",t!=null&&t.mode?this.changeMode(t.mode):this.isMobile?this.changeMode("Mixed"):this.changeMode("Watch"),(e=this.useUIController)==null||e.show(),this.shortcutKeyController=new Kv(this,this.five),this.hook.emit("enable",!0))}disable(){var t,e,n,o;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.useUIController)==null||e.hide(),(n=this.useGuideController)==null||n.hide(),(o=this.shortcutKeyController)==null||o.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)}edit(){const t=this.isMobile?"Mixed":"Edit";this.changeMode(t)}revoke(){this.controller instanceof So&&this.controller.revoke()}removePolyline(t){this.model.removePolyline(t)}removePolylineByID(t){const e=this.model.getPolylineByID(t);e&&this.model.removePolyline(e)}getPolylineByID(t){return this.model.getPolylineByID(t)}getEditedPolyline(){}highlightLine(t){if(this.getCurrentMode()!=="Watch")return!1;const e=this.model.getLineByID(t);return e?(this.controller.highlightLine(e),!0):!1}clearHighlightLines(){return this.getCurrentMode()!=="Watch"?!1:(this.controller.clearHighlightLines(),!0)}save(t){var o;if(!(this.controller instanceof So)&&!(this.controller instanceof ji))return this;const e=(o=t==null?void 0:t.mode)!=null?o:"View";return this.controller.model.polylines.forEach(s=>{this.model.addPolyline(s)}),this.changeMode(e),this}addStartPoint(){this.controller instanceof ji&&this.hook.emit("willChangeState","watching","editing")}addEndPoint(){this.controller instanceof ji&&this.hook.emit("willChangeState","editing","watching")}toJson(){return this.model.toJson()}changeIsMobile(t){var e;if(this.isMobile=t,this.params.useUIController!==!1){(e=this.useUIController)==null||e.dispose();const n=F({container:this.container,mode:this.isMobile?"mobile":"pc"},typeof this.params.useUIController=="object"?this.params.useUIController:{});this.useUIController=new Ll(this,n)}}changeConfigs(t){var e;Object.assign(this.config,t),(e=this.controller)==null||e.updateDistanceUI()}setCustomText(t,e){var o;const n=this.model.getLineByID(t);if(!n)throw new Error("不存在的线段");n.setText(e),(o=this.controller)==null||o.updateDistanceUI()}createControllerParams(){var e;const t=(e=this.params.openParams)!=null?e:{};return t.isMobile=this.isMobile,{five:this.five,hook:this.hook,group:this.group,model:this.model,config:this.config,magnifier:this.magnifier,container:this.container,fiveHelper:this.fiveHelper,openParams:t,mouseGroup:Ch(F({},t.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator}}}const e0=function(t,e){return new $v(t,e)},Dh=ca(null);function t0(i){fe(i,"svelte-19zi46m",".PanoSpatialTagPlugin__tag-origin.svelte-19zi46m{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-19zi46m:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-19zi46m{transform:translate(-50%, -50%) scale(0.6);animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}")}function Tl(i,t,e){const n=i.slice();return n[3]=t[e],n}function zl(i){let t,e=`${i[3].top}%`,n=`${i[3].left}%`,o,s;function r(){return i[2](i[3])}return{c(){t=z("i"),w(t,"class","svelte-19zi46m"),$(t,"PanoSpatialTagPlugin__tag-origin",!0),$(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),T(t,"top",e),T(t,"left",n),T(t,"visibility",i[3].front?"visible":"hidden")},m(a,l){V(a,t,l),o||(s=Ce(t,"click",r),o=!0)},p(a,l){i=a,l&1&&$(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),l&1&&e!==(e=`${i[3].top}%`)&&T(t,"top",e),l&1&&n!==(n=`${i[3].left}%`)&&T(t,"left",n),l&1&&T(t,"visibility",i[3].front?"visible":"hidden")},d(a){a&&_(t),o=!1,s()}}}function n0(i){let t,e=i[0],n=[];for(let o=0;o<e.length;o+=1)n[o]=zl(Tl(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=Ee()},m(o,s){for(let r=0;r<n.length;r+=1)n[r]&&n[r].m(o,s);V(o,t,s)},p(o,[s]){if(s&3){e=o[0];let r;for(r=0;r<e.length;r+=1){const a=Tl(o,e,r);n[r]?n[r].p(a,s):(n[r]=zl(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:K,o:K,d(o){qt(n,o),o&&_(t)}}}function i0(i,t,e){let{origins:n}=t;const o=r=>{Dh.update(()=>`${r}-PanoSpatialTagPlugin-${Date.now()}`)},s=r=>o(r.id);return i.$$set=r=>{"origins"in r&&e(0,n=r.origins)},[n,o,s]}class o0 extends ce{constructor(t){super(),le(this,t,i0,n0,ae,{origins:0},t0)}}function s0(i){fe(i,"svelte-9m6drd",`.PanoSpatialTagPlugin__tag-x.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#fff;transform:translate(0, -100%);transition:height 0.5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd.svelte-9m6drd{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity 0.8s 0.6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-9m6drd.svelte-9m6drd{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:0.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.1));box-shadow:0 0.1rem 0.5rem rgba(0, 0, 0, 0.2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform 0.4s cubic-bezier(0.44, 0.44, 0.74, 0.98), opacity 0.4s cubic-bezier(0.44, 0.44, 0.74, 0.98), width 0.5s linear,
516
- height 0.5s linear;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0.3rem;height:1.8rem;width:0.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0.5rem;height:1.8rem;width:0.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-line1.svelte-9m6drd{animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line1 linear 0.5s forwards 0.45s}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-line2.svelte-9m6drd{animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line2 linear 0.5s forwards 0.65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd.svelte-9m6drd{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-line.svelte-9m6drd{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-9m6drd.svelte-9m6drd{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform 0.5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-animate.svelte-9m6drd{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-9m6drd.svelte-9m6drd{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform 0.9s cubic-bezier(0, 0.65, 0.16, 1.08) 0.6s;padding-left:0.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-content.svelte-9m6drd{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd{opacity:0.32}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-content.svelte-9m6drd{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform 0.5s 0.55s, opacity 0.4s 0.55s}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd{opacity:0;transition:opacity 0.8s}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-content.svelte-9m6drd{transform:translate(-100%, 0);transition:transform 0.6s cubic-bezier(0.53, 0.06, 0.88, 0.59)}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-content .svelte-9m6drd{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-line1.svelte-9m6drd{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line1-hide linear 0.28s forwards 0.3s}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-line2.svelte-9m6drd{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line2-hide linear 0.28s forwards 0.45s}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}`)}function r0(i){let t,e,n,o,s,r,a,l,c,d,h,u,m,v,g;return{c(){t=z("div"),e=z("div"),n=ne(),o=z("div"),s=z("i"),r=ne(),a=z("i"),l=ne(),c=z("i"),d=ne(),h=z("div"),u=z("div"),w(e,"class","PanoSpatialTagPlugin__tag-shadow svelte-9m6drd"),T(e,"transform","translate("+i[7]/2*i[3]*3+"px, "+i[8]/2*(i[1]?-1:1)*i[3]*3+"px) scale("+1/i[3]+")"),w(s,"class","PanoSpatialTagPlugin__tag-flagpole svelte-9m6drd"),T(s,"width",i[4]+"rem"),w(a,"class","PanoSpatialTagPlugin__tag-line1 svelte-9m6drd"),w(c,"class","PanoSpatialTagPlugin__tag-line2 svelte-9m6drd"),w(o,"class","PanoSpatialTagPlugin__tag-line svelte-9m6drd"),w(u,"class","PanoSpatialTagPlugin__tag-content svelte-9m6drd"),w(h,"class","PanoSpatialTagPlugin__tag-animate svelte-9m6drd"),T(h,"transform","scale("+i[3]*3+")"),w(t,"id",m="PanoSpatialTagPlugin__"+i[0]),T(t,"height",20*i[5]+"rem"),w(t,"class","svelte-9m6drd"),$(t,"PanoSpatialTagPlugin__tag-x",!0),$(t,"PanoSpatialTagPlugin__tag-upside-down",i[1]),$(t,"PanoSpatialTagPlugin__tag-show",i[10]),$(t,"PanoSpatialTagPlugin__tag-hide",i[10]===!1||i[6])},m(A,b){V(A,t,b),O(t,e),O(t,n),O(t,o),O(o,s),O(o,r),O(o,a),O(o,l),O(o,c),O(t,d),O(t,h),O(h,u),u.innerHTML=i[2],i[16](u),v||(g=Ce(u,"click",i[11]),v=!0)},p(A,[b]){b&394&&T(e,"transform","translate("+A[7]/2*A[3]*3+"px, "+A[8]/2*(A[1]?-1:1)*A[3]*3+"px) scale("+1/A[3]+")"),b&16&&T(s,"width",A[4]+"rem"),b&4&&(u.innerHTML=A[2]),b&8&&T(h,"transform","scale("+A[3]*3+")"),b&1&&m!==(m="PanoSpatialTagPlugin__"+A[0])&&w(t,"id",m),b&32&&T(t,"height",20*A[5]+"rem"),b&2&&$(t,"PanoSpatialTagPlugin__tag-upside-down",A[1]),b&1024&&$(t,"PanoSpatialTagPlugin__tag-show",A[10]),b&1088&&$(t,"PanoSpatialTagPlugin__tag-hide",A[10]===!1||A[6])},i:K,o:K,d(A){A&&_(t),i[16](null),v=!1,g()}}}function a0(i,t,e){let{id:n}=t,{upsideDown:o}=t,{content:s}=t,{contentZoom:r}=t,{lineWidthZoom:a}=t,{lineHeightZoom:l}=t,{destroying:c=!1}=t,{folded:d}=t,{dispose:h}=t,{events:u}=t,{hooks:m}=t,v=0,g=0,A,b,y=setTimeout(()=>{d||e(10,b=!0),y=void 0},100);const E=C=>{const j=Object.keys(u);let M=C.target;for(;M;){const X=M.getAttribute("class");if(!X){M=M.parentNode;continue}if(X.includes("PanoSpatialTagPlugin__tag-content")){M=null;break}j.forEach(J=>{X.includes(J)&&u[J](n)}),M=M.parentNode}};Mt(()=>{m.emit("initTag",{id:n})});const k=Dh.subscribe(C=>{if(C===null)return;const[j,M]=C.split("-PanoSpatialTagPlugin-");n===j&&(m.emit("clickOrigin",{id:n,show:b}),y||(e(10,b=d),e(12,d=!d),y=setTimeout(()=>{y=void 0},1500)))});Yd(()=>{e(7,v=A.offsetWidth),e(8,g=A.offsetHeight),!y&&e(10,b=!d)}),hn(()=>{m.emit("destroyTag",{id:n}),k(),h()});function S(C){Ke[C?"unshift":"push"](()=>{A=C,e(9,A)})}return i.$$set=C=>{"id"in C&&e(0,n=C.id),"upsideDown"in C&&e(1,o=C.upsideDown),"content"in C&&e(2,s=C.content),"contentZoom"in C&&e(3,r=C.contentZoom),"lineWidthZoom"in C&&e(4,a=C.lineWidthZoom),"lineHeightZoom"in C&&e(5,l=C.lineHeightZoom),"destroying"in C&&e(6,c=C.destroying),"folded"in C&&e(12,d=C.folded),"dispose"in C&&e(13,h=C.dispose),"events"in C&&e(14,u=C.events),"hooks"in C&&e(15,m=C.hooks)},[n,o,s,r,a,l,c,v,g,A,b,E,d,h,u,m,S]}let l0=class extends ce{constructor(t){super(),le(this,t,a0,r0,ae,{id:0,upsideDown:1,content:2,contentZoom:3,lineWidthZoom:4,lineHeightZoom:5,destroying:6,folded:12,dispose:13,events:14,hooks:15},s0)}};const c0={position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",pointerEvents:"none"},jl="<",_l=">",Vl="%",Ol="locals",d0="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",h0={"&":"&amp","<":"&lt",">":"&gt",'"':"&#34","'":"&#39"},ct={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};function Bl(i){return i.replace(/;(\s*$)/,"$1")}function u0(i,t){return new f0(i).compileFunction()(t)}class f0{constructor(t){f(this,"templateText");f(this,"mode",null);f(this,"truncate",!1);f(this,"currentLine",1);f(this,"source","");f(this,"regex",new RegExp(d0));this.templateText=t}compileFunction(){let t;const e=` var __output = "";
515
+ `,Gv={display:"none",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:"0",transform:"translate(0, 10px)",transition:"opacity 500ms ease-in-out, transform 500ms ease-in-out"},Fv={position:"absolute",left:"50%",bottom:"32px",transform:"translateX(-50%)",height:"89px",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",pointerEvents:"all",color:"#fff",zIndex:"10"},Wv={position:"absolute",bottom:"0",left:"0",opacity:"0.5",width:"100%",height:"184px",background:"linear-gradient(180deg, rgba(0,0,0,0.00) 0%, #000000 100%)",zIndex:"0"},kh={margin:"0 64px"},Nv={opacity:"0.85"},xh={width:"72px",height:"72px",backgroundSize:"100%",cursor:"pointer",transition:"all 200ms ease-in-out"},Xv={width:"24px",height:"24px",marginRight:"4px",backgroundSize:"100%",cursor:"pointer"},Yv={userSelect:"none",pointerEvents:"none"};class Uv{constructor(t,e,n){f(this,"container");f(this,"measureController");f(this,"mainElement");f(this,"_params");f(this,"_btnTexts",{start:"开始",end:"结束",revoke:"撤销",exit:"退出"});f(this,"onMouseEnter",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="1"});f(this,"onMouseLeave",()=>{const{mainItem:t}=this.mainElement;t.style.opacity="0.85"});f(this,"onClick",()=>{this.measureController.getCurrentMode()!=="Edit"?this.measureController.changeMode("Edit"):this.measureController.save().changeMode("Watch")});f(this,"modeChangeHandler",t=>{t==="Edit"?this.change2Done():this.change2Add()});var r,a,l,c;this._params=n,this._btnTexts={start:(r=this._params.startButtonText)!=null?r:this._btnTexts.start,end:(a=this._params.endButtonText)!=null?a:this._btnTexts.end,revoke:(l=this._params.revokeButtonText)!=null?l:this._btnTexts.revoke,exit:(c=this._params.exitButtonText)!=null?c:this._btnTexts.exit},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),Object.assign(this.mainElement.mainIcon.style,xh),Object.assign(this.mainElement.mainItem.style,kh);const{revokeTextDom:o,exitTextDom:s}=this._getTextElement();o&&(o.innerText=this._btnTexts.revoke),s&&(s.innerText=this._btnTexts.exit),this.change2Add(),this.measureController.hook.on("modeChange",this.modeChangeHandler),this.mainElement.mainItem.addEventListener("click",this.onClick),this.mainElement.mainItem.addEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.addEventListener("mouseleave",this.onMouseLeave)}dispose(){this.measureController.hook.off("modeChange",this.modeChangeHandler),this.mainElement.mainItem.removeEventListener("click",this.onClick),this.mainElement.mainItem.removeEventListener("mouseenter",this.onMouseEnter),this.mainElement.mainItem.removeEventListener("mouseleave",this.onMouseLeave)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),n=this.container.querySelector(".fpm__main-icon");if(!e||!t||!n)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:n}}_getTextElement(){const t=this.container.querySelector(".fpm__revoke-text"),e=this.container.querySelector(".fpm__exit-text");return{revokeTextDom:t,exitTextDom:e}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.getMainElement();t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class qv{constructor(t,e,n){f(this,"container");f(this,"measureController");f(this,"mainElement");f(this,"_params");f(this,"_btnTexts",{start:"开始",end:"结束"});f(this,"onClick",()=>{var t;this.mainElement.mainTextDom.innerText===((t=this._params.startButtonText)!=null?t:"开始")?(this.measureController.hook.emit("willChangeState","watching","editing"),this.change2Done()):(this.measureController.hook.emit("willChangeState","editing","watching"),this.change2Add())});var o,s;this._params=n,this._btnTexts={start:(o=this._params.startButtonText)!=null?o:this._btnTexts.start,end:(s=this._params.endButtonText)!=null?s:this._btnTexts.end},this.measureController=t,this.container=e,this.mainElement=this.getMainElement(),this.mainElement.mainIcon.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);"),Object.assign(this.mainElement.mainIcon.style,xh),Object.assign(this.mainElement.mainItem.style,kh),this.change2Add(),this.mainElement.mainItem.addEventListener("click",this.onClick)}dispose(){this.mainElement.mainItem.removeEventListener("click",this.onClick)}getMainElement(){const t=this.container.querySelector(".fpm__main-text"),e=this.container.querySelector(".fpm__main"),n=this.container.querySelector(".fpm__main-icon");if(!e||!t||!n)throw new Error("cannot find dom");return{mainTextDom:t,mainItem:e,mainIcon:n}}change2Add(){const{mainIcon:t,mainTextDom:e}=this.mainElement;if(t.className.includes("fpm__main__start")){e.innerText=this._btnTexts.start;return}t.className.includes("fpm__main__end")&&(t.style.transform="scale(0.8)",e.className.includes("fpm__main-text__show")?e.classList.replace("fpm__main-text__show","fpm__main-text__hide"):e.classList.add("fpm__main-text__hide"),setTimeout(()=>{t.classList.replace("fpm__main__end","fpm__main__start"),t.style.transform="scale(1)",e.innerText=this._btnTexts.start,e.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200))}change2Done(){const{mainTextDom:t,mainIcon:e}=this.mainElement;t.innerText!==this._btnTexts.end&&(e.className.includes("fpm__main__end")||e.className.includes("fpm__main__start")&&(e.style.transform="scale(0.8)",t.className.includes("fpm__main-text__show")?t.classList.replace("fpm__main-text__show","fpm__main-text__hide"):t.classList.add("fpm__main-text__hide"),setTimeout(()=>{e.classList.replace("fpm__main__start","fpm__main__end"),e.style.transform="scale(1)",t.innerText=this._btnTexts.end,t.classList.replace("fpm__main-text__hide","fpm__main-text__show")},200)))}}class Jv{constructor(t,e){f(this,"container");f(this,"revokeIcon");f(this,"revokeItem");f(this,"measureController");f(this,"onClick",()=>{this.measureController.revoke()});f(this,"onModeChange",t=>{if(t!=="Edit"&&this.revokeItem.className.includes("enabled")){this.revokeItem.classList.remove("enabled"),this.measureController.hook.off("anchorChange",this.onAnchorChange);return}this.measureController.hook.on("anchorChange",this.onAnchorChange)});f(this,"onAnchorChange",t=>{t&&this.revokeItem.classList.add("enabled")});this.measureController=t,this.container=e;const n=this.container.querySelector(".fpm__revoke-icon"),o=this.container.querySelector(".fpm__revoke");if(!n||!o)throw new Error("不正确的选择器");this.revokeIcon=n,this.revokeItem=o,this.revokeItem.addEventListener("click",this.onClick),t.hook.on("modeChange",this.onModeChange)}dispose(){this.revokeItem.removeEventListener("click",this.onClick),this.measureController.hook.off("modeChange",this.onModeChange)}}class Ll{constructor(t,e){f(this,"revoke");f(this,"container");f(this,"mainController");f(this,"disposers",[]);f(this,"measureController");f(this,"mode");f(this,"_params");f(this,"handleExit",()=>{const t=this.container.querySelector(".fpm__exit-icon"),e=this.container.querySelector(".fpm__exit");if(!e||!t)throw new Error("cannot find dom");this.mode==="pc"&&(Object.assign(e.style,Nv),Object.assign(t==null?void 0:t.style,Xv));const n=()=>{e.style.opacity="1"},o=()=>{e.style.opacity="0.85"},s=()=>{this.measureController.disable()};return e.addEventListener("click",s),e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",o),()=>{e.removeEventListener("click",s),e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",o)}});var r;this._params=e,this.measureController=t,this.mode=(r=e.mode)!=null?r:"pc",this.container=document.createElement("div"),this.container.innerHTML=this.mode==="mobile"?Bv:Hv,this.container.classList.add("fpm__ui-controller",this.mode),this.container.style.background="rgba(0, 0, 0, 0.15)",e.container.appendChild(this.container);const n=this.container.querySelectorAll(".fpm__text"),o=this.container.querySelector(".fpm_ui-bg"),s=this.container.querySelector(".fpm_operating-space");Object.assign(o==null?void 0:o.style,Wv),Object.assign(s==null?void 0:s.style,Fv),Object.assign(this.container.style,Gv),n.forEach(a=>Object.assign(a.style,Yv))}dispose(){this.hide(),this.container.remove()}show(){return this.container.style.display="block",this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this.mode==="pc"?(this.revoke=new Jv(this.measureController,this.container),this.mainController=new Uv(this.measureController,this.container,this._params)):this.mainController=new qv(this.measureController,this.container,this._params),this.disposers.push(this.handleExit()),this}hide(){var t,e;return this.container.style.display="none",this.container.style.opacity="0",this.container.style.transform="translate(0, 10px)",this.mode==="pc"&&((t=this.revoke)==null||t.dispose()),(e=this.mainController)==null||e.dispose(),this.disposers.forEach(n=>n()),this.disposers=[],this}}class Zv{constructor(t,e){f(this,"measureController");f(this,"textDom",document.createElement("span"));f(this,"container",document.createElement("div"));f(this,"hasAnchor",!1);f(this,"hasChangedToWatch",!1);f(this,"_params");f(this,"onModelChange",t=>{var e;if(t==="View"){this.hide();return}if(t==="Watch"){this.hasChangedToWatch?(this.textDom.innerText="",this.hide()):(this.show(),this.hasChangedToWatch=!0);return}t==="Edit"&&(this.textDom.innerText=(e=this._params.firstPointTip)!=null?e:"请选择第一个测量点,Esc或单击鼠标右键可取消选择",this.show())});f(this,"anchorChange",t=>{var e,n;!this.hasAnchor&&t?(this.hasAnchor=!0,this.textDom.innerText=(e=this._params.nextPointTip)!=null?e:"选择下一个测量点,Esc或单击鼠标右键取消选择"):t||(this.hasAnchor=!1,this.textDom.innerText=(n=this._params.firstPointTip)!=null?n:"请选择第一个测量点,Esc或单击鼠标右键可取消选择")});f(this,"onEditedLineChange",t=>{var e;t.lines.length===1&&(this.textDom.innerText=(e=this._params.endTip)!=null?e:"可以连续选择测量点,或点击下方“结束”按钮完成测量(Esc取消,Command+S保存)")});this._params=e,this.initDom(),e.container.append(this.container),this.measureController=t,t.hook.on("modeChange",this.onModelChange),t.hook.on("anchorChange",this.anchorChange),t.hook.on("editedPolylineChange",this.onEditedLineChange)}dispose(){this.hide(),this.container.remove()}show(){return this.container.style.opacity="1",this.container.style.transform="translate(0, 0)",this}hide(){return this.container.style.opacity="0",this.container.style.transform="translate(0, -10px)",this.measureController.hook.off("modeChange",this.onModelChange),this.measureController.hook.off("anchorChange",this.anchorChange),this.measureController.hook.off("editedPolylineChange",this.onEditedLineChange),this}initDom(){var n;const t=this.container,e=this.textDom;t.classList.add("fpm__guide-container"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.width="100%",t.style.height="110px",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.transform="translate(0, -10px)",t.style.background="linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.00) 100%)",t.style.transition="opacity 500ms ease-in-out, transform 500ms ease-in-out",t.style.opacity="0",e.classList.add("fpm__guide-text"),e.style.color="#fff",e.style.fontSize="20px",e.innerText=(n=this._params.startTip)!=null?n:"点击下方“开始”按钮开始测距",t.appendChild(e)}}class Kv{constructor(t,e){f(this,"five");f(this,"measureController");f(this,"onKeyDown",t=>{if(t.metaKey&&t.code==="KeyS"){this.measureController.save().changeMode("Watch"),t.preventDefault();return}if(t.code==="Escape")return this.escape()});f(this,"onMouseDown",t=>{t.button===2&&(t.preventDefault(),this.escape())});this.five=e,this.measureController=t;const n=this.five.getElement();n&&(document.body.addEventListener("keydown",this.onKeyDown),n.addEventListener("mousedown",this.onMouseDown))}dispose(){const t=this.five.getElement();t&&(document.body.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("mousedown",this.onMouseDown))}escape(){return this.measureController.getCurrentMode()==="Watch"?this.measureController.disable():this.measureController.changeMode("Watch")}}class $v{constructor(t,e){f(this,"hasOpen",!1);f(this,"hook",new ze.Subscribe);f(this,"magnifier");f(this,"five");f(this,"model");f(this,"group");f(this,"config");f(this,"isMobile");f(this,"fiveHelper");f(this,"useUIController");f(this,"params");f(this,"useGuideController");f(this,"container",document.createElement("div"));f(this,"shortcutKeyController");f(this,"controller",null);f(this,"getCurrentMode",()=>this.controller instanceof So?"Edit":this.controller instanceof Sl?"Watch":this.controller instanceof _i?"Mixed":this.controller instanceof Dl?"View":null);f(this,"changeMode",t=>{var o;if(!this.hasOpen||this.getCurrentMode()===t)return;(o=this.controller)==null||o.dispose();const e={View:Dl,Watch:Sl,Edit:So,Mixed:_i};if(!e[t])throw new Error("不存在的 Mode");const n=this.createControllerParams();this.controller=new e[t](n),this.hook.emit("modeChange",t)});var o,s,r,a;this.five=t,this.params=e,this.config=fs(e,["openParams","magnifierParams"]),this.model=new ms(this.config),this.fiveHelper=new av(t),this.isMobile=(s=(o=e==null?void 0:e.openParams)==null?void 0:o.isMobile)!=null?s:!1,this.magnifier=new bh(t,(r=e.magnifierParams)!=null?r:{width:190,height:190,scale:2}),this.group=new R.Group,this.group.name="plugin-measure-group",this.container.classList.add("five-plugin-measure-container"),this.container.style.position="absolute",this.container.style.left="0",this.container.style.top="0",this.container.style.pointerEvents="none",this.container.style.width="100%",this.container.style.height="100%",this.container.style.opacity="0";const n=(a=this.params.openParams)!=null?a:{};if(this.params.useUIController!==!1){const l=F({container:this.container,openParams:n},typeof this.params.useUIController=="object"?this.params.useUIController:{});this.useUIController=new Ll(this,l)}if(this.params.useGuideController!==!1){const l=F({container:this.container},typeof this.params.useGuideController=="object"?this.params.useGuideController:{});this.useGuideController=new Zv(this,l)}}appendTo(t){t.append(this.container)}dispose(){var t,e;this.disable(),(t=this.useUIController)==null||t.dispose(),(e=this.magnifier)==null||e.dispose(),this.five.needsRender=!0}load(t){this.model.parse(t),this.save()}enable(t){var e;this.hasOpen||(this.hasOpen=!0,this.five.scene.add(this.group),this.container.style.opacity="1",t!=null&&t.mode?this.changeMode(t.mode):this.isMobile?this.changeMode("Mixed"):this.changeMode("Watch"),(e=this.useUIController)==null||e.show(),this.shortcutKeyController=new Kv(this,this.five),this.hook.emit("enable",!0))}disable(){var t,e,n,o;this.hasOpen=!1,this.container.style.opacity="0",(t=this.controller)==null||t.dispose(),(e=this.useUIController)==null||e.hide(),(n=this.useGuideController)==null||n.hide(),(o=this.shortcutKeyController)==null||o.dispose(),this.controller=null,this.five.helperVisible=!0,this.five.scene.remove(this.group),this.five.needsRender=!0,this.hook.emit("disable",!0)}edit(){const t=this.isMobile?"Mixed":"Edit";this.changeMode(t)}revoke(){this.controller instanceof So&&this.controller.revoke()}removePolyline(t){this.model.removePolyline(t)}removePolylineByID(t){const e=this.model.getPolylineByID(t);e&&this.model.removePolyline(e)}getPolylineByID(t){return this.model.getPolylineByID(t)}getEditedPolyline(){}highlightLine(t){if(this.getCurrentMode()!=="Watch")return!1;const e=this.model.getLineByID(t);return e?(this.controller.highlightLine(e),!0):!1}clearHighlightLines(){return this.getCurrentMode()!=="Watch"?!1:(this.controller.clearHighlightLines(),!0)}save(t){var o;if(!(this.controller instanceof So)&&!(this.controller instanceof _i))return this;const e=(o=t==null?void 0:t.mode)!=null?o:"View";return this.controller.model.polylines.forEach(s=>{this.model.addPolyline(s)}),this.changeMode(e),this}addStartPoint(){this.controller instanceof _i&&this.hook.emit("willChangeState","watching","editing")}addEndPoint(){this.controller instanceof _i&&this.hook.emit("willChangeState","editing","watching")}toJson(){return this.model.toJson()}changeIsMobile(t){var e;if(this.isMobile=t,this.params.useUIController!==!1){(e=this.useUIController)==null||e.dispose();const n=F({container:this.container,mode:this.isMobile?"mobile":"pc"},typeof this.params.useUIController=="object"?this.params.useUIController:{});this.useUIController=new Ll(this,n)}}changeConfigs(t){var e;Object.assign(this.config,t),(e=this.controller)==null||e.updateDistanceUI()}setCustomText(t,e){var o;const n=this.model.getLineByID(t);if(!n)throw new Error("不存在的线段");n.setText(e),(o=this.controller)==null||o.updateDistanceUI()}createControllerParams(){var e;const t=(e=this.params.openParams)!=null?e:{};return t.isMobile=this.isMobile,{five:this.five,hook:this.hook,group:this.group,model:this.model,config:this.config,magnifier:this.magnifier,container:this.container,fiveHelper:this.fiveHelper,openParams:t,mouseGroup:Ch(F({},t.crossHairParameter)),userDistanceItemCreator:this.params.userDistanceItemCreator}}}const e0=function(t,e){return new $v(t,e)},Dh=ca(null);function t0(i){fe(i,"svelte-19zi46m",".PanoSpatialTagPlugin__tag-origin.svelte-19zi46m{position:absolute;width:0.5rem;height:0.5rem;border-radius:50%;background:#fff;box-shadow:0 0 .6rem #fff;transform:translate(-50%, -50%) scale(1);transform-origin:center center;animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin 1.2s forwards;pointer-events:auto}.PanoSpatialTagPlugin__tag-origin.svelte-19zi46m:after{content:'';position:absolute;top:50%;height:50%;width:2rem;height:2rem;transform:translate(-50%, -50%)}.PanoSpatialTagPlugin__tag-origin-destroy.svelte-19zi46m{transform:translate(-50%, -50%) scale(0.6);animation:svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy 1.2s forwards .7s}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin{0%{transform:translate(-50%, -50%) scale(1);opacity:0}100%{transform:translate(-50%, -50%) scale(0.6);opacity:1 }}@keyframes svelte-19zi46m-PanoSpatialTagPlugin__tag-origin-destroy{0%{transform:translate(-50%, -50%) scale(0.6);opacity:1}10%{transform:translate(-50%, -50%) scale(1);opacity:0.9}100%{transform:translate(-50%, -50%) scale(1);opacity:0}}")}function Tl(i,t,e){const n=i.slice();return n[3]=t[e],n}function zl(i){let t,e=`${i[3].top}%`,n=`${i[3].left}%`,o,s;function r(){return i[2](i[3])}return{c(){t=z("i"),w(t,"class","svelte-19zi46m"),$(t,"PanoSpatialTagPlugin__tag-origin",!0),$(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),T(t,"top",e),T(t,"left",n),T(t,"visibility",i[3].front?"visible":"hidden")},m(a,l){j(a,t,l),o||(s=Ce(t,"click",r),o=!0)},p(a,l){i=a,l&1&&$(t,"PanoSpatialTagPlugin__tag-origin-destroy",i[3].destroying),l&1&&e!==(e=`${i[3].top}%`)&&T(t,"top",e),l&1&&n!==(n=`${i[3].left}%`)&&T(t,"left",n),l&1&&T(t,"visibility",i[3].front?"visible":"hidden")},d(a){a&&V(t),o=!1,s()}}}function n0(i){let t,e=i[0],n=[];for(let o=0;o<e.length;o+=1)n[o]=zl(Tl(i,e,o));return{c(){for(let o=0;o<n.length;o+=1)n[o].c();t=Ee()},m(o,s){for(let r=0;r<n.length;r+=1)n[r]&&n[r].m(o,s);j(o,t,s)},p(o,[s]){if(s&3){e=o[0];let r;for(r=0;r<e.length;r+=1){const a=Tl(o,e,r);n[r]?n[r].p(a,s):(n[r]=zl(a),n[r].c(),n[r].m(t.parentNode,t))}for(;r<n.length;r+=1)n[r].d(1);n.length=e.length}},i:K,o:K,d(o){qt(n,o),o&&V(t)}}}function i0(i,t,e){let{origins:n}=t;const o=r=>{Dh.update(()=>`${r}-PanoSpatialTagPlugin-${Date.now()}`)},s=r=>o(r.id);return i.$$set=r=>{"origins"in r&&e(0,n=r.origins)},[n,o,s]}class o0 extends ce{constructor(t){super(),le(this,t,i0,n0,ae,{origins:0},t0)}}function s0(i){fe(i,"svelte-9m6drd",`.PanoSpatialTagPlugin__tag-x.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#fff;transform:translate(0, -100%);transition:height 0.5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd.svelte-9m6drd{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity 0.8s 0.6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-9m6drd.svelte-9m6drd{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:0.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.1));box-shadow:0 0.1rem 0.5rem rgba(0, 0, 0, 0.2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform 0.4s cubic-bezier(0.44, 0.44, 0.74, 0.98), opacity 0.4s cubic-bezier(0.44, 0.44, 0.74, 0.98), width 0.5s linear,
516
+ height 0.5s linear;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0.3rem;height:1.8rem;width:0.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-9m6drd.svelte-9m6drd{position:absolute;top:0;left:0.5rem;height:1.8rem;width:0.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-line1.svelte-9m6drd{animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line1 linear 0.5s forwards 0.45s}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-line2.svelte-9m6drd{animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line2 linear 0.5s forwards 0.65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd.svelte-9m6drd{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-line.svelte-9m6drd{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-9m6drd.svelte-9m6drd{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform 0.5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-animate.svelte-9m6drd{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-9m6drd.svelte-9m6drd{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform 0.9s cubic-bezier(0, 0.65, 0.16, 1.08) 0.6s;padding-left:0.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-content.svelte-9m6drd{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-9m6drd .PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd{opacity:0.32}.PanoSpatialTagPlugin__tag-show.svelte-9m6drd .PanoSpatialTagPlugin__tag-content.svelte-9m6drd{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-flagpole.svelte-9m6drd{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform 0.5s 0.55s, opacity 0.4s 0.55s}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-shadow.svelte-9m6drd{opacity:0;transition:opacity 0.8s}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-content.svelte-9m6drd{transform:translate(-100%, 0);transition:transform 0.6s cubic-bezier(0.53, 0.06, 0.88, 0.59)}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-content .svelte-9m6drd{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-line1.svelte-9m6drd{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line1-hide linear 0.28s forwards 0.3s}.PanoSpatialTagPlugin__tag-hide.svelte-9m6drd .PanoSpatialTagPlugin__tag-line2.svelte-9m6drd{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-9m6drd-PanoSpatialTagPlugin__tag-line2-hide linear 0.28s forwards 0.45s}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-9m6drd-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}`)}function r0(i){let t,e,n,o,s,r,a,l,c,d,h,u,m,v,g;return{c(){t=z("div"),e=z("div"),n=ne(),o=z("div"),s=z("i"),r=ne(),a=z("i"),l=ne(),c=z("i"),d=ne(),h=z("div"),u=z("div"),w(e,"class","PanoSpatialTagPlugin__tag-shadow svelte-9m6drd"),T(e,"transform","translate("+i[7]/2*i[3]*3+"px, "+i[8]/2*(i[1]?-1:1)*i[3]*3+"px) scale("+1/i[3]+")"),w(s,"class","PanoSpatialTagPlugin__tag-flagpole svelte-9m6drd"),T(s,"width",i[4]+"rem"),w(a,"class","PanoSpatialTagPlugin__tag-line1 svelte-9m6drd"),w(c,"class","PanoSpatialTagPlugin__tag-line2 svelte-9m6drd"),w(o,"class","PanoSpatialTagPlugin__tag-line svelte-9m6drd"),w(u,"class","PanoSpatialTagPlugin__tag-content svelte-9m6drd"),w(h,"class","PanoSpatialTagPlugin__tag-animate svelte-9m6drd"),T(h,"transform","scale("+i[3]*3+")"),w(t,"id",m="PanoSpatialTagPlugin__"+i[0]),T(t,"height",20*i[5]+"rem"),w(t,"class","svelte-9m6drd"),$(t,"PanoSpatialTagPlugin__tag-x",!0),$(t,"PanoSpatialTagPlugin__tag-upside-down",i[1]),$(t,"PanoSpatialTagPlugin__tag-show",i[10]),$(t,"PanoSpatialTagPlugin__tag-hide",i[10]===!1||i[6])},m(A,b){j(A,t,b),O(t,e),O(t,n),O(t,o),O(o,s),O(o,r),O(o,a),O(o,l),O(o,c),O(t,d),O(t,h),O(h,u),u.innerHTML=i[2],i[16](u),v||(g=Ce(u,"click",i[11]),v=!0)},p(A,[b]){b&394&&T(e,"transform","translate("+A[7]/2*A[3]*3+"px, "+A[8]/2*(A[1]?-1:1)*A[3]*3+"px) scale("+1/A[3]+")"),b&16&&T(s,"width",A[4]+"rem"),b&4&&(u.innerHTML=A[2]),b&8&&T(h,"transform","scale("+A[3]*3+")"),b&1&&m!==(m="PanoSpatialTagPlugin__"+A[0])&&w(t,"id",m),b&32&&T(t,"height",20*A[5]+"rem"),b&2&&$(t,"PanoSpatialTagPlugin__tag-upside-down",A[1]),b&1024&&$(t,"PanoSpatialTagPlugin__tag-show",A[10]),b&1088&&$(t,"PanoSpatialTagPlugin__tag-hide",A[10]===!1||A[6])},i:K,o:K,d(A){A&&V(t),i[16](null),v=!1,g()}}}function a0(i,t,e){let{id:n}=t,{upsideDown:o}=t,{content:s}=t,{contentZoom:r}=t,{lineWidthZoom:a}=t,{lineHeightZoom:l}=t,{destroying:c=!1}=t,{folded:d}=t,{dispose:h}=t,{events:u}=t,{hooks:m}=t,v=0,g=0,A,b,y=setTimeout(()=>{d||e(10,b=!0),y=void 0},100);const E=C=>{const _=Object.keys(u);let M=C.target;for(;M;){const X=M.getAttribute("class");if(!X){M=M.parentNode;continue}if(X.includes("PanoSpatialTagPlugin__tag-content")){M=null;break}_.forEach(J=>{X.includes(J)&&u[J](n)}),M=M.parentNode}};Mt(()=>{m.emit("initTag",{id:n})});const k=Dh.subscribe(C=>{if(C===null)return;const[_,M]=C.split("-PanoSpatialTagPlugin-");n===_&&(m.emit("clickOrigin",{id:n,show:b}),y||(e(10,b=d),e(12,d=!d),y=setTimeout(()=>{y=void 0},1500)))});Yd(()=>{e(7,v=A.offsetWidth),e(8,g=A.offsetHeight),!y&&e(10,b=!d)}),hn(()=>{m.emit("destroyTag",{id:n}),k(),h()});function S(C){Ke[C?"unshift":"push"](()=>{A=C,e(9,A)})}return i.$$set=C=>{"id"in C&&e(0,n=C.id),"upsideDown"in C&&e(1,o=C.upsideDown),"content"in C&&e(2,s=C.content),"contentZoom"in C&&e(3,r=C.contentZoom),"lineWidthZoom"in C&&e(4,a=C.lineWidthZoom),"lineHeightZoom"in C&&e(5,l=C.lineHeightZoom),"destroying"in C&&e(6,c=C.destroying),"folded"in C&&e(12,d=C.folded),"dispose"in C&&e(13,h=C.dispose),"events"in C&&e(14,u=C.events),"hooks"in C&&e(15,m=C.hooks)},[n,o,s,r,a,l,c,v,g,A,b,E,d,h,u,m,S]}let l0=class extends ce{constructor(t){super(),le(this,t,a0,r0,ae,{id:0,upsideDown:1,content:2,contentZoom:3,lineWidthZoom:4,lineHeightZoom:5,destroying:6,folded:12,dispose:13,events:14,hooks:15},s0)}};const c0={position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",pointerEvents:"none"},_l="<",Vl=">",jl="%",Ol="locals",d0="(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)",h0={"&":"&amp","<":"&lt",">":"&gt",'"':"&#34","'":"&#39"},ct={EVAL:"eval",ESCAPED:"escaped",RAW:"raw",COMMENT:"comment",LITERAL:"literal"};function Bl(i){return i.replace(/;(\s*$)/,"$1")}function u0(i,t){return new f0(i).compileFunction()(t)}class f0{constructor(t){f(this,"templateText");f(this,"mode",null);f(this,"truncate",!1);f(this,"currentLine",1);f(this,"source","");f(this,"regex",new RegExp(d0));this.templateText=t}compileFunction(){let t;const e=` var __output = "";
517
517
  function __append(s) { if (s !== undefined && s !== null) __output += s }
518
518
  with (`+Ol+` || {}) {
519
519
  `,n=` }
520
520
  return __output;
521
521
  `,o=function(s){return s==null?"":String(s).replace(/[&<>'"]/g,function(r){return h0[r]||r})};return this._generateSource(),this.source=e+this.source+n,t=this.source,t="escapeFn = escapeFn || "+o.toString()+`;
522
- `+t,new Function(Ol+", escapeFn",t)}_generateSource(){this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");const t=this._parseTemplateText(),e=Vl,n=jl,o=_l;t&&t.length&&t.forEach((s,r)=>{let a;if(s.indexOf(n+e)===0&&s.indexOf(n+e+e)!==0&&(a=t[r+2],!(a==e+o||a=="-"+e+o||a=="_"+e+o)))throw new Error('Could not find matching close tag for "'+s+'".');this._scanLine(s)})}_parseTemplateText(){let t=this.templateText;const e=this.regex;let n=e.exec(t);const o=[];let s;for(;n;)s=n.index,s!==0&&(o.push(t.substring(0,s)),t=t.slice(s)),o.push(n[0]),t=t.slice(n[0].length),n=e.exec(t);return t&&o.push(t),o}_addOutput(t){if(this.truncate&&(t=t.replace(/^(?:\r\n|\r|\n)/,""),this.truncate=!1),!t)return t;t=t.replace(/\\/g,"\\\\"),t=t.replace(/\n/g,"\\n"),t=t.replace(/\r/g,"\\r"),t=t.replace(/"/g,'\\"'),this.source+=' ; __append("'+t+`")
523
- `}_scanLine(t){const e=Vl,n=jl,o=_l;switch(t.split(`
522
+ `+t,new Function(Ol+", escapeFn",t)}_generateSource(){this.templateText=this.templateText.replace(/[ \t]*<%_/gm,"<%_").replace(/_%>[ \t]*/gm,"_%>");const t=this._parseTemplateText(),e=jl,n=_l,o=Vl;t&&t.length&&t.forEach((s,r)=>{let a;if(s.indexOf(n+e)===0&&s.indexOf(n+e+e)!==0&&(a=t[r+2],!(a==e+o||a=="-"+e+o||a=="_"+e+o)))throw new Error('Could not find matching close tag for "'+s+'".');this._scanLine(s)})}_parseTemplateText(){let t=this.templateText;const e=this.regex;let n=e.exec(t);const o=[];let s;for(;n;)s=n.index,s!==0&&(o.push(t.substring(0,s)),t=t.slice(s)),o.push(n[0]),t=t.slice(n[0].length),n=e.exec(t);return t&&o.push(t),o}_addOutput(t){if(this.truncate&&(t=t.replace(/^(?:\r\n|\r|\n)/,""),this.truncate=!1),!t)return t;t=t.replace(/\\/g,"\\\\"),t=t.replace(/\n/g,"\\n"),t=t.replace(/\r/g,"\\r"),t=t.replace(/"/g,'\\"'),this.source+=' ; __append("'+t+`")
523
+ `}_scanLine(t){const e=jl,n=_l,o=Vl;switch(t.split(`
524
524
  `).length-1,t){case n+e:case n+e+"_":this.mode=ct.EVAL;break;case n+e+"=":this.mode=ct.ESCAPED;break;case n+e+"-":this.mode=ct.RAW;break;case n+e+"#":this.mode=ct.COMMENT;break;case n+e+e:this.mode=ct.LITERAL,this.source+=' ; __append("'+t.replace(n+e+e,n+e)+`")
525
525
  `;break;case e+e+o:this.mode=ct.LITERAL,this.source+=' ; __append("'+t.replace(e+e+o,e+o)+`")
526
526
  `;break;case e+o:case"-"+e+o:case"_"+e+o:this.mode==ct.LITERAL&&this._addOutput(t),this.mode=null,this.truncate=t.indexOf("-")===0||t.indexOf("_")===0;break;default:if(this.mode){switch(this.mode){case ct.EVAL:case ct.ESCAPED:case ct.RAW:t.lastIndexOf("//")>t.lastIndexOf(`
@@ -528,27 +528,27 @@ void main() {
528
528
  `)}switch(this.mode){case ct.EVAL:this.source+=" ; "+t+`
529
529
  `;break;case ct.ESCAPED:this.source+=" ; __append(escapeFn("+Bl(t)+`))
530
530
  `;break;case ct.RAW:this.source+=" ; __append("+Bl(t)+`)
531
- `;break;case ct.COMMENT:break;case ct.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const Ar=.001,Rl=.01,m0="https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",p0=(i,t)=>{var re,oe,Ae,we,ge,_e,ve,Ge;let e=t==null?void 0:t.container,n=1.4;const o=(re=t==null?void 0:t.wait)!=null?re:200,s=(oe=t==null?void 0:t.maxNumberOnScreen)!=null?oe:3,r=(Ae=t==null?void 0:t.minRad)!=null?Ae:Math.PI/4,a=(we=t==null?void 0:t.nearTolerance)!=null?we:100,l=(ge=t==null?void 0:t.upsideHeight)!=null?ge:1.6,c=(_e=t==null?void 0:t.minDistance)!=null?_e:1.2,d=(ve=t==null?void 0:t.maxDistance)!=null?ve:3.5,h=as(i),u=document.createElement("div");u.classList.add("PanoSpatialTagPlugin"),Object.assign(u.style,c0);const m=new ze.Subscribe;let v=new Image;v.src=m0;const g={points:[],origins:[],tags:[],template:"",events:{},render:u0,folded:!1,enabled:!0,forbidden:!0},A=new o0({target:u,props:{origins:g.origins}}),b=(ue,be)=>{S(),be&&C()},y=()=>{g.forbidden&&(g.forbidden=!1,C())},E=(ue,be)=>{if(g.tags.length===0)return;const Se=be.longitude-i.state.longitude,me=i.camera.clone();me.position.copy(be.offset),me.rotateOnWorldAxis(new I.Vector3(0,1,0),Se),me.updateProjectionMatrix(),me.updateMatrixWorld(!0);const Ue=new I.Frustum,at=new I.Matrix4;at.multiplyMatrices(me.projectionMatrix,me.matrixWorldInverse),Ue.setFromProjectionMatrix(at),g.tags.forEach(ke=>{const $e=me.position.clone().setY(n).distanceTo(ke.position);if($e<c||$e>d||!Ue.containsPoint(ke.position))return ke.destroying=!0;const se=ke.position.clone().sub(me.position).setY(0);if(se.angleTo(ke.normal)>Math.PI/2-r&&se.angleTo(ke.normal)<Math.PI/2+r)return ke.destroying=!0}),g.tags.forEach(ke=>{ke.destroying?ke.app.$set({contentZoom:.1+me.position.distanceTo(ke.position)/d,lineWidthZoom:.38*(.01+me.position.distanceTo(ke.position)/d),destroying:ke.destroying}):ke.app.$set({lineWidthZoom:.38*(.01+me.position.distanceTo(ke.position)/d),lineHeightZoom:.4+(me.position.distanceTo(ke.position)-c)/d*.6,contentZoom:.1+me.position.distanceTo(ke.position)/d})}),setTimeout(()=>{g.tags.forEach(ke=>{ke.destroying&&(ke.app.$destroy(),ke=null)}),g.tags=g.tags.filter(ke=>!ke.destroying),S()},1900)},k=ue=>{ue!==ze.Five.Mode.Panorama&&!g.forbidden&&(A.$set({origins:[]}),g.tags.forEach(be=>{be.app.$destroy(),be=null}),g.origins=[],g.tags=[],g.forbidden=!0)},S=()=>{if(g.forbidden||!g.enabled)return;const ue=i.camera,be=ue.getWorldDirection(new I.Vector3);g.origins=g.tags.map(Se=>{const me=Se.position.clone().project(ue),Ue=Se.position.clone().sub(ue.position).setY(0).angleTo(be.setY(0))<Math.PI/2;return{id:Se.id,front:Ue,left:(me.x+1)/2*100,top:(-me.y+1)/2*100,destroying:Se.destroying}}),A.$set({origins:g.origins})},C=()=>{g.forbidden||!g.enabled||(g.timeoutId&&clearTimeout(g.timeoutId),g.timeoutId=setTimeout(()=>{g.timeoutId=void 0;const ue=j();ue.length&&(g.tags=g.tags.concat(ue),S())},o))},j=()=>{const{clientWidth:ue,clientHeight:be}=i.getElement(),Se=[],me=i.camera,Ue=new I.Frustum,at=new I.Matrix4,ke=me.getWorldDirection(new I.Vector3);at.multiplyMatrices(me.projectionMatrix,me.matrixWorldInverse),Ue.setFromProjectionMatrix(at);const $e=g.tags.filter(Ie=>Ue.containsPoint(Ie.position)&&!Ie.destroying).length,se=g.points.reduce((Ie,Qe)=>{if(g.tags.find(Re=>Qe.id===Re.id&&!Re.destroying))return Ie;const ht=me.position.clone().setY(n).distanceTo(Qe.position);if(ht<c||ht>d||!Ue.containsPoint(Qe.position))return Ie;const Qt=Qe.position.clone().sub(me.position).setY(0);if(Qt.angleTo(Qe.normal)>Math.PI/2-r&&Qt.angleTo(Qe.normal)<Math.PI/2+r)return Ie;const gt=Qe.position.clone().project(me);if(!g.tags.every(Re=>{if(Re.position.clone().sub(me.position).setY(0).angleTo(ke.setY(0))>Math.PI/2)return!0;const Xe=Re.position.clone().project(me);return Math.sqrt(Math.pow((gt.x-Xe.x)/2*ue,2)+Math.pow((gt.y-Xe.y)/2*be,2))>a}))return Ie;const vt={id:Qe.id,position:Qe.position,normal:Qe.normal,replacement:Qe.replacement,weight:Qe.weight,distance:ht};let Ve;for(let Re=0,Xe=Ie.length;Re<Xe;Re++){const Pt=Ie[Re];if(vt.weight>Pt.weight){Ve=Re;break}if(vt.distance<Pt.distance){Ve=Re;break}}return Ve!==void 0?Ie.splice(Ve,0,vt):Ie.push(vt),Ie},[]);for(let Ie=0,Qe=se.length;Ie<Qe&&!($e+Se.length>=s);Ie++){const ht=se[Ie];if(Se.find(Ve=>ht.id===Ve.id))continue;const Qt=ht.position.clone().project(me);if(!g.tags.concat(Se).every(Ve=>{if(Ve.position.clone().sub(me.position).setY(0).angleTo(ke.setY(0))>Math.PI/2)return!0;const Re=Ve.position.clone().project(me);return Math.sqrt(Math.pow((Qt.x-Re.x)/2*ue,2)+Math.pow((Qt.y-Re.y)/2*be,2))>a}))continue;const gt=new I.Raycaster(me.position.clone().setY(n),ht.position.clone().sub(me.position.clone().setY(n)).normalize(),0,ht.distance+Rl),[vt]=g.intersectObjects?gt.intersectObjects(g.intersectObjects,!0):i.model.bvhs.loaded?i.model.intersectRaycaster(gt):gt.intersectObjects(i.model.children,!0);if(vt&&ht.distance-vt.distance<Rl){const{position:Ve,normal:Re,id:Xe,replacement:Pt}=ht,bi=new I.Plane().setFromNormalAndCoplanarPoint(Re,Ve),Lt=Ve.clone().sub(me.position).cross(new I.Vector3(0,1,0)).setLength(Ar),Jt=[Ve.clone(),Ve.clone().add(Lt),Ve.clone().add(new I.Vector3(0,Ar,0)).add(Lt),Ve.clone().add(new I.Vector3(0,Ar,0))].map(zn=>bi.projectPoint(zn,new I.Vector3)),{container:fn,dispose:ut}=h.create3DDomContainer(Jt)||{},Tn=new l0({target:fn,props:{id:Xe,content:g.render(g.template,Pt),lineWidthZoom:.38*(.01+me.position.distanceTo(Ve)/d),lineHeightZoom:.4+(me.position.distanceTo(Ve)-c)/d*.6,contentZoom:.1+me.position.distanceTo(Ve)/d,upsideDown:Ve.y>l,folded:g.folded,events:g.events,hooks:m,dispose:ut}});Se.push({position:Ve,normal:Re,id:Xe,app:Tn})}}return Se},M=ue=>{g.points=ue.points.map(be=>{var Se,me;return{id:be.id,position:new I.Vector3().fromArray(be.position),normal:new I.Vector3().fromArray(be.normal),replacement:(Se=be.replacement)!=null?Se:{},weight:(me=be.weight)!=null?me:-1}}),ue.render&&(g.render=ue.render),ue.template&&(g.template=ue.template),ue.events&&(g.events=ue.events),ue.enabled===!1&&(g.enabled=ue.enabled),ue.folded===!0&&(g.folded=ue.folded)},X=ue=>{g.intersectObjects=ue,C()},J=()=>{g.enabled=!0,C()},H=()=>{g.enabled=!1,A.$set({origins:[]}),g.tags.forEach(ue=>{ue.app.$destroy(),ue=null}),g.origins=[],g.tags=[]},Q=()=>{g.folded=!1,g.tags.forEach(ue=>{ue.app.$set({folded:g.folded})})},G=()=>{g.folded=!0,g.tags.forEach(ue=>{ue.app.$set({folded:g.folded})})},B=ue=>{g.tags.forEach(be=>{be.id===ue&&be.app.$set({folded:!1})})},W=ue=>{g.tags.forEach(be=>{be.id===ue&&be.app.$set({folded:!0})})},q=()=>{i.once("renderFrame",S)},U=()=>{e||(e=i.getElement().parentElement),e&&e.appendChild(u),g.forbidden=!1,n=i.model.bounding.getCenter(new I.Vector3).y,C(),i.on("panoWillArrive",E),i.on("panoArrived",y),i.on("modeChange",k),i.on("cameraUpdate",b)},Z=()=>{v=null,h.disposeAll(),A.$destroy(),g.tags.forEach(ue=>{ue.app.$destroy(),ue=null}),g.origins=[],g.tags=[],i.off("modelLoaded",U),i.off("renderFrame",S),i.off("panoWillArrive",E),i.off("panoArrived",y),i.off("modeChange",k),i.off("cameraUpdate",b),i.off("dispose",Z),window.removeEventListener("resize",q,!1)};return window.addEventListener("resize",q,!1),(Ge=i==null?void 0:i.model)!=null&&Ge.loaded?U():i.once("modelLoaded",U),i.on("dispose",Z),{load:M,setIntersectObjects:X,unfoldAll:Q,foldAll:G,unfold:B,fold:W,enable:J,disable:H,hooks:m,dispose:Z}};var Pn=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Pn||{}),yt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Wr={},g0={get exports(){return Wr},set exports(i){Wr=i}};/*!
531
+ `;break;case ct.COMMENT:break;case ct.LITERAL:this._addOutput(t);break}}else this._addOutput(t)}}}const Ar=.001,Rl=.01,m0="https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png",p0=(i,t)=>{var re,oe,Ae,we,ge,Ve,ve,Ge;let e=t==null?void 0:t.container,n=1.4;const o=(re=t==null?void 0:t.wait)!=null?re:200,s=(oe=t==null?void 0:t.maxNumberOnScreen)!=null?oe:3,r=(Ae=t==null?void 0:t.minRad)!=null?Ae:Math.PI/4,a=(we=t==null?void 0:t.nearTolerance)!=null?we:100,l=(ge=t==null?void 0:t.upsideHeight)!=null?ge:1.6,c=(Ve=t==null?void 0:t.minDistance)!=null?Ve:1.2,d=(ve=t==null?void 0:t.maxDistance)!=null?ve:3.5,h=as(i),u=document.createElement("div");u.classList.add("PanoSpatialTagPlugin"),Object.assign(u.style,c0);const m=new ze.Subscribe;let v=new Image;v.src=m0;const g={points:[],origins:[],tags:[],template:"",events:{},render:u0,folded:!1,enabled:!0,forbidden:!0},A=new o0({target:u,props:{origins:g.origins}}),b=(ue,be)=>{S(),be&&C()},y=()=>{g.forbidden&&(g.forbidden=!1,C())},E=(ue,be)=>{if(g.tags.length===0)return;const Se=be.longitude-i.state.longitude,me=i.camera.clone();me.position.copy(be.offset),me.rotateOnWorldAxis(new I.Vector3(0,1,0),Se),me.updateProjectionMatrix(),me.updateMatrixWorld(!0);const Ue=new I.Frustum,at=new I.Matrix4;at.multiplyMatrices(me.projectionMatrix,me.matrixWorldInverse),Ue.setFromProjectionMatrix(at),g.tags.forEach(ke=>{const $e=me.position.clone().setY(n).distanceTo(ke.position);if($e<c||$e>d||!Ue.containsPoint(ke.position))return ke.destroying=!0;const se=ke.position.clone().sub(me.position).setY(0);if(se.angleTo(ke.normal)>Math.PI/2-r&&se.angleTo(ke.normal)<Math.PI/2+r)return ke.destroying=!0}),g.tags.forEach(ke=>{ke.destroying?ke.app.$set({contentZoom:.1+me.position.distanceTo(ke.position)/d,lineWidthZoom:.38*(.01+me.position.distanceTo(ke.position)/d),destroying:ke.destroying}):ke.app.$set({lineWidthZoom:.38*(.01+me.position.distanceTo(ke.position)/d),lineHeightZoom:.4+(me.position.distanceTo(ke.position)-c)/d*.6,contentZoom:.1+me.position.distanceTo(ke.position)/d})}),setTimeout(()=>{g.tags.forEach(ke=>{ke.destroying&&(ke.app.$destroy(),ke=null)}),g.tags=g.tags.filter(ke=>!ke.destroying),S()},1900)},k=ue=>{ue!==ze.Five.Mode.Panorama&&!g.forbidden&&(A.$set({origins:[]}),g.tags.forEach(be=>{be.app.$destroy(),be=null}),g.origins=[],g.tags=[],g.forbidden=!0)},S=()=>{if(g.forbidden||!g.enabled)return;const ue=i.camera,be=ue.getWorldDirection(new I.Vector3);g.origins=g.tags.map(Se=>{const me=Se.position.clone().project(ue),Ue=Se.position.clone().sub(ue.position).setY(0).angleTo(be.setY(0))<Math.PI/2;return{id:Se.id,front:Ue,left:(me.x+1)/2*100,top:(-me.y+1)/2*100,destroying:Se.destroying}}),A.$set({origins:g.origins})},C=()=>{g.forbidden||!g.enabled||(g.timeoutId&&clearTimeout(g.timeoutId),g.timeoutId=setTimeout(()=>{g.timeoutId=void 0;const ue=_();ue.length&&(g.tags=g.tags.concat(ue),S())},o))},_=()=>{const{clientWidth:ue,clientHeight:be}=i.getElement(),Se=[],me=i.camera,Ue=new I.Frustum,at=new I.Matrix4,ke=me.getWorldDirection(new I.Vector3);at.multiplyMatrices(me.projectionMatrix,me.matrixWorldInverse),Ue.setFromProjectionMatrix(at);const $e=g.tags.filter(Ie=>Ue.containsPoint(Ie.position)&&!Ie.destroying).length,se=g.points.reduce((Ie,Qe)=>{if(g.tags.find(Re=>Qe.id===Re.id&&!Re.destroying))return Ie;const ht=me.position.clone().setY(n).distanceTo(Qe.position);if(ht<c||ht>d||!Ue.containsPoint(Qe.position))return Ie;const Qt=Qe.position.clone().sub(me.position).setY(0);if(Qt.angleTo(Qe.normal)>Math.PI/2-r&&Qt.angleTo(Qe.normal)<Math.PI/2+r)return Ie;const gt=Qe.position.clone().project(me);if(!g.tags.every(Re=>{if(Re.position.clone().sub(me.position).setY(0).angleTo(ke.setY(0))>Math.PI/2)return!0;const Xe=Re.position.clone().project(me);return Math.sqrt(Math.pow((gt.x-Xe.x)/2*ue,2)+Math.pow((gt.y-Xe.y)/2*be,2))>a}))return Ie;const vt={id:Qe.id,position:Qe.position,normal:Qe.normal,replacement:Qe.replacement,weight:Qe.weight,distance:ht};let je;for(let Re=0,Xe=Ie.length;Re<Xe;Re++){const Pt=Ie[Re];if(vt.weight>Pt.weight){je=Re;break}if(vt.distance<Pt.distance){je=Re;break}}return je!==void 0?Ie.splice(je,0,vt):Ie.push(vt),Ie},[]);for(let Ie=0,Qe=se.length;Ie<Qe&&!($e+Se.length>=s);Ie++){const ht=se[Ie];if(Se.find(je=>ht.id===je.id))continue;const Qt=ht.position.clone().project(me);if(!g.tags.concat(Se).every(je=>{if(je.position.clone().sub(me.position).setY(0).angleTo(ke.setY(0))>Math.PI/2)return!0;const Re=je.position.clone().project(me);return Math.sqrt(Math.pow((Qt.x-Re.x)/2*ue,2)+Math.pow((Qt.y-Re.y)/2*be,2))>a}))continue;const gt=new I.Raycaster(me.position.clone().setY(n),ht.position.clone().sub(me.position.clone().setY(n)).normalize(),0,ht.distance+Rl),[vt]=g.intersectObjects?gt.intersectObjects(g.intersectObjects,!0):i.model.bvhs.loaded?i.model.intersectRaycaster(gt):gt.intersectObjects(i.model.children,!0);if(vt&&ht.distance-vt.distance<Rl){const{position:je,normal:Re,id:Xe,replacement:Pt}=ht,bi=new I.Plane().setFromNormalAndCoplanarPoint(Re,je),Lt=je.clone().sub(me.position).cross(new I.Vector3(0,1,0)).setLength(Ar),Jt=[je.clone(),je.clone().add(Lt),je.clone().add(new I.Vector3(0,Ar,0)).add(Lt),je.clone().add(new I.Vector3(0,Ar,0))].map(zn=>bi.projectPoint(zn,new I.Vector3)),{container:fn,dispose:ut}=h.create3DDomContainer(Jt)||{},Tn=new l0({target:fn,props:{id:Xe,content:g.render(g.template,Pt),lineWidthZoom:.38*(.01+me.position.distanceTo(je)/d),lineHeightZoom:.4+(me.position.distanceTo(je)-c)/d*.6,contentZoom:.1+me.position.distanceTo(je)/d,upsideDown:je.y>l,folded:g.folded,events:g.events,hooks:m,dispose:ut}});Se.push({position:je,normal:Re,id:Xe,app:Tn})}}return Se},M=ue=>{g.points=ue.points.map(be=>{var Se,me;return{id:be.id,position:new I.Vector3().fromArray(be.position),normal:new I.Vector3().fromArray(be.normal),replacement:(Se=be.replacement)!=null?Se:{},weight:(me=be.weight)!=null?me:-1}}),ue.render&&(g.render=ue.render),ue.template&&(g.template=ue.template),ue.events&&(g.events=ue.events),ue.enabled===!1&&(g.enabled=ue.enabled),ue.folded===!0&&(g.folded=ue.folded)},X=ue=>{g.intersectObjects=ue,C()},J=()=>{g.enabled=!0,C()},H=()=>{g.enabled=!1,A.$set({origins:[]}),g.tags.forEach(ue=>{ue.app.$destroy(),ue=null}),g.origins=[],g.tags=[]},Q=()=>{g.folded=!1,g.tags.forEach(ue=>{ue.app.$set({folded:g.folded})})},G=()=>{g.folded=!0,g.tags.forEach(ue=>{ue.app.$set({folded:g.folded})})},B=ue=>{g.tags.forEach(be=>{be.id===ue&&be.app.$set({folded:!1})})},W=ue=>{g.tags.forEach(be=>{be.id===ue&&be.app.$set({folded:!0})})},q=()=>{i.once("renderFrame",S)},U=()=>{e||(e=i.getElement().parentElement),e&&e.appendChild(u),g.forbidden=!1,n=i.model.bounding.getCenter(new I.Vector3).y,C(),i.on("panoWillArrive",E),i.on("panoArrived",y),i.on("modeChange",k),i.on("cameraUpdate",b)},Z=()=>{v=null,h.disposeAll(),A.$destroy(),g.tags.forEach(ue=>{ue.app.$destroy(),ue=null}),g.origins=[],g.tags=[],i.off("modelLoaded",U),i.off("renderFrame",S),i.off("panoWillArrive",E),i.off("panoArrived",y),i.off("modeChange",k),i.off("cameraUpdate",b),i.off("dispose",Z),window.removeEventListener("resize",q,!1)};return window.addEventListener("resize",q,!1),(Ge=i==null?void 0:i.model)!=null&&Ge.loaded?U():i.once("modelLoaded",U),i.on("dispose",Z),{load:M,setIntersectObjects:X,unfoldAll:Q,foldAll:G,unfold:B,fold:W,enable:J,disable:H,hooks:m,dispose:Z}};var Pn=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Pn||{}),yt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Wr={},g0={get exports(){return Wr},set exports(i){Wr=i}};/*!
532
532
  Copyright (c) 2018 Jed Watson.
533
533
  Licensed under the MIT License (MIT), see
534
534
  http://jedwatson.github.io/classnames
535
- */(function(i){(function(){var t={}.hasOwnProperty;function e(){for(var n=[],o=0;o<arguments.length;o++){var s=arguments[o];if(s){var r=typeof s;if(r==="string"||r==="number")n.push(s);else if(Array.isArray(s)){if(s.length){var a=e.apply(null,s);a&&n.push(a)}}else if(r==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){n.push(s.toString());continue}for(var l in s)t.call(s,l)&&s[l]&&n.push(l)}}}return n.join(" ")}i.exports?(e.default=e,i.exports=e):window.classNames=e})()})(g0);const it=Wr;function v0(i){fe(i,"svelte-1wufped",".item-label-item.svelte-1wufped{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:0}.item-label-item.visible.svelte-1wufped{opacity:1;animation:svelte-1wufped-fadeIn 0.3s ease-in}.item-label-item__text-wrap.svelte-1wufped::before{content:'';position:absolute;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.3);filter:blur(1rem);z-index:-1}.item-label-item__text-wrap.svelte-1wufped{padding:0.375rem 0.375rem 0;position:absolute;height:1.25rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap;line-height:0.625rem;font-size:0.6875rem;font-weight:bold;color:#ffeac0;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center}.item-label-item__text.svelte-1wufped{padding-bottom:0.25rem;border-top:0 solid;border-left:0 solid;border-right:0 solid;border-bottom:0.0625rem solid;-o-border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5;border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5}.item-label-item__bar.svelte-1wufped{position:absolute;bottom:0;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(234, 208, 154, 0), rgba(234, 208, 154, 1))}@keyframes svelte-1wufped-fadeIn{from{opacity:0}to{opacity:1}}")}function A0(i){let t,e,n,o=(i[0].name.length>6?`${i[0].name.slice(0,6)}...`:i[0].name)+"",s,r,a,l,c,d;return{c(){t=z("div"),e=z("div"),n=z("span"),s=je(o),r=ne(),a=z("div"),w(n,"class","item-label-item__text svelte-1wufped"),w(e,"class","item-label-item__text-wrap svelte-1wufped"),T(e,"top",`-${i[0].strokeLength+26}px`),w(a,"class","item-label-item__bar svelte-1wufped"),T(a,"height",`${i[0].strokeLength}px`),w(t,"class",l=Be(it("item-label-item",{visible:i[0].visible}))+" svelte-1wufped"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform)},m(h,u){V(h,t,u),O(t,e),O(e,n),O(n,s),O(t,r),O(t,a),c||(d=Ce(n,"click",i[1]),c=!0)},p(h,[u]){u&1&&o!==(o=(h[0].name.length>6?`${h[0].name.slice(0,6)}...`:h[0].name)+"")&&Oe(s,o),u&1&&T(e,"top",`-${h[0].strokeLength+26}px`),u&1&&T(a,"height",`${h[0].strokeLength}px`),u&1&&l!==(l=Be(it("item-label-item",{visible:h[0].visible}))+" svelte-1wufped")&&w(t,"class",l),u&1&&T(t,"z-index",h[0].zIndex),u&1&&T(t,"transform",h[0].transform)},i:K,o:K,d(h){h&&_(t),c=!1,d()}}}function b0(i,t,e){let{itemLabel:n}=t,{hooks:o}=t;function s(){o.emit("onLabelClick",n)}return i.$$set=r=>{"itemLabel"in r&&e(0,n=r.itemLabel),"hooks"in r&&e(2,o=r.hooks)},[n,s,o]}let y0=class extends ce{constructor(t){super(),le(this,t,b0,A0,ae,{itemLabel:0,hooks:2},v0)}};function Mh(i,t=200){let e;return function(...n){clearTimeout(e),e=setTimeout(()=>{i(...n)},t)}}function w0(i){fe(i,"svelte-f82itz",".item-labels-container.svelte-f82itz{width:100%;height:100%;position:relative}")}function Ql(i,t,e){const n=i.slice();return n[26]=t[e],n}function Hl(i,t){let e,n,o;return n=new y0({props:{itemLabel:t[26],hooks:t[0]}}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(s,r){V(s,e,r),ee(n,s,r),o=!0},p(s,r){t=s;const a={};r&2&&(a.itemLabel=t[26]),r&1&&(a.hooks=t[0]),n.$set(a)},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){L(n.$$.fragment,s),o=!1},d(s){s&&_(e),te(n,s)}}}function P0(i){let t,e=[],n=new Map,o,s,r=i[1];const a=l=>l[26].id;for(let l=0;l<r.length;l+=1){let c=Ql(i,r,l),d=a(c);n.set(d,e[l]=Hl(d,c))}return{c(){t=z("div");for(let l=0;l<e.length;l+=1)e[l].c();w(t,"class","item-labels-container svelte-f82itz"),ot(()=>i[9].call(t)),T(t,"opacity",i[4]?1:0)},m(l,c){V(l,t,c);for(let d=0;d<e.length;d+=1)e[d]&&e[d].m(t,null);o=ls(t,i[9].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[1],de(),e=St(e,c,a,1,l,r,n,t,un,Hl,null,Ql),he()),c&16&&T(t,"opacity",l[4]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)x(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)L(e[c]);s=!1},d(l){l&&_(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let Gl=26,C0=11;function E0(i,t,e){const{Raycaster:n,Vector3:o}=I;let{five:s}=t,{modelOcclusionEnable:r}=t,{itemLabels:a}=t,{hooks:l}=t,{displayStrategyType:c}=t,d=null,h=null,u,m,v=[],g=!0;const A=(G,B)=>{const W=new n,q=G.camera.position.clone(),U=new o().fromArray(B.modelPosition),Z=U.distanceTo(q);W.set(q.clone(),U.clone().sub(q).normalize());const[re]=G.model.intersectRaycaster(W);return!(re&&re.distance+1<Z)},b=(G,B)=>{const W=new o(B.modelPosition[0],B.modelPosition[1],B.modelPosition[2]),q=G.project2d(W),U=q==null?void 0:q.x,Z=q==null?void 0:q.y;return[U,Z]},y=G=>`translate(${G[0]}px, ${G[1]}px)`,E=(G,B)=>v.length===0?!1:!!v.find(q=>G[0]>=q[0]-B&&G[0]<=q[0]+B||G[1]>=q[1]-Gl&&G[1]<=q[1]+Gl);function k(G,B){switch(B){case Pn.SMALL:return Math.ceil(-27.78*G+85);case Pn.MIDLLE:return Math.ceil(-38.9*G+130);case Pn.LARGE:return Math.ceil(-44.44*G+140);case Pn.EXTRA_LARGE:return Math.ceil(-92.59*G+300)}}const S=(G,B)=>{const W=B.map(U=>{const Z=b(G,U),re=U.name.length*C0,oe=k(U.modelPosition[1],c),we=(r?A(G,U):!0)&&!E([Z[0],Z[1]+oe],re);if(!we)return ye(F({},U),{visible:we});v.push(Z);const ge=y(Z);return ye(F({},U),{visible:we,transform:ge,strokeLength:oe})}),q=W.filter(({visible:U})=>U).map(U=>({itemLabelItem:U,distance:new o(U.modelPosition[0],U.modelPosition[1],U.modelPosition[2]).clone().distanceTo(G.camera.position)})).sort((U,Z)=>U.distance-Z.distance);return W.map(U=>{const Z=q.findIndex(re=>re.itemLabelItem.id===U.id);return Z!==void 0?ye(F({},U),{zIndex:Z*10}):U})},C=()=>{v=[],e(1,h=S(s,h))};Xd(()=>{J()});const j=()=>{e(4,g=!1),M()};Mt(()=>{e(1,h=a),d=a,C(),X(),s.on("cameraUpdate",j)});const M=Mh(()=>{e(4,g=!0),C()},300),X=()=>{window.addEventListener("resize",H,!1)},J=()=>{d!==a&&(e(1,h=a),d=a,C())},H=()=>{s.once("renderFrame",C)};hn(()=>{s.off("cameraUpdate",j),window.removeEventListener("resize",H,!1)});function Q(){u=this.clientWidth,m=this.clientHeight,e(2,u),e(3,m)}return i.$$set=G=>{"five"in G&&e(5,s=G.five),"modelOcclusionEnable"in G&&e(6,r=G.modelOcclusionEnable),"itemLabels"in G&&e(7,a=G.itemLabels),"hooks"in G&&e(0,l=G.hooks),"displayStrategyType"in G&&e(8,c=G.displayStrategyType)},[l,h,u,m,g,s,r,a,c,Q]}let I0=class extends ce{constructor(t){super(),le(this,t,E0,P0,ae,{five:5,modelOcclusionEnable:6,itemLabels:7,hooks:0,displayStrategyType:8},w0)}};function k0(i){return i.model_item_labels.map(t=>F({modelPosition:[t.position[0],t.position[1]+t.size[1],t.position[2]]},t))}const x0=(i,t)=>{var u,m;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:void 0,itemLabels:[],wrapper:null,app:void 0,hooks:new ze.Subscribe,modelOcclusionEnable:(u=t==null?void 0:t.modelOcclusionEnable)!=null?u:!0,displayStrategyType:(m=t==null?void 0:t.displayStrategyType)!=null?m:Pn.SMALL};e.container.setAttribute("class","model-item-label-plugin-container"),e.container.style.cssText=`
535
+ */(function(i){(function(){var t={}.hasOwnProperty;function e(){for(var n=[],o=0;o<arguments.length;o++){var s=arguments[o];if(s){var r=typeof s;if(r==="string"||r==="number")n.push(s);else if(Array.isArray(s)){if(s.length){var a=e.apply(null,s);a&&n.push(a)}}else if(r==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){n.push(s.toString());continue}for(var l in s)t.call(s,l)&&s[l]&&n.push(l)}}}return n.join(" ")}i.exports?(e.default=e,i.exports=e):window.classNames=e})()})(g0);const it=Wr;function v0(i){fe(i,"svelte-1wufped",".item-label-item.svelte-1wufped{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:0}.item-label-item.visible.svelte-1wufped{opacity:1;animation:svelte-1wufped-fadeIn 0.3s ease-in}.item-label-item__text-wrap.svelte-1wufped::before{content:'';position:absolute;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.3);filter:blur(1rem);z-index:-1}.item-label-item__text-wrap.svelte-1wufped{padding:0.375rem 0.375rem 0;position:absolute;height:1.25rem;pointer-events:all;background-size:100% 100%;background-repeat:no-repeat;white-space:nowrap;line-height:0.625rem;font-size:0.6875rem;font-weight:bold;color:#ffeac0;transform:translate(-50%, 0);display:flex;justify-content:center;align-items:center}.item-label-item__text.svelte-1wufped{padding-bottom:0.25rem;border-top:0 solid;border-left:0 solid;border-right:0 solid;border-bottom:0.0625rem solid;-o-border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5;border-image:linear-gradient(to right, rgba(234, 208, 154, 0), rgba(234, 208, 154, 100), rgba(234, 208, 154, 0)) 4.5 1 4.5}.item-label-item__bar.svelte-1wufped{position:absolute;bottom:0;width:0.0625rem;background-image:linear-gradient(to bottom, rgba(234, 208, 154, 0), rgba(234, 208, 154, 1))}@keyframes svelte-1wufped-fadeIn{from{opacity:0}to{opacity:1}}")}function A0(i){let t,e,n,o=(i[0].name.length>6?`${i[0].name.slice(0,6)}...`:i[0].name)+"",s,r,a,l,c,d;return{c(){t=z("div"),e=z("div"),n=z("span"),s=_e(o),r=ne(),a=z("div"),w(n,"class","item-label-item__text svelte-1wufped"),w(e,"class","item-label-item__text-wrap svelte-1wufped"),T(e,"top",`-${i[0].strokeLength+26}px`),w(a,"class","item-label-item__bar svelte-1wufped"),T(a,"height",`${i[0].strokeLength}px`),w(t,"class",l=Be(it("item-label-item",{visible:i[0].visible}))+" svelte-1wufped"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform)},m(h,u){j(h,t,u),O(t,e),O(e,n),O(n,s),O(t,r),O(t,a),c||(d=Ce(n,"click",i[1]),c=!0)},p(h,[u]){u&1&&o!==(o=(h[0].name.length>6?`${h[0].name.slice(0,6)}...`:h[0].name)+"")&&Oe(s,o),u&1&&T(e,"top",`-${h[0].strokeLength+26}px`),u&1&&T(a,"height",`${h[0].strokeLength}px`),u&1&&l!==(l=Be(it("item-label-item",{visible:h[0].visible}))+" svelte-1wufped")&&w(t,"class",l),u&1&&T(t,"z-index",h[0].zIndex),u&1&&T(t,"transform",h[0].transform)},i:K,o:K,d(h){h&&V(t),c=!1,d()}}}function b0(i,t,e){let{itemLabel:n}=t,{hooks:o}=t;function s(){o.emit("onLabelClick",n)}return i.$$set=r=>{"itemLabel"in r&&e(0,n=r.itemLabel),"hooks"in r&&e(2,o=r.hooks)},[n,s,o]}let y0=class extends ce{constructor(t){super(),le(this,t,b0,A0,ae,{itemLabel:0,hooks:2},v0)}};function Mh(i,t=200){let e;return function(...n){clearTimeout(e),e=setTimeout(()=>{i(...n)},t)}}function w0(i){fe(i,"svelte-f82itz",".item-labels-container.svelte-f82itz{width:100%;height:100%;position:relative}")}function Ql(i,t,e){const n=i.slice();return n[26]=t[e],n}function Hl(i,t){let e,n,o;return n=new y0({props:{itemLabel:t[26],hooks:t[0]}}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(s,r){j(s,e,r),ee(n,s,r),o=!0},p(s,r){t=s;const a={};r&2&&(a.itemLabel=t[26]),r&1&&(a.hooks=t[0]),n.$set(a)},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){L(n.$$.fragment,s),o=!1},d(s){s&&V(e),te(n,s)}}}function P0(i){let t,e=[],n=new Map,o,s,r=i[1];const a=l=>l[26].id;for(let l=0;l<r.length;l+=1){let c=Ql(i,r,l),d=a(c);n.set(d,e[l]=Hl(d,c))}return{c(){t=z("div");for(let l=0;l<e.length;l+=1)e[l].c();w(t,"class","item-labels-container svelte-f82itz"),ot(()=>i[9].call(t)),T(t,"opacity",i[4]?1:0)},m(l,c){j(l,t,c);for(let d=0;d<e.length;d+=1)e[d]&&e[d].m(t,null);o=ls(t,i[9].bind(t)),s=!0},p(l,[c]){c&3&&(r=l[1],de(),e=St(e,c,a,1,l,r,n,t,un,Hl,null,Ql),he()),c&16&&T(t,"opacity",l[4]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)x(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)L(e[c]);s=!1},d(l){l&&V(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let Gl=26,C0=11;function E0(i,t,e){const{Raycaster:n,Vector3:o}=I;let{five:s}=t,{modelOcclusionEnable:r}=t,{itemLabels:a}=t,{hooks:l}=t,{displayStrategyType:c}=t,d=null,h=null,u,m,v=[],g=!0;const A=(G,B)=>{const W=new n,q=G.camera.position.clone(),U=new o().fromArray(B.modelPosition),Z=U.distanceTo(q);W.set(q.clone(),U.clone().sub(q).normalize());const[re]=G.model.intersectRaycaster(W);return!(re&&re.distance+1<Z)},b=(G,B)=>{const W=new o(B.modelPosition[0],B.modelPosition[1],B.modelPosition[2]),q=G.project2d(W),U=q==null?void 0:q.x,Z=q==null?void 0:q.y;return[U,Z]},y=G=>`translate(${G[0]}px, ${G[1]}px)`,E=(G,B)=>v.length===0?!1:!!v.find(q=>G[0]>=q[0]-B&&G[0]<=q[0]+B||G[1]>=q[1]-Gl&&G[1]<=q[1]+Gl);function k(G,B){switch(B){case Pn.SMALL:return Math.ceil(-27.78*G+85);case Pn.MIDLLE:return Math.ceil(-38.9*G+130);case Pn.LARGE:return Math.ceil(-44.44*G+140);case Pn.EXTRA_LARGE:return Math.ceil(-92.59*G+300)}}const S=(G,B)=>{const W=B.map(U=>{const Z=b(G,U),re=U.name.length*C0,oe=k(U.modelPosition[1],c),we=(r?A(G,U):!0)&&!E([Z[0],Z[1]+oe],re);if(!we)return ye(F({},U),{visible:we});v.push(Z);const ge=y(Z);return ye(F({},U),{visible:we,transform:ge,strokeLength:oe})}),q=W.filter(({visible:U})=>U).map(U=>({itemLabelItem:U,distance:new o(U.modelPosition[0],U.modelPosition[1],U.modelPosition[2]).clone().distanceTo(G.camera.position)})).sort((U,Z)=>U.distance-Z.distance);return W.map(U=>{const Z=q.findIndex(re=>re.itemLabelItem.id===U.id);return Z!==void 0?ye(F({},U),{zIndex:Z*10}):U})},C=()=>{v=[],e(1,h=S(s,h))};Xd(()=>{J()});const _=()=>{e(4,g=!1),M()};Mt(()=>{e(1,h=a),d=a,C(),X(),s.on("cameraUpdate",_)});const M=Mh(()=>{e(4,g=!0),C()},300),X=()=>{window.addEventListener("resize",H,!1)},J=()=>{d!==a&&(e(1,h=a),d=a,C())},H=()=>{s.once("renderFrame",C)};hn(()=>{s.off("cameraUpdate",_),window.removeEventListener("resize",H,!1)});function Q(){u=this.clientWidth,m=this.clientHeight,e(2,u),e(3,m)}return i.$$set=G=>{"five"in G&&e(5,s=G.five),"modelOcclusionEnable"in G&&e(6,r=G.modelOcclusionEnable),"itemLabels"in G&&e(7,a=G.itemLabels),"hooks"in G&&e(0,l=G.hooks),"displayStrategyType"in G&&e(8,c=G.displayStrategyType)},[l,h,u,m,g,s,r,a,c,Q]}let I0=class extends ce{constructor(t){super(),le(this,t,E0,P0,ae,{five:5,modelOcclusionEnable:6,itemLabels:7,hooks:0,displayStrategyType:8},w0)}};function k0(i){return i.model_item_labels.map(t=>F({modelPosition:[t.position[0],t.position[1]+t.size[1],t.position[2]]},t))}const x0=(i,t)=>{var u,m;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:void 0,itemLabels:[],wrapper:null,app:void 0,hooks:new ze.Subscribe,modelOcclusionEnable:(u=t==null?void 0:t.modelOcclusionEnable)!=null?u:!0,displayStrategyType:(m=t==null?void 0:t.displayStrategyType)!=null?m:Pn.SMALL};e.container.setAttribute("class","model-item-label-plugin-container"),e.container.style.cssText=`
536
536
  position: absolute;
537
537
  left: 0;
538
538
  top: 0;
539
539
  width: 100%;
540
540
  height: 100%;
541
541
  z-index: 5;
542
- `,e.container.style.pointerEvents="none";const n=v=>(e.wrapper=v,v.appendChild(e.container),l(),!0),o=v=>{e.itemLabels=k0(v),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var v;if(e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(v=e.app)==null||v.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new I0({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,itemLabels:e.itemLabels,hooks:e.hooks,displayStrategyType:e.displayStrategyType}})}},c=()=>{i.on("modeChange",h),i.once("dispose",a)},d=()=>{i.off("modeChange",h)},h=v=>{if(e.enabled){if(v!==ze.Five.Mode.Floorplan){e.fiveModeEnabled=!1,l();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=i.currentMode===ze.Five.Mode.Floorplan,l()})}};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},D0={name:"ModelItemLabelPlugin",version:0};var qn=(i=>(i.TOP_LEFT="topLeft",i.TOP_RIGHT="topRight",i.BOTTOM_LEFT="bottomLeft",i.BOTTOM_RIGHT="bottomRight",i))(qn||{});function M0(i){if(i.length===0)return[];if(Array.isArray(i[0]))return i;let t=[];return i.forEach(e=>{const n=[e[qn.TOP_LEFT],e[qn.BOTTOM_LEFT],e[qn.BOTTOM_RIGHT],e[qn.TOP_RIGHT]];t.push(n)}),t}const S0=(i,{videoElement:t})=>{const e={videoMeshes:[],videoTextureEnabled:!1,videoSource:"",rectPoints:[],enabled:!1,videoElement:t},n=as(i),o=new Map,s=b=>{e.videoTexture&&(e.videoTexture.image.muted=b)},r=()=>e.videoTexture?e.videoTexture.image.muted:!0,a=()=>{if(e.enabled||!e.videoTexture)return;e.enabled=!0,e.videoMeshes=c(),e.videoMeshes.forEach(y=>i.scene.add(y));const b=()=>{if(!e.videoTexture)return;const y=()=>{var E;e.videoTexture&&((E=e.videoTexture)==null||E.image.removeEventListener("timeupdate",y),e.videoTextureEnabled=!0,e.videoMeshes.forEach(k=>{k.material.map!==e.videoTexture&&(k.material.map=e.videoTexture)}),i.needsRender=!0)};e.videoTexture.image.addEventListener("timeupdate",y),e.videoTexture&&e.videoMeshes.length&&(e.videoTexture.image.play(),e.videoTexture.image.onplay=()=>{n.hide()},e.videoTexture.image.onpause=()=>{n.show()},e.videoTexture.image.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()})};if(i.model.loaded)b();else return i.once("modelLoaded",()=>b())},l=()=>{e.enabled&&(e.enabled=!1,e.videoMeshes.forEach(b=>{b.geometry.dispose(),b.material.dispose(),i.scene.remove(b),e.videoTexture&&e.videoTexture.image.pause()}),e.videoMeshes=[],i.needsRender=!0)},c=()=>e.rectPoints.map((b,y)=>{const E=new I.BufferGeometry,k=128,S=[];S.push(...b[0].toArray());for(let Q=1;Q<k;Q++)S.push(b[0].x+(b[1].x-b[0].x)*Q/k,b[0].y+(b[1].y-b[0].y)*Q/k,b[0].z+(b[1].z-b[0].z)*Q/k);S.push(...b[1].toArray()),S.push(...b[2].toArray());for(let Q=1;Q<k;Q++)S.push(b[2].x+(b[3].x-b[2].x)*Q/k,b[2].y+(b[3].y-b[2].y)*Q/k,b[2].z+(b[3].z-b[2].z)*Q/k);S.push(...b[3].toArray());const C=[];C.push(0,1);for(let Q=1;Q<k;Q++)C.push(0,1-Q/k);C.push(0,0),C.push(1,0);for(let Q=1;Q<k;Q++)C.push(1,Q/k);C.push(1,1);const j=[];for(let Q=0;Q<k;Q++)j.push(Q,Q+1,k*2-Q,Q,k*2-Q,k*2+1-Q);E.setAttribute("position",new I.BufferAttribute(new Float32Array(S),3)),E.setAttribute("uv",new I.BufferAttribute(new Float32Array(C),2)),E.setIndex(new I.BufferAttribute(new Uint32Array(j),1));const M=new I.MeshBasicMaterial({map:e.videoTextureEnabled?e.videoTexture:e.imageTexture,side:I.DoubleSide}),X=new I.Mesh(E,M);X.renderOrder=1,X.name=`ModelTVVideoPlugin-${y}-${performance.now()}`;const J=[b[1],b[2],b[3],b[0]],H=n.create3DDomContainer(J);if(H!=null&&H.container){const Q=document.createElement("div");Q.classList.add("play-icon"),Q.style.width="100%",Q.style.height="100%",Q.style.display="flex",Q.style.justifyContent="center",Q.style.alignItems="center",Q.style.pointerEvents="none",H.container.appendChild(Q);const G=document.createElement("img");G.src="//vrlab-static.ljcdn.com/release/web/play.2ada5b6f.png",G.style.width="200px",G.style.pointerEvents="auto",G.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()},Q.appendChild(G),o.set(X,H)}return X}),d=b=>{const y=new I.TextureLoader().load(b);return y.minFilter=I.LinearFilter,y.magFilter=I.LinearFilter,y.format=I.RGBFormat,y},h=(b,y)=>{let E=y;return new Promise((k,S)=>{const C=new XMLHttpRequest;C.onreadystatechange=()=>{if(C.readyState===4)if(C.status===200){const j=window.URL||window.webkitURL;E=E||document.createElement("video"),E.crossOrigin="anonymous",E.muted=!0,E.loop=!0,E.playsInline=!0,E.src=j.createObjectURL(C.response);const M=new I.VideoTexture(E);M.minFilter=I.LinearFilter,M.magFilter=I.LinearFilter,M.format=I.RGBFormat,k(Object.assign(M,{videoSource:b}))}else S(new Error("Video download Error: "+C.status))},C.onerror=j=>S(j),C.open("GET",b),C.responseType="blob",C.send()})},u=(b,y)=>Y(exports,null,function*(){const{video_src:E,video_poster_src:k,points:S}=b;e.videoSource=E,e.rectPoints=M0(S).map(C=>C.map(({x:j,y:M,z:X})=>new I.Vector3(j,M,X))),e.imageTexture=d(k),y&&(e.videoElement=y),e.videoTexture=yield h(e.videoSource,e.videoElement),e.enabled=!!b.enable,e.enabled&&a()}),m=b=>{if(!e.enabled)return;const y=e.videoMeshes;if(!(!y||b.intersectObjects(y).length===0))return e.videoTexture&&(e.videoTexture.image.paused||e.videoTexture.image.pause()),!1},v=b=>{b==="Floorplan"?n.hide():n.show()},g=()=>{if(!e.enabled)return;const b=i.camera.position;if(o.forEach((y,E)=>{const k=y.css3DObject.position.clone(),S=k.clone().sub(b).normalize(),C=new I.Raycaster(b,S),j=i.model.intersectRaycaster(C)[0],M=k.distanceTo(b),X=.01;j&&j.distance+X<M?y.hide():y.show()}),!r()){const y=e.rectPoints.find(E=>{const k=E[0].clone().add(E[1]).add(E[2]).add(E[3]).divideScalar(4);return E.map(S=>S.clone().add(k).divideScalar(2)).filter(S=>{const C=S.distanceTo(b),j=new I.Raycaster(b,S.clone().sub(b).normalize()),M=i.model.intersectRaycaster(j)[0],X=.01;return!(M&&M.distance+X<C)}).length>=2});(!y||y.length===0)&&s(!0)}},A=()=>{l(),e.videoTexture=void 0,i.off("modeChange",v),i.off("wantsTapGesture",m),i.off("panoArrived",g),i.off("renderFrame",()=>{e.videoMeshes.forEach(b=>{b&&(b.needsRender=!0)})})};return i.on("modeChange",v),i.on("wantsTapGesture",m),i.on("panoArrived",g),i.on("renderFrame",()=>{e.videoMeshes.forEach(b=>{b&&(b.needsRender=!0)})}),{enable:a,disable:l,load:u,dispose:A,state:e,css3DRenderPlugin:n}};var Cn=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Cn||{});function L0(i){fe(i,"svelte-gduhqw",`.item-label-item.svelte-gduhqw.svelte-gduhqw{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;animation:svelte-gduhqw-fadeIn .3s ease-in}.item-label-item.fold.svelte-gduhqw>.item-label-item__text-wrap.svelte-gduhqw{visibility:hidden}.item-label-item.fold.svelte-gduhqw>.item-label-item__bar.anchor.svelte-gduhqw{visibility:hidden}.item-label-item.fold.svelte-gduhqw>.item-label-item__bar.anchor.svelte-gduhqw:after{visibility:visible}.item-label-item__text-wrap.svelte-gduhqw.svelte-gduhqw{height:-moz-fit-content;height:fit-content;padding:0.75rem 1.25rem 0.75rem 0.75rem;position:absolute;width:-moz-max-content;width:max-content;max-width:29.5625rem;min-height:5.75rem;background-image:linear-gradient(269deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.60) 49%, rgba(31, 38, 46, 0.70) 100%);border:0.09375rem solid rgba(255, 255, 255, .65);border-radius:0.1875rem;color:white;transform:translate(-50%, 0);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;overflow:hidden;pointer-events:all}.item-label-item__custom.svelte-gduhqw.svelte-gduhqw{padding:0;max-width:unset;min-height:unset;background-image:unset;border:0;border-radius:0}.icon-wrap.svelte-gduhqw.svelte-gduhqw{width:4.25rem;height:100%;display:flex;justify-content:center;align-content:center}.icon.svelte-gduhqw.svelte-gduhqw{width:4.25rem;height:4.25rem;background-repeat:no-repeat;background-size:contain;background-position:center}.item-label-text.svelte-gduhqw.svelte-gduhqw{margin-left:0.75rem;padding-left:0.75rem;min-height:4.25rem;height:auto;display:flex;flex-flow:column;justify-content:space-around;align-content:flex-start;border-left:solid rgba(255, 255, 255, .2) 0.0625rem;border-top:solid rgba(255, 255, 255, .2) 0;border-right:solid rgba(255, 255, 255, .2) 0;border-bottom:solid rgba(255, 255, 255, .2) 0;pointer-events:auto}.item-model.svelte-gduhqw.svelte-gduhqw{white-space:nowrap;font-size:1.375rem;font-weight:bold;line-height:1.875rem}.item-name.svelte-gduhqw.svelte-gduhqw{height:auto;word-wrap:break-word;word-break:break-all;font-size:1.25rem;line-height:1.75rem}.item-label-item__bar.svelte-gduhqw.svelte-gduhqw{position:absolute;bottom:0;width:0.1875rem;background-image:linear-gradient(to bottom, white, rgba(255, 255, 255, 0));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.20);pointer-events:none}.item-label-item__bar.anchor.svelte-gduhqw.svelte-gduhqw:after{content:'';position:absolute;bottom:0;width:1.5rem;height:1.5rem;background-image:url("//vrlab-public.ljcdn.com/common/file/web/67e7a198-28c9-47dc-879b-507bd3ae600c.png ");background-position:center;background-size:contain;transform:translate(-0.65625rem, 50%)}@keyframes svelte-gduhqw-fadeIn{from{opacity:0
542
+ `,e.container.style.pointerEvents="none";const n=v=>(e.wrapper=v,v.appendChild(e.container),l(),!0),o=v=>{e.itemLabels=k0(v),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var v;if(e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(v=e.app)==null||v.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new I0({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,itemLabels:e.itemLabels,hooks:e.hooks,displayStrategyType:e.displayStrategyType}})}},c=()=>{i.on("modeChange",h),i.once("dispose",a)},d=()=>{i.off("modeChange",h)},h=v=>{if(e.enabled){if(v!==ze.Five.Mode.Floorplan){e.fiveModeEnabled=!1,l();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=i.currentMode===ze.Five.Mode.Floorplan,l()})}};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},D0={name:"ModelItemLabelPlugin",version:0};var qn=(i=>(i.TOP_LEFT="topLeft",i.TOP_RIGHT="topRight",i.BOTTOM_LEFT="bottomLeft",i.BOTTOM_RIGHT="bottomRight",i))(qn||{});function M0(i){if(i.length===0)return[];if(Array.isArray(i[0]))return i;let t=[];return i.forEach(e=>{const n=[e[qn.TOP_LEFT],e[qn.BOTTOM_LEFT],e[qn.BOTTOM_RIGHT],e[qn.TOP_RIGHT]];t.push(n)}),t}const S0=(i,{videoElement:t})=>{const e={videoMeshes:[],videoTextureEnabled:!1,videoSource:"",rectPoints:[],enabled:!1,videoElement:t},n=as(i),o=new Map,s=b=>{e.videoTexture&&(e.videoTexture.image.muted=b)},r=()=>e.videoTexture?e.videoTexture.image.muted:!0,a=()=>{if(e.enabled||!e.videoTexture)return;e.enabled=!0,e.videoMeshes=c(),e.videoMeshes.forEach(y=>i.scene.add(y));const b=()=>{if(!e.videoTexture)return;const y=()=>{var E;e.videoTexture&&((E=e.videoTexture)==null||E.image.removeEventListener("timeupdate",y),e.videoTextureEnabled=!0,e.videoMeshes.forEach(k=>{k.material.map!==e.videoTexture&&(k.material.map=e.videoTexture)}),i.needsRender=!0)};e.videoTexture.image.addEventListener("timeupdate",y),e.videoTexture&&e.videoMeshes.length&&(e.videoTexture.image.play(),e.videoTexture.image.onplay=()=>{n.hide()},e.videoTexture.image.onpause=()=>{n.show()},e.videoTexture.image.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()})};if(i.model.loaded)b();else return i.once("modelLoaded",()=>b())},l=()=>{e.enabled&&(e.enabled=!1,e.videoMeshes.forEach(b=>{b.geometry.dispose(),b.material.dispose(),i.scene.remove(b),e.videoTexture&&e.videoTexture.image.pause()}),e.videoMeshes=[],i.needsRender=!0)},c=()=>e.rectPoints.map((b,y)=>{const E=new I.BufferGeometry,k=128,S=[];S.push(...b[0].toArray());for(let Q=1;Q<k;Q++)S.push(b[0].x+(b[1].x-b[0].x)*Q/k,b[0].y+(b[1].y-b[0].y)*Q/k,b[0].z+(b[1].z-b[0].z)*Q/k);S.push(...b[1].toArray()),S.push(...b[2].toArray());for(let Q=1;Q<k;Q++)S.push(b[2].x+(b[3].x-b[2].x)*Q/k,b[2].y+(b[3].y-b[2].y)*Q/k,b[2].z+(b[3].z-b[2].z)*Q/k);S.push(...b[3].toArray());const C=[];C.push(0,1);for(let Q=1;Q<k;Q++)C.push(0,1-Q/k);C.push(0,0),C.push(1,0);for(let Q=1;Q<k;Q++)C.push(1,Q/k);C.push(1,1);const _=[];for(let Q=0;Q<k;Q++)_.push(Q,Q+1,k*2-Q,Q,k*2-Q,k*2+1-Q);E.setAttribute("position",new I.BufferAttribute(new Float32Array(S),3)),E.setAttribute("uv",new I.BufferAttribute(new Float32Array(C),2)),E.setIndex(new I.BufferAttribute(new Uint32Array(_),1));const M=new I.MeshBasicMaterial({map:e.videoTextureEnabled?e.videoTexture:e.imageTexture,side:I.DoubleSide}),X=new I.Mesh(E,M);X.renderOrder=1,X.name=`ModelTVVideoPlugin-${y}-${performance.now()}`;const J=[b[1],b[2],b[3],b[0]],H=n.create3DDomContainer(J);if(H!=null&&H.container){const Q=document.createElement("div");Q.classList.add("play-icon"),Q.style.width="100%",Q.style.height="100%",Q.style.display="flex",Q.style.justifyContent="center",Q.style.alignItems="center",Q.style.pointerEvents="none",H.container.appendChild(Q);const G=document.createElement("img");G.src="//vrlab-static.ljcdn.com/release/web/play.2ada5b6f.png",G.style.width="200px",G.style.pointerEvents="auto",G.onclick=()=>{e.videoTexture.image.muted=!1,e.videoTexture.image.play()},Q.appendChild(G),o.set(X,H)}return X}),d=b=>{const y=new I.TextureLoader().load(b);return y.minFilter=I.LinearFilter,y.magFilter=I.LinearFilter,y.format=I.RGBFormat,y},h=(b,y)=>{let E=y;return new Promise((k,S)=>{const C=new XMLHttpRequest;C.onreadystatechange=()=>{if(C.readyState===4)if(C.status===200){const _=window.URL||window.webkitURL;E=E||document.createElement("video"),E.crossOrigin="anonymous",E.muted=!0,E.loop=!0,E.playsInline=!0,E.src=_.createObjectURL(C.response);const M=new I.VideoTexture(E);M.minFilter=I.LinearFilter,M.magFilter=I.LinearFilter,M.format=I.RGBFormat,k(Object.assign(M,{videoSource:b}))}else S(new Error("Video download Error: "+C.status))},C.onerror=_=>S(_),C.open("GET",b),C.responseType="blob",C.send()})},u=(b,y)=>Y(exports,null,function*(){const{video_src:E,video_poster_src:k,points:S}=b;e.videoSource=E,e.rectPoints=M0(S).map(C=>C.map(({x:_,y:M,z:X})=>new I.Vector3(_,M,X))),e.imageTexture=d(k),y&&(e.videoElement=y),e.videoTexture=yield h(e.videoSource,e.videoElement),e.enabled=!!b.enable,e.enabled&&a()}),m=b=>{if(!e.enabled)return;const y=e.videoMeshes;if(!(!y||b.intersectObjects(y).length===0))return e.videoTexture&&(e.videoTexture.image.paused||e.videoTexture.image.pause()),!1},v=b=>{b==="Floorplan"?n.hide():n.show()},g=()=>{if(!e.enabled)return;const b=i.camera.position;if(o.forEach((y,E)=>{const k=y.css3DObject.position.clone(),S=k.clone().sub(b).normalize(),C=new I.Raycaster(b,S),_=i.model.intersectRaycaster(C)[0],M=k.distanceTo(b),X=.01;_&&_.distance+X<M?y.hide():y.show()}),!r()){const y=e.rectPoints.find(E=>{const k=E[0].clone().add(E[1]).add(E[2]).add(E[3]).divideScalar(4);return E.map(S=>S.clone().add(k).divideScalar(2)).filter(S=>{const C=S.distanceTo(b),_=new I.Raycaster(b,S.clone().sub(b).normalize()),M=i.model.intersectRaycaster(_)[0],X=.01;return!(M&&M.distance+X<C)}).length>=2});(!y||y.length===0)&&s(!0)}},A=()=>{l(),e.videoTexture=void 0,i.off("modeChange",v),i.off("wantsTapGesture",m),i.off("panoArrived",g),i.off("renderFrame",()=>{e.videoMeshes.forEach(b=>{b&&(b.needsRender=!0)})})};return i.on("modeChange",v),i.on("wantsTapGesture",m),i.on("panoArrived",g),i.on("renderFrame",()=>{e.videoMeshes.forEach(b=>{b&&(b.needsRender=!0)})}),{enable:a,disable:l,load:u,dispose:A,state:e,css3DRenderPlugin:n}};var Cn=(i=>(i.SMALL="small",i.MIDLLE="middle",i.LARGE="large",i.EXTRA_LARGE="x-large",i))(Cn||{});function L0(i){fe(i,"svelte-gduhqw",`.item-label-item.svelte-gduhqw.svelte-gduhqw{position:absolute;z-index:0;transform:none;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;animation:svelte-gduhqw-fadeIn .3s ease-in}.item-label-item.fold.svelte-gduhqw>.item-label-item__text-wrap.svelte-gduhqw{visibility:hidden}.item-label-item.fold.svelte-gduhqw>.item-label-item__bar.anchor.svelte-gduhqw{visibility:hidden}.item-label-item.fold.svelte-gduhqw>.item-label-item__bar.anchor.svelte-gduhqw:after{visibility:visible}.item-label-item__text-wrap.svelte-gduhqw.svelte-gduhqw{height:-moz-fit-content;height:fit-content;padding:0.75rem 1.25rem 0.75rem 0.75rem;position:absolute;width:-moz-max-content;width:max-content;max-width:29.5625rem;min-height:5.75rem;background-image:linear-gradient(269deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.60) 49%, rgba(31, 38, 46, 0.70) 100%);border:0.09375rem solid rgba(255, 255, 255, .65);border-radius:0.1875rem;color:white;transform:translate(-50%, 0);display:flex;justify-content:flex-start;align-items:center;box-sizing:border-box;overflow:hidden;pointer-events:all}.item-label-item__custom.svelte-gduhqw.svelte-gduhqw{padding:0;max-width:unset;min-height:unset;background-image:unset;border:0;border-radius:0}.icon-wrap.svelte-gduhqw.svelte-gduhqw{width:4.25rem;height:100%;display:flex;justify-content:center;align-content:center}.icon.svelte-gduhqw.svelte-gduhqw{width:4.25rem;height:4.25rem;background-repeat:no-repeat;background-size:contain;background-position:center}.item-label-text.svelte-gduhqw.svelte-gduhqw{margin-left:0.75rem;padding-left:0.75rem;min-height:4.25rem;height:auto;display:flex;flex-flow:column;justify-content:space-around;align-content:flex-start;border-left:solid rgba(255, 255, 255, .2) 0.0625rem;border-top:solid rgba(255, 255, 255, .2) 0;border-right:solid rgba(255, 255, 255, .2) 0;border-bottom:solid rgba(255, 255, 255, .2) 0;pointer-events:auto}.item-model.svelte-gduhqw.svelte-gduhqw{white-space:nowrap;font-size:1.375rem;font-weight:bold;line-height:1.875rem}.item-name.svelte-gduhqw.svelte-gduhqw{height:auto;word-wrap:break-word;word-break:break-all;font-size:1.25rem;line-height:1.75rem}.item-label-item__bar.svelte-gduhqw.svelte-gduhqw{position:absolute;bottom:0;width:0.1875rem;background-image:linear-gradient(to bottom, white, rgba(255, 255, 255, 0));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.20);pointer-events:none}.item-label-item__bar.anchor.svelte-gduhqw.svelte-gduhqw:after{content:'';position:absolute;bottom:0;width:1.5rem;height:1.5rem;background-image:url("//vrlab-public.ljcdn.com/common/file/web/67e7a198-28c9-47dc-879b-507bd3ae600c.png ");background-position:center;background-size:contain;transform:translate(-0.65625rem, 50%)}@keyframes svelte-gduhqw-fadeIn{from{opacity:0
543
543
  }to{opacity:1
544
- }}`)}function T0(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,d=i[0].icon&&Fl(i);return{c(){d&&d.c(),t=ne(),e=z("div"),n=z("span"),s=je(o),r=ne(),a=z("span"),c=je(l),w(n,"class","item-model svelte-gduhqw"),w(a,"class","item-name svelte-gduhqw"),w(e,"class","item-label-text svelte-gduhqw")},m(h,u){d&&d.m(h,u),V(h,t,u),V(h,e,u),O(e,n),O(n,s),O(e,r),O(e,a),O(a,c)},p(h,u){h[0].icon?d?d.p(h,u):(d=Fl(h),d.c(),d.m(t.parentNode,t)):d&&(d.d(1),d=null),u&1&&o!==(o=(h[0].code||h[0].id)+"")&&Oe(s,o),u&1&&l!==(l=h[0].name+"")&&Oe(c,l)},d(h){d&&d.d(h),h&&_(t),h&&_(e)}}}function z0(i){let t;return{c(){t=z("div")},m(e,n){V(e,t,n),i[6](t)},p:K,d(e){e&&_(t),i[6](null)}}}function Fl(i){let t,e,n,o,s;return{c(){t=z("div"),e=z("div"),w(e,"class","icon svelte-gduhqw"),w(e,"style",n=`background-image: url(${i[0].icon})`),w(t,"class","icon-wrap svelte-gduhqw")},m(r,a){V(r,t,a),O(t,e),o||(s=Ce(t,"click",i[7]),o=!0)},p(r,a){a&1&&n!==(n=`background-image: url(${r[0].icon})`)&&w(e,"style",n)},d(r){r&&_(t),o=!1,s()}}}function j0(i){let t,e,n,o,s,r,a,l,c,d;function h(v,g){return g&1&&(n=null),n==null&&(n=typeof v[0].render=="function"),n?z0:T0}let u=h(i,-1),m=u(i);return{c(){t=z("div"),e=z("div"),m.c(),s=ne(),r=z("div"),w(e,"class",o=Be(it("item-label-item__text-wrap",{"item-label-item__custom":typeof i[0].render=="function"}))+" svelte-gduhqw"),T(e,"bottom",`${i[0].strokeLength}px`),w(r,"class",a=Be(it("item-label-item__bar",{anchor:i[1]}))+" svelte-gduhqw"),T(r,"height",`${i[0].strokeLength}px`),w(t,"class",l=Be(it("item-label-item",{fold:i[0].isFold}))+" svelte-gduhqw"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform)},m(v,g){V(v,t,g),O(t,e),m.m(e,null),O(t,s),O(t,r),c||(d=Ce(e,"click",i[4]),c=!0)},p(v,[g]){u===(u=h(v,g))&&m?m.p(v,g):(m.d(1),m=u(v),m&&(m.c(),m.m(e,null))),g&1&&o!==(o=Be(it("item-label-item__text-wrap",{"item-label-item__custom":typeof v[0].render=="function"}))+" svelte-gduhqw")&&w(e,"class",o),g&1&&T(e,"bottom",`${v[0].strokeLength}px`),g&2&&a!==(a=Be(it("item-label-item__bar",{anchor:v[1]}))+" svelte-gduhqw")&&w(r,"class",a),g&1&&T(r,"height",`${v[0].strokeLength}px`),g&1&&l!==(l=Be(it("item-label-item",{fold:v[0].isFold}))+" svelte-gduhqw")&&w(t,"class",l),g&1&&T(t,"z-index",v[0].zIndex),g&1&&T(t,"transform",v[0].transform)},i:K,o:K,d(v){v&&_(t),m.d(),c=!1,d()}}}function _0(i,t,e){let{itemLabel:n}=t,{hooks:o}=t,{anchorEnabled:s}=t,{onIconClick:r}=t;function a(){o.emit("onLabelClick",n)}let l;function c(h){Ke[h?"unshift":"push"](()=>{l=h,e(3,l)})}const d=h=>r(n);return i.$$set=h=>{"itemLabel"in h&&e(0,n=h.itemLabel),"hooks"in h&&e(5,o=h.hooks),"anchorEnabled"in h&&e(1,s=h.anchorEnabled),"onIconClick"in h&&e(2,r=h.onIconClick)},i.$$.update=()=>{if(i.$$.dirty&9&&typeof n.render=="function"&&l&&l.children.length===0){const h=n.render(n);h&&l.appendChild(h)}},[n,s,r,l,a,o,c,d]}class V0 extends ce{constructor(t){super(),le(this,t,_0,j0,ae,{itemLabel:0,hooks:5,anchorEnabled:1,onIconClick:2},L0)}}const{Raycaster:O0,Vector3:LE}=I,Wl=(i,t,e,n)=>{const o=t.clone().sub(e).normalize(),s=new O0;s.set(e,o);const[r]=i.model.intersectRaycaster(s);return r&&r.distance+.01<n},B0=(i,t)=>{switch(t){case Cn.SMALL:return Math.ceil(-27.78*i+85);case Cn.MIDLLE:return Math.ceil(-38.9*i+130);case Cn.LARGE:return Math.ceil(-44.44*i+140);case Cn.EXTRA_LARGE:return Math.ceil(-92.59*i+300)}},R0=i=>`translate(${i[0]}px, ${i[1]}px)`;function Nl(i){return i.map(t=>F({observerIndex:void 0,visible:!1,isFold:!1},t))}function Q0(i){fe(i,"svelte-f82itz",".item-labels-container.svelte-f82itz{width:100%;height:100%;position:relative}")}function Xl(i,t,e){const n=i.slice();return n[29]=t[e],n}function Yl(i){let t,e;return t=new V0({props:{itemLabel:i[29],hooks:i[0],anchorEnabled:i[2],onIconClick:i[6]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o[0]&2&&(s.itemLabel=n[29]),o[0]&1&&(s.hooks=n[0]),o[0]&4&&(s.anchorEnabled=n[2]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Ul(i,t){let e,n,o,s=t[29].visible&&Yl(t);return{key:i,first:null,c(){e=Ee(),s&&s.c(),n=Ee(),this.first=e},m(r,a){V(r,e,a),s&&s.m(r,a),V(r,n,a),o=!0},p(r,a){t=r,t[29].visible?s?(s.p(t,a),a[0]&2&&x(s,1)):(s=Yl(t),s.c(),x(s,1),s.m(n.parentNode,n)):s&&(de(),L(s,1,1,()=>{s=null}),he())},i(r){o||(x(s),o=!0)},o(r){L(s),o=!1},d(r){r&&_(e),s&&s.d(r),r&&_(n)}}}function H0(i){let t,e=[],n=new Map,o,s,r=i[1];const a=l=>l[29].id;for(let l=0;l<r.length;l+=1){let c=Xl(i,r,l),d=a(c);n.set(d,e[l]=Ul(d,c))}return{c(){t=z("div");for(let l=0;l<e.length;l+=1)e[l].c();w(t,"class","item-labels-container svelte-f82itz"),ot(()=>i[12].call(t)),T(t,"opacity",i[5]?1:0)},m(l,c){V(l,t,c);for(let d=0;d<e.length;d+=1)e[d]&&e[d].m(t,null);o=ls(t,i[12].bind(t)),s=!0},p(l,c){c[0]&71&&(r=l[1],de(),e=St(e,c,a,1,l,r,n,t,un,Ul,null,Xl),he()),c[0]&32&&T(t,"opacity",l[5]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)x(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)L(e[c]);s=!1},d(l){l&&_(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let G0=11;function F0(i,t,e){const{Vector3:n}=I;let{five:o}=t,{modelOcclusionEnable:s}=t,{itemLabels:r}=t,{hooks:a}=t,{displayStrategyType:l}=t,{maxVisibleDistance:c}=t,d=null,h=null,u=(o==null?void 0:o.currentMode)===ze.Five.Mode.Panorama,m,v,g=[],A=!0;const b=(B,W)=>{const q=B.camera.position.clone(),U=new n(W.modelPosition[0],W.modelPosition[1],W.modelPosition[2]),Z=U.distanceTo(q);return c!==void 0&&B.state.mode===ze.Five.Mode.Panorama&&Z>c?!1:Wl(B,U.clone().sub(q).normalize(),q,Z)},y=B=>{const{camera:W,model:q}=o,{x:U,y:Z,z:re}=B.clone().project(W),oe=(U+1)/2,Ae=(2-(Z+1))/2;return!!(Math.abs(re)<1&&[oe,Ae].every(ve=>ve<1&&ve>=0))},E=(B,W)=>{const q=new n(W.modelPosition[0],W.modelPosition[1],W.modelPosition[2]),U=B.project2d(q),Z=U==null?void 0:U.x,re=U==null?void 0:U.y;return[Z,re]},k=(B,W)=>{const q=W.map(Z=>{if(B.state.panoIndex!==Z.panoIndex)return ye(F({},Z),{visible:!1});const re=E(B,Z);Z.name.length*G0;const oe=B0(Z.modelPosition[1],l),Ae=B.currentMode===ze.Five.Mode.Panorama?y(new n(Z.position[0],Z.position[1],Z.position[2])):!0,we=s?b(B,Z):!1,ge=Ae&&!we;if(!ge)return ye(F({},Z),{visible:ge});g.push(re);const _e=R0(re);return ye(F({},Z),{visible:ge,transform:_e,strokeLength:oe})}),U=q.filter(({visible:Z})=>Z).map(Z=>({itemLabelItem:Z,distance:new n(Z.modelPosition[0],Z.modelPosition[1],Z.modelPosition[2]).clone().distanceTo(B.camera.position)})).sort((Z,re)=>Z.distance-re.distance);return q.map(Z=>{const re=U.findIndex(oe=>oe.itemLabelItem.id===Z.id);return re!==void 0?ye(F({},Z),{zIndex:re*10}):Z})},S=()=>{g=[],e(1,h=k(o,h))},C=()=>{e(5,A=!1),j()},j=Mh(()=>{e(5,A=!0),S()},300),M=()=>{o.once("renderFrame",S)},X=()=>{window.addEventListener("resize",M,!1)},J=()=>{d!==r&&(e(1,h=Nl(r)),d=r,S())},H=(B,W)=>{let q=[];for(const{position:Z,panoIndex:re}of W){const oe=B.distanceTo(Z);(c===void 0||oe<=c||o.state.mode!==ze.Five.Mode.Panorama)&&q.push({panoIndex:re,obVector:Z,distance:oe})}q=q.sort((Z,re)=>Z.distance-re.distance);let U;for(const Z of q){const{obVector:re,distance:oe,panoIndex:Ae}=Z;if(!Wl(o,B,re,oe)){U=Ae;break}}return typeof U=="number"?W[U]:void 0},Q=B=>{if(o.state.mode===ze.Five.Mode.Panorama)return;const W=o.work.observers,q=new n().fromArray(B.position),U=H(q,W);if(U&&(B.observerIndex=U.panoIndex),typeof B.observerIndex=="number"){const Z=W[B.observerIndex],re=q.clone().sub(Z.position).normalize(),oe={longitude:Math.PI+Math.atan2(re.x,re.z),latitude:Math.acos(re.y/re.length())-Math.PI/2};o.setState(ye(F({},oe),{mode:ze.Five.Mode.Panorama,panoIndex:B.observerIndex})),o.once("initAnimationEnded",()=>{e(1,h=h.map(Ae=>ye(F({},Ae),{isFold:Ae.id!==B.id}))),o.once("cameraUpdate",()=>{e(1,h=h.map(Ae=>ye(F({},Ae),{isFold:!1})))})})}};Xd(()=>{J()}),Mt(()=>{e(1,h=Nl(r)),d=r,S(),X(),o.on("cameraUpdate",C)}),hn(()=>{o.off("cameraUpdate",C),window.removeEventListener("resize",M,!1)});function G(){m=this.clientWidth,v=this.clientHeight,e(3,m),e(4,v)}return i.$$set=B=>{"five"in B&&e(7,o=B.five),"modelOcclusionEnable"in B&&e(8,s=B.modelOcclusionEnable),"itemLabels"in B&&e(9,r=B.itemLabels),"hooks"in B&&e(0,a=B.hooks),"displayStrategyType"in B&&e(10,l=B.displayStrategyType),"maxVisibleDistance"in B&&e(11,c=B.maxVisibleDistance)},[a,h,u,m,v,A,Q,o,s,r,l,c,G]}class W0 extends ce{constructor(t){super(),le(this,t,F0,H0,ae,{five:7,modelOcclusionEnable:8,itemLabels:9,hooks:0,displayStrategyType:10,maxVisibleDistance:11},Q0,[-1,-1])}}function N0(i){return i.item_labels.map(t=>ye(F({},t),{modelPosition:[t.position[0],t.position[1],t.position[2]],observerIndex:void 0}))}const X0=void 0,Y0=(i,t)=>{var u,m,v,g;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:!0,itemLabels:[],wrapper:null,app:void 0,hooks:new ze.Subscribe,modelOcclusionEnable:(u=t==null?void 0:t.modelOcclusionEnable)!=null?u:!0,onlyVisibleInPanorama:(m=t==null?void 0:t.onlyVisibleInPanorama)!=null?m:!0,displayStrategyType:(v=t==null?void 0:t.displayStrategyType)!=null?v:Cn.SMALL,maxVisibleDistance:(g=t==null?void 0:t.maxVisibleDistance)!=null?g:X0};e.container.setAttribute("class","item-label-plugin-container"),e.container.style.cssText=`
544
+ }}`)}function T0(i){let t,e,n,o=(i[0].code||i[0].id)+"",s,r,a,l=i[0].name+"",c,d=i[0].icon&&Fl(i);return{c(){d&&d.c(),t=ne(),e=z("div"),n=z("span"),s=_e(o),r=ne(),a=z("span"),c=_e(l),w(n,"class","item-model svelte-gduhqw"),w(a,"class","item-name svelte-gduhqw"),w(e,"class","item-label-text svelte-gduhqw")},m(h,u){d&&d.m(h,u),j(h,t,u),j(h,e,u),O(e,n),O(n,s),O(e,r),O(e,a),O(a,c)},p(h,u){h[0].icon?d?d.p(h,u):(d=Fl(h),d.c(),d.m(t.parentNode,t)):d&&(d.d(1),d=null),u&1&&o!==(o=(h[0].code||h[0].id)+"")&&Oe(s,o),u&1&&l!==(l=h[0].name+"")&&Oe(c,l)},d(h){d&&d.d(h),h&&V(t),h&&V(e)}}}function z0(i){let t;return{c(){t=z("div")},m(e,n){j(e,t,n),i[6](t)},p:K,d(e){e&&V(t),i[6](null)}}}function Fl(i){let t,e,n,o,s;return{c(){t=z("div"),e=z("div"),w(e,"class","icon svelte-gduhqw"),w(e,"style",n=`background-image: url(${i[0].icon})`),w(t,"class","icon-wrap svelte-gduhqw")},m(r,a){j(r,t,a),O(t,e),o||(s=Ce(t,"click",i[7]),o=!0)},p(r,a){a&1&&n!==(n=`background-image: url(${r[0].icon})`)&&w(e,"style",n)},d(r){r&&V(t),o=!1,s()}}}function _0(i){let t,e,n,o,s,r,a,l,c,d;function h(v,g){return g&1&&(n=null),n==null&&(n=typeof v[0].render=="function"),n?z0:T0}let u=h(i,-1),m=u(i);return{c(){t=z("div"),e=z("div"),m.c(),s=ne(),r=z("div"),w(e,"class",o=Be(it("item-label-item__text-wrap",{"item-label-item__custom":typeof i[0].render=="function"}))+" svelte-gduhqw"),T(e,"bottom",`${i[0].strokeLength}px`),w(r,"class",a=Be(it("item-label-item__bar",{anchor:i[1]}))+" svelte-gduhqw"),T(r,"height",`${i[0].strokeLength}px`),w(t,"class",l=Be(it("item-label-item",{fold:i[0].isFold}))+" svelte-gduhqw"),T(t,"z-index",i[0].zIndex),T(t,"transform",i[0].transform)},m(v,g){j(v,t,g),O(t,e),m.m(e,null),O(t,s),O(t,r),c||(d=Ce(e,"click",i[4]),c=!0)},p(v,[g]){u===(u=h(v,g))&&m?m.p(v,g):(m.d(1),m=u(v),m&&(m.c(),m.m(e,null))),g&1&&o!==(o=Be(it("item-label-item__text-wrap",{"item-label-item__custom":typeof v[0].render=="function"}))+" svelte-gduhqw")&&w(e,"class",o),g&1&&T(e,"bottom",`${v[0].strokeLength}px`),g&2&&a!==(a=Be(it("item-label-item__bar",{anchor:v[1]}))+" svelte-gduhqw")&&w(r,"class",a),g&1&&T(r,"height",`${v[0].strokeLength}px`),g&1&&l!==(l=Be(it("item-label-item",{fold:v[0].isFold}))+" svelte-gduhqw")&&w(t,"class",l),g&1&&T(t,"z-index",v[0].zIndex),g&1&&T(t,"transform",v[0].transform)},i:K,o:K,d(v){v&&V(t),m.d(),c=!1,d()}}}function V0(i,t,e){let{itemLabel:n}=t,{hooks:o}=t,{anchorEnabled:s}=t,{onIconClick:r}=t;function a(){o.emit("onLabelClick",n)}let l;function c(h){Ke[h?"unshift":"push"](()=>{l=h,e(3,l)})}const d=h=>r(n);return i.$$set=h=>{"itemLabel"in h&&e(0,n=h.itemLabel),"hooks"in h&&e(5,o=h.hooks),"anchorEnabled"in h&&e(1,s=h.anchorEnabled),"onIconClick"in h&&e(2,r=h.onIconClick)},i.$$.update=()=>{if(i.$$.dirty&9&&typeof n.render=="function"&&l&&l.children.length===0){const h=n.render(n);h&&l.appendChild(h)}},[n,s,r,l,a,o,c,d]}class j0 extends ce{constructor(t){super(),le(this,t,V0,_0,ae,{itemLabel:0,hooks:5,anchorEnabled:1,onIconClick:2},L0)}}const{Raycaster:O0,Vector3:LE}=I,Wl=(i,t,e,n)=>{const o=t.clone().sub(e).normalize(),s=new O0;s.set(e,o);const[r]=i.model.intersectRaycaster(s);return r&&r.distance+.01<n},B0=(i,t)=>{switch(t){case Cn.SMALL:return Math.ceil(-27.78*i+85);case Cn.MIDLLE:return Math.ceil(-38.9*i+130);case Cn.LARGE:return Math.ceil(-44.44*i+140);case Cn.EXTRA_LARGE:return Math.ceil(-92.59*i+300)}},R0=i=>`translate(${i[0]}px, ${i[1]}px)`;function Nl(i){return i.map(t=>F({observerIndex:void 0,visible:!1,isFold:!1},t))}function Q0(i){fe(i,"svelte-f82itz",".item-labels-container.svelte-f82itz{width:100%;height:100%;position:relative}")}function Xl(i,t,e){const n=i.slice();return n[29]=t[e],n}function Yl(i){let t,e;return t=new j0({props:{itemLabel:i[29],hooks:i[0],anchorEnabled:i[2],onIconClick:i[6]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o[0]&2&&(s.itemLabel=n[29]),o[0]&1&&(s.hooks=n[0]),o[0]&4&&(s.anchorEnabled=n[2]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Ul(i,t){let e,n,o,s=t[29].visible&&Yl(t);return{key:i,first:null,c(){e=Ee(),s&&s.c(),n=Ee(),this.first=e},m(r,a){j(r,e,a),s&&s.m(r,a),j(r,n,a),o=!0},p(r,a){t=r,t[29].visible?s?(s.p(t,a),a[0]&2&&x(s,1)):(s=Yl(t),s.c(),x(s,1),s.m(n.parentNode,n)):s&&(de(),L(s,1,1,()=>{s=null}),he())},i(r){o||(x(s),o=!0)},o(r){L(s),o=!1},d(r){r&&V(e),s&&s.d(r),r&&V(n)}}}function H0(i){let t,e=[],n=new Map,o,s,r=i[1];const a=l=>l[29].id;for(let l=0;l<r.length;l+=1){let c=Xl(i,r,l),d=a(c);n.set(d,e[l]=Ul(d,c))}return{c(){t=z("div");for(let l=0;l<e.length;l+=1)e[l].c();w(t,"class","item-labels-container svelte-f82itz"),ot(()=>i[12].call(t)),T(t,"opacity",i[5]?1:0)},m(l,c){j(l,t,c);for(let d=0;d<e.length;d+=1)e[d]&&e[d].m(t,null);o=ls(t,i[12].bind(t)),s=!0},p(l,c){c[0]&71&&(r=l[1],de(),e=St(e,c,a,1,l,r,n,t,un,Ul,null,Xl),he()),c[0]&32&&T(t,"opacity",l[5]?1:0)},i(l){if(!s){for(let c=0;c<r.length;c+=1)x(e[c]);s=!0}},o(l){for(let c=0;c<e.length;c+=1)L(e[c]);s=!1},d(l){l&&V(t);for(let c=0;c<e.length;c+=1)e[c].d();o()}}}let G0=11;function F0(i,t,e){const{Vector3:n}=I;let{five:o}=t,{modelOcclusionEnable:s}=t,{itemLabels:r}=t,{hooks:a}=t,{displayStrategyType:l}=t,{maxVisibleDistance:c}=t,d=null,h=null,u=(o==null?void 0:o.currentMode)===ze.Five.Mode.Panorama,m,v,g=[],A=!0;const b=(B,W)=>{const q=B.camera.position.clone(),U=new n(W.modelPosition[0],W.modelPosition[1],W.modelPosition[2]),Z=U.distanceTo(q);return c!==void 0&&B.state.mode===ze.Five.Mode.Panorama&&Z>c?!1:Wl(B,U.clone().sub(q).normalize(),q,Z)},y=B=>{const{camera:W,model:q}=o,{x:U,y:Z,z:re}=B.clone().project(W),oe=(U+1)/2,Ae=(2-(Z+1))/2;return!!(Math.abs(re)<1&&[oe,Ae].every(ve=>ve<1&&ve>=0))},E=(B,W)=>{const q=new n(W.modelPosition[0],W.modelPosition[1],W.modelPosition[2]),U=B.project2d(q),Z=U==null?void 0:U.x,re=U==null?void 0:U.y;return[Z,re]},k=(B,W)=>{const q=W.map(Z=>{if(B.state.panoIndex!==Z.panoIndex)return ye(F({},Z),{visible:!1});const re=E(B,Z);Z.name.length*G0;const oe=B0(Z.modelPosition[1],l),Ae=B.currentMode===ze.Five.Mode.Panorama?y(new n(Z.position[0],Z.position[1],Z.position[2])):!0,we=s?b(B,Z):!1,ge=Ae&&!we;if(!ge)return ye(F({},Z),{visible:ge});g.push(re);const Ve=R0(re);return ye(F({},Z),{visible:ge,transform:Ve,strokeLength:oe})}),U=q.filter(({visible:Z})=>Z).map(Z=>({itemLabelItem:Z,distance:new n(Z.modelPosition[0],Z.modelPosition[1],Z.modelPosition[2]).clone().distanceTo(B.camera.position)})).sort((Z,re)=>Z.distance-re.distance);return q.map(Z=>{const re=U.findIndex(oe=>oe.itemLabelItem.id===Z.id);return re!==void 0?ye(F({},Z),{zIndex:re*10}):Z})},S=()=>{g=[],e(1,h=k(o,h))},C=()=>{e(5,A=!1),_()},_=Mh(()=>{e(5,A=!0),S()},300),M=()=>{o.once("renderFrame",S)},X=()=>{window.addEventListener("resize",M,!1)},J=()=>{d!==r&&(e(1,h=Nl(r)),d=r,S())},H=(B,W)=>{let q=[];for(const{position:Z,panoIndex:re}of W){const oe=B.distanceTo(Z);(c===void 0||oe<=c||o.state.mode!==ze.Five.Mode.Panorama)&&q.push({panoIndex:re,obVector:Z,distance:oe})}q=q.sort((Z,re)=>Z.distance-re.distance);let U;for(const Z of q){const{obVector:re,distance:oe,panoIndex:Ae}=Z;if(!Wl(o,B,re,oe)){U=Ae;break}}return typeof U=="number"?W[U]:void 0},Q=B=>{if(o.state.mode===ze.Five.Mode.Panorama)return;const W=o.work.observers,q=new n().fromArray(B.position),U=H(q,W);if(U&&(B.observerIndex=U.panoIndex),typeof B.observerIndex=="number"){const Z=W[B.observerIndex],re=q.clone().sub(Z.position).normalize(),oe={longitude:Math.PI+Math.atan2(re.x,re.z),latitude:Math.acos(re.y/re.length())-Math.PI/2};o.setState(ye(F({},oe),{mode:ze.Five.Mode.Panorama,panoIndex:B.observerIndex})),o.once("initAnimationEnded",()=>{e(1,h=h.map(Ae=>ye(F({},Ae),{isFold:Ae.id!==B.id}))),o.once("cameraUpdate",()=>{e(1,h=h.map(Ae=>ye(F({},Ae),{isFold:!1})))})})}};Xd(()=>{J()}),Mt(()=>{e(1,h=Nl(r)),d=r,S(),X(),o.on("cameraUpdate",C)}),hn(()=>{o.off("cameraUpdate",C),window.removeEventListener("resize",M,!1)});function G(){m=this.clientWidth,v=this.clientHeight,e(3,m),e(4,v)}return i.$$set=B=>{"five"in B&&e(7,o=B.five),"modelOcclusionEnable"in B&&e(8,s=B.modelOcclusionEnable),"itemLabels"in B&&e(9,r=B.itemLabels),"hooks"in B&&e(0,a=B.hooks),"displayStrategyType"in B&&e(10,l=B.displayStrategyType),"maxVisibleDistance"in B&&e(11,c=B.maxVisibleDistance)},[a,h,u,m,v,A,Q,o,s,r,l,c,G]}class W0 extends ce{constructor(t){super(),le(this,t,F0,H0,ae,{five:7,modelOcclusionEnable:8,itemLabels:9,hooks:0,displayStrategyType:10,maxVisibleDistance:11},Q0,[-1,-1])}}function N0(i){return i.item_labels.map(t=>ye(F({},t),{modelPosition:[t.position[0],t.position[1],t.position[2]],observerIndex:void 0}))}const X0=void 0,Y0=(i,t)=>{var u,m,v,g;const e={container:document.createElement("div"),data:null,enabled:!0,fiveModeEnabled:!0,itemLabels:[],wrapper:null,app:void 0,hooks:new ze.Subscribe,modelOcclusionEnable:(u=t==null?void 0:t.modelOcclusionEnable)!=null?u:!0,onlyVisibleInPanorama:(m=t==null?void 0:t.onlyVisibleInPanorama)!=null?m:!0,displayStrategyType:(v=t==null?void 0:t.displayStrategyType)!=null?v:Cn.SMALL,maxVisibleDistance:(g=t==null?void 0:t.maxVisibleDistance)!=null?g:X0};e.container.setAttribute("class","item-label-plugin-container"),e.container.style.cssText=`
545
545
  position: absolute;
546
546
  left: 0;
547
547
  top: 0;
548
548
  width: 100%;
549
549
  height: 100%;
550
550
  z-index: 5;
551
- `,e.container.style.pointerEvents="none";const n=A=>(e.wrapper=A,A.appendChild(e.container),l(),!0),o=A=>{e.itemLabels=N0(A),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var A;if(e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(A=e.app)==null||A.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new W0({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,itemLabels:e.itemLabels,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{i.on("modeChange",h),i.once("dispose",a)},d=()=>{i.off("modeChange",h)},h=A=>{if(A!==ze.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,s()})};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},U0={name:"ItemLabelPlugin",version:0};class q0 extends eo{constructor(e){super(e);f(this,"state");f(this,"container");f(this,"enabled");this.five=e,this.five.once("dispose",this.dispose),this.enabled=!0,this.state=this.initState()}enable(e){this.enabled=!0,this.updateState(ye(F({},e),{userAction:!0}))}disable(e){this.enabled=!1,this.updateState(ye(F({},e),{userAction:!0}))}show(e){if(this.state.enabled)return this.setState(ye(F({},this.state),{visible:!0}),e),Promise.resolve()}hide(e){if(this.state.enabled)return this.setState(ye(F({},this.state),{visible:!1}),e),Promise.resolve()}dispose(){this.container.remove()}setState(e,n){if(!this.enabled)return;const o=F({},this.state);this.state=F(F(F({},this.state),e),n),this.stateChangedCallback(o,n)}get visible(){return this.five.state.mode===ze.Five.Mode.Panorama}appendTo(e){this.enabled&&(this.container=e,this.render())}updateState(e){this.setState(ye(F({},this.state),{enabled:this.enabled,visible:this.visible}),e)}}function J0(i){fe(i,"svelte-wpy7pz",'.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function Z0(i){let t,e,n,o,s,r,a,l;return{c(){t=z("div"),e=z("div"),n=z("span"),n.textContent=`${i[8]}`,o=ne(),s=z("i"),w(n,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),w(s,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),w(e,"class",r=Be(it("plugin-DoorLabelPlugin-cnt",i[0].toward))+" svelte-wpy7pz"),w(e,"style",`transform: ${i[6]||"initial"};pointer-events: ${i[5]?"auto":"none"};opacity: ${i[5]?1:0}`),w(e,"data-camera-toward",i[7]),w(t,"style",`left: ${i[3]||0}%;top: ${i[4]||0}%;opacity: ${i[5]?1:0}`),w(t,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(c,d){V(c,t,d),O(t,e),O(e,n),O(e,o),O(e,s),i[10](t),a||(l=Ce(e,"click",i[9]),a=!0)},p(c,[d]){d&1&&r!==(r=Be(it("plugin-DoorLabelPlugin-cnt",c[0].toward))+" svelte-wpy7pz")&&w(e,"class",r)},i:K,o:K,d(c){c&&_(t),i[10](null),a=!1,l()}}}function K0(i,t,e){let{props:n}=t,{onClick:o}=t,s,{left:r,top:a,inSight:l,transform:c,panoIndex:d,cameraToward:h,name:u}=n;const m=()=>{if(!r||!a||!l||!s)return;const A=s.current.clientWidth/window.innerWidth*100,b=s.current.clientHeight/window.innerHeight*100;r<=A/2||r>=100-A/2||a<=b/2||a>=100-b/2},v=A=>{o&&o()};function g(A){Ke[A?"unshift":"push"](()=>{s=A,e(2,s)})}return i.$$set=A=>{"props"in A&&e(0,n=A.props),"onClick"in A&&e(1,o=A.onClick)},m(),[n,o,s,r,a,l,c,h,u,v,g]}class $0 extends ce{constructor(t){super(),le(this,t,K0,Z0,ae,{props:0,onClick:1},J0)}}function eA(i,t){const e=Math.abs(i.top+i.height/2-t.top-t.height/2),n=Math.abs(i.left+i.width/2-t.left-t.width/2),o=(i.height+t.height)/2,s=(i.width+t.width)/2;return!(e>o&&n>s)}function tA(i){const{camera:t}=i,e=t.getWorldDirection(new R.Vector3);let n=Math.atan(e.z/e.x)*180/Math.PI,o="";return e.x<0&&(n+=180),n<0&&(n+=360),n>315||n<=45?o="right":n>45&&n<=135?o="back":n>135&&n<=225?o="left":n>225&&n<=315&&(o="forward"),o}function nA(i,t){return Math.sqrt(Math.pow(i.z-t.z,2)+Math.pow(i.x-t.x,2))}function iA(i){const t=Math.PI/4;return i>-t&&i<=t?"left":i>t*3||i<=-t*3?"right":i>-t*3&&i<=-t?"forward":i>t&&i<=t*3?"back":""}const oA={userAction:!0};class sA extends q0{constructor(e){super(e);f(this,"MinVisibledistance",1.8);f(this,"MaxVisibledistance",5);f(this,"OffsetHeight",-1.3);f(this,"rooms");f(this,"floorplanServerData");f(this,"doorLabelItems");f(this,"visibleLabelMap",new Map);f(this,"labelItems",[]);f(this,"doorLabels");f(this,"roomObservers");f(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(o=>{o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,typeof this.five.ready=="function"?this.five.ready().then(()=>this.initData()):this.five.once("panoArrived",()=>{this.initData()})});f(this,"initRoomObservers",()=>{var s,r;const e=this.floorplanServerData.computed_data.floor_datas||[],o=(((r=(s=this.five)==null?void 0:s.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,d=e==null?void 0:e.find(h=>h.floor_index===c);if(d){const h=d.rooms.find(u=>u.observer_indexs.includes(l));if(h)return{panoIndex:l,floorIndex:c,name:h.name}}}).filter(Boolean);this.roomObservers=o});f(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});f(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const n=this.roomObservers.find(a=>a.panoIndex===e),s=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===n.name)return;const d=l.position.clone(),h=d.distanceTo(s);if(h<this.MinVisibledistance||h>this.MaxVisibledistance)return;const u=new R.Raycaster,m=d.clone().sub(s).normalize();u.set(s,m);const[v]=this.five.model.intersectRaycaster(u);v&&v.distance+.1<h||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});f(this,"fixDoorPosition",()=>{var d,h,u,m,v,g,A,b,y,E,k,S;const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const o=this.five.getElement(),s=o.clientWidth,r=o.clientHeight,a=n.getWorldDirection(new R.Vector3),l=[],c=[...this.labelItems];if(c.forEach((C,j)=>{if(C.visible){const M=n.position.distanceTo(C.position),X=C.position.clone().add(new R.Vector3(0,this.OffsetHeight,0)),H=X.clone().sub(n.position).normalize().angleTo(a),Q=X.clone().project(n),G=(Q.x+1)/2.2*100,B=(-Q.y+1)/2.2*100,W=G>=0&&G<=100&&B>=0&&B<=100&&M>this.MinVisibledistance&&M<=this.MaxVisibledistance;C.left=G,C.top=B,C.inSight=W&&H<Math.PI/2,C.cameraToward=tA(this.five),W?l.push({disFromCameraToLabel:M,left:G,top:B,index:j}):C.transform="translate(-50%, -50%)"}else C.inSight=!1}),l.length>1){let C=0;l.sort((j,M)=>M.disFromCameraToLabel-j.disFromCameraToLabel);for(let j=1;j<l.length;j++){const{index:M,left:X,top:J}=l[j-1],{index:H,left:Q,top:G}=l[j],B=this.container.children[M],W=this.container.children[H];if(!B||!W)return;const q={left:s*X/100,top:r*J/100,width:(u=(h=(d=B.children)==null?void 0:d[0])==null?void 0:h.clientWidth)!=null?u:0,height:(g=(v=(m=B.children)==null?void 0:m[0])==null?void 0:v.clientHeight)!=null?g:0},U={left:s*Q/100,top:r*G/100,width:(y=(b=(A=W.children)==null?void 0:A[0])==null?void 0:b.clientWidth)!=null?y:0,height:(S=(k=(E=W.children)==null?void 0:E[0])==null?void 0:k.clientHeight)!=null?S:0};eA(q,U)&&(C++,c[M].transform=`translate(-50%, ${(C-1)*100-50}%)`,c[H].transform=`translate(-50%, ${C*100-50}%)`)}}this.labelItems=c,this.render()});f(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:o}=this.five;let s,r,a=1/0;for(const l of o.observers)if(this.roomObservers.find(d=>d.panoIndex===l.panoIndex&&d.name===e)){const d=l.standingPosition,h=n.distanceTo(d);h<a&&(s=l.panoIndex,r=d.clone().sub(n).normalize(),a=h)}if(r!==null&&s!==null){const l={};if(a>0){const d=new R.Vector3(0,0,-1),h=r.clone(),u=new R.Quaternion;u.setFromUnitVectors(d,h);const m=new R.Euler;m.setFromQuaternion(u,"YXZ"),l.longitude=m.y}this.five.emit("wantsToMoveToPano",s,{},!0)||this.five.moveToPano(s,{longitude:l.longitude})}});f(this,"initData",()=>{var s;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,o=n!==void 0&&((s=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:s.rooms);this.rooms=o,this.rooms&&this.rooms.length>0&&this.rooms.forEach(r=>{var c;const a=(c=this.floorplanServerData.computed_data.doors)==null?void 0:c.filter(d=>!!(d&&d.name===r.name)),l=this.five.work.observers.filter((d,h)=>!!r.observer_indexs.find(u=>u===h));a&&a.forEach(d=>{const h=d.position;let u=1/0,m;l.forEach(g=>{const A=g.standingPosition,b={x:A.x,y:A.y,z:A.z},y=nA(h,b);y<u&&(u=y,m=b)}),m&&(h.y=m.y+.01);const v=new R.Vector3(h.x,h.y,h.z);v.add(new R.Vector3(-.2,1.8,0).applyEuler(new R.Euler(0,d.rad,0))),this.doorLabels.push({roomName:r.name,name:d.name,position:v,toward:iA(d.rad)})})}),this.labelItems=this.doorLabels.map(r=>ye(F({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const o={state:this.state,prevState:e,userAction:n?n.userAction:oA.userAction};this.hooks.emit("stateChange",o)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new $0({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this&&this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}const rA=i=>new sA(i);function aA(i,t){console.warn(`⛔ ==> [${i}]: ${t}`)}function Sh(i,t){console.warn(`🚫 ==> [${i}]: ${t}`)}var gs={},lA=cA;function cA(i,t,e){return i[0]=t[0]+e[0],i[1]=t[1]+e[1],i}var dA=hA;function hA(i,t,e){return i[0]=t,i[1]=e,i}var uA=fA;function fA(i,t){var e=t[0],n=t[1],o=e*e+n*n;return o>0&&(o=1/Math.sqrt(o),i[0]=t[0]*o,i[1]=t[1]*o),i}var mA=pA;function pA(i,t,e){return i[0]=t[0]-e[0],i[1]=t[1]-e[1],i}var gA=vA;function vA(i,t){return i[0]*t[0]+i[1]*t[1]}var AA=lA,Nr=dA,Lh=uA,bA=mA,yA=gA,ql=[0,0];gs.computeMiter=function(t,e,n,o,s){return AA(t,n,o),Lh(t,t),Nr(e,-t[1],t[0]),Nr(ql,-n[1],n[0]),s/yA(e,ql)};gs.normal=function(t,e){return Nr(t,-e[1],e[0]),t};gs.direction=function(t,e,n){return bA(t,e,n),Lh(t,t),t};var Nt=gs,yn=[0,0],Lo=[0,0],Jl=[0,0],_i=[0,0],wA=function(i,t){var e=null,n=[];t&&(i=i.slice(),i.push(i[0]));for(var o=i.length,s=1;s<o;s++){var r=i[s-1],a=i[s],l=s<i.length-1?i[s+1]:null;if(Nt.direction(yn,a,r),e||(e=[0,0],Nt.normal(e,yn)),s===1&&br(n,e,1),!l)Nt.normal(e,yn),br(n,e,1);else{Nt.direction(Lo,l,a);var c=Nt.computeMiter(Jl,_i,yn,Lo,1);br(n,_i,c)}}if(i.length>2&&t){var d=i[o-2],h=i[0],u=i[1];Nt.direction(yn,h,d),Nt.direction(Lo,u,h),Nt.normal(e,yn);var m=Nt.computeMiter(Jl,_i,yn,Lo,1);n[0][0]=_i.slice(),n[o-1][0]=_i.slice(),n[0][1]=m,n[o-1][1]=m,n.pop()}return n};function br(i,t,e){i.push([[t[0],t[1]],e])}const PA=2,CA=3,EA=3,IA=2;function kA(i){const t=i.width,n=i.unitLength/t,o=t/2,s=i.path;if(s.length===0)return{geometry:new I.BufferGeometry,maxU:0};const r=new I.CurvePath;s.forEach(C=>{const j=xA(C);j&&r.add(j)});const a=Math.ceil(r.getLength()*100);r.arcLengthDivisions=a;const l=r.getPoints(a),c=l.length,d=wA(l.map(C=>[C.x,C.z])),u=(c-1)*PA*CA,m=2*c,v=m*EA,g=m*IA,A=new Uint32Array(u),b=new Float32Array(v),y=new Float32Array(g);let E=0,k=0;for(let C=0;C<l.length;C++){const[j,M]=d[C][0],X=l[C],{x:J,y:H,z:Q}=X,G=new R.Vector3(J+j*o,H+.05,Q+M*o);b[C*6+0]=G.x,b[C*6+1]=G.y,b[C*6+2]=G.z;const B=new R.Vector3(J-j*o,H+.05,Q-M*o);b[C*6+3]=B.x,b[C*6+4]=B.y,b[C*6+5]=B.z,E+=C>0?l[C-1].clone().sub(l[C]).length():0;const W=E/t/n;if(k=W,y[C*4+0]=0,y[C*4+1]=W,y[C*4+2]=1,y[C*4+3]=W,i.skipPositions){const q=new I.Vector3().lerpVectors(G,B,.5);if(i.skipPositions.some(Z=>Z.distanceTo(q)<.26))continue}C!==l.length-1&&(A[C*6+0]=C*2+0,A[C*6+1]=C*2+2,A[C*6+2]=C*2+1,A[C*6+3]=C*2+2,A[C*6+4]=C*2+3,A[C*6+5]=C*2+1)}const S=new I.BufferGeometry;return S.setAttribute("position",new I.BufferAttribute(b,3)),S.setAttribute("uv",new I.BufferAttribute(y,2)),S.setIndex(new I.BufferAttribute(A,1)),{geometry:S,maxU:k,curvePath:r,curvePoints:l}}function xA(i){if(DA(i)){const t=[i.closed,i.curve_type,i.tension],e=i.points.map(o=>new I.Vector3().fromArray(o));return new I.CatmullRomCurve3(e,...t)}}function DA(i){return i.type==="CatmullRomCurve3"}var Ye={},MA={get exports(){return Ye},set exports(i){Ye=i}};function Ko(i){return i===null?"null":typeof i=="undefined"?"undefined":typeof i=="object"?Array.isArray(i)?"array":"object":typeof i}function Th(i){return Ko(i)==="object"?Yr(i):Ko(i)==="array"?Xr(i):i}function Xr(i){return i.map(Th)}function Yr(i){const t={};for(const e in i)i.hasOwnProperty(e)&&(t[e]=Th(i[e]));return t}function vs(i,t=[],e={}){const n={arrayBehaviour:e.arrayBehaviour||"replace"},o=t.map(r=>r||{}),s=i||{};for(let r=0;r<o.length;r++){const a=o[r],l=Object.keys(a);for(let c=0;c<l.length;c++){const d=l[c],h=a[d],u=Ko(h),m=Ko(s[d]);if(u==="object")if(m!=="undefined"){const v=m==="object"?s[d]:{};s[d]=vs({},[v,Yr(h)],n)}else s[d]=Yr(h);else if(u==="array")if(m==="array"){const v=Xr(h);s[d]=n.arrayBehaviour==="merge"?s[d].concat(v):v}else s[d]=Xr(h);else s[d]=h}}return s}MA.exports=function(t,...e){return vs(t,e)};Ye.noMutate=function(...t){return vs({},t)};Ye.withOptions=function(t,e,n){return vs(t,e,n)};function SA(i,t){t.forEach(e=>{const n=new I.SphereGeometry(.02,16,16),o=[],s=[new I.MeshBasicMaterial({color:16776960}),new I.MeshBasicMaterial({color:16711935}),new I.MeshBasicMaterial({color:16711680}),new I.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new I.Mesh(n,l);c.position.copy(xt(r)),o.push(c)});else{const r=s[0],a=new I.Mesh(n,r);a.position.copy(xt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const He=i=>i;function yr(i){if(!i||i.length<3)return;const t=i.map(Ni),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}function LA(i){return i.stickType==="Plane"}function TA(i){return i.stickType==="3DPoint"}function zA(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}function pt(i){return i.stickType==="Model"&&i.contentType==="MediaModel"}function jA(i){return i.stickType==="Model"&&i.contentType==="Model"}function _A(i){return i.stickType==="Model"}function VA(i){return i.stickType==="Plane"&&i.contentType==="MediaPlane"}function $o(i){if(i)if(Array.isArray(i)&&i.length===4){const e=i.map(Ni);return xn(e[0],e[2])}else return Ni(i)}function zh(i){if(pt(i)&&i.matrix){const t=new R.Matrix4().fromArray(i.matrix),e=i.data.mediaPosition.map(n=>new R.Vector3().fromArray(n).applyMatrix4(t));return xn(e[0],e[2])}else return $o(i.position)}function Vi(i,t){if(i===void 0)return;const{min:e,max:n}=t!=null?t:{};if(!(e===void 0&&n===void 0))return!(typeof n=="number"&&n<i||typeof e=="number"&&e>i)}function OA(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function BA(i,t,e){const o=new I.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new I.Vector3(0,1,0)).setLength(.01),r=new I.Vector3(0,.01,0);return[t.clone().sub(s).sub(r),t.clone().add(s).sub(r),t.clone().add(s).add(r),t.clone().sub(s).add(r)].map(l=>o.projectPoint(l,new I.Vector3))}const Zl=(i,t=1e3/60)=>{let e=null;const n=i;return(...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{n==null||n(...s),e&&clearTimeout(e),e=null},t)}};function RA(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function QA(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function Kl(i,t){if(!t||typeof ResizeObserver=="undefined"||!ResizeObserver)return{observe:()=>window.addEventListener("resize",i),unobserve:()=>window.removeEventListener("resize",i)};{const e=new ResizeObserver(i);return{observe:()=>e.observe(t),unobserve:()=>e.unobserve(t)}}}function HA(i){var t,e,n,o;if(!i.stickType){const s=(()=>i.pointType==="PointTag"&&i.dimensionType==="3D"?"3DPoint":i.pointType==="PlaneTag"?"Plane":"2DPoint")();i.stickType=s}if(i.contentType==="VRLink"||i.contentType==="PanoLink"||i.contentType==="Link"){const s=i;!((e=(t=s.data)==null?void 0:t.icon)!=null&&e.url)&&!((o=(n=s.style)==null?void 0:n.point)!=null&&o.url)&&(s.data.icon={url:"//vrlab-static.ljcdn.com/release/web/test.09dee741.png",steps:28})}return i}const ri="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7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8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",Fi={};var ga=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(ga||{});function GA(i,t){const e=(t==null?void 0:t.namespace)||"default",n=Fi[e]||(Fi[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===ri);return o||(console.warn("未找到缓存音频,已新建",Fi),o=new jh(ri),n.push(o)),i&&(o.src=i),o}function FA(i,t){const e=(t==null?void 0:t.namespace)||"default",n=Fi[e]||(Fi[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new jh(ri))}class jh extends Audio{constructor(e){super(e);f(this,"preload","auto");f(this,"crossOrigin","anonymous");f(this,"realSrc","");f(this,"inited",!1);f(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",this.muted=!0,super.autoplay=!0,super.addEventListener("ended",()=>{this.src=""});const n=()=>WA(this);document.addEventListener("click",n),document.addEventListener("touchend",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n),document.removeEventListener("touchend",n)}}get isBlankAudio(){return this.realSrc===ri||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e,this.removeDocumentEventListener()}get muted(){return super.muted}set muted(e){super.muted=e}clear(){this.currentTime=0,this.src=ri}}function WA(i){i&&(i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===ri&&i.play()))}const NA={globalConfig:{visibleConfig:{followModelVisibility:!0},unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},Link:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},VRLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},PanoLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0},initialData:{autoplayConfig:{autoplayCarousel:!0,autoplayVideo:!1,autoplayVideoInCarousel:!1}}},MediaModel:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{keep:"visible",visibleFiveMode:["Panorama","Floorplan","Model","Mapview"],alwaysShowWhenMovePano:!0}}}};class XA extends eo{constructor(e){super(e);f(this,"tagCacheByPanoIndex",{})}getCache({panoIndex:e,id:n,key:o}){var c,d,h;const{five:s}=this,r=e!=null?e:s.getCurrentState().panoIndex;if(r===void 0)throw new Error(`TagCacheController getCache(): fivePanoIndex is ${r}`);const a=`${(d=(c=s.work)==null?void 0:c.workCode)!=null?d:s.model.uuid}-${r}`;let l=this.tagCacheByPanoIndex[a];if(l||(l=new Map,this.tagCacheByPanoIndex[a]=l),n===void 0)return l;if(o===void 0){const u=l.get(n);return u||(l.set(n,{}),l.get(n))}return(h=l.get(n))==null?void 0:h[o]}clearCache(){this.tagCacheByPanoIndex={}}removeCache(){}}const _h=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1;navigator.userAgent.toLowerCase().indexOf("android");const Ro=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,YA=_h&&Ro;function UA(i){if(i.length!==4)return!1;const[t,e,n,o]=i,s=t.distanceTo(e),r=e.distanceTo(n),a=n.distanceTo(o),l=o.distanceTo(t),c=t.distanceTo(n),d=e.distanceTo(o);return s===a&&r===l&&c===d}class wr extends I.Mesh{constructor(e,n,o){if(e.length!==4)throw new Error("QuadrangleMesh: Invalid number of points, it's not a quadrangle");const[s,r,a,l]=e,c=xn(...e),d=[s.clone().sub(c),r.clone().sub(c),a.clone().sub(c),l.clone().sub(c)],h=new Vh(d,o);super(h,n);f(this,"name","QuadrangleMesh");this.position.copy(c)}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}class Vh extends I.BufferGeometry{constructor(e,n){super();f(this,"name","QuadrangleGeometry");f(this,"points");this.points=e;const o=n!=null?n:UA(e)?64:1;if(e.length!==4){console.error("Invalid number of points, it's not a quadrangle");return}const[s,r,a,l]=e,[c,d,h,u]=[new I.Vector2(0,0),new I.Vector2(1,0),new I.Vector2(1,1),new I.Vector2(0,1)],m=[],v=[];m.push(...s.toArray()),v.push(...c.toArray());for(let A=1;A<o;A++)m.push(s.x+(r.x-s.x)*A/o,s.y+(r.y-s.y)*A/o,s.z+(r.z-s.z)*A/o),v.push(c.x+(d.x-c.x)*A/o,c.y+(d.y-c.y)*A/o);m.push(...r.toArray()),v.push(...d.toArray()),m.push(...a.toArray()),v.push(...h.toArray());for(let A=1;A<o;A++)m.push(a.x+(l.x-a.x)*A/o,a.y+(l.y-a.y)*A/o,a.z+(l.z-a.z)*A/o),v.push(h.x+(u.x-h.x)*A/o,h.y+(u.y-h.y)*A/o);m.push(...l.toArray()),v.push(...u.toArray());const g=[];for(let A=0;A<o;A++)g.push(A,A+1,o*2-A,A,o*2-A,o*2+1-A);this.setAttribute("position",new I.BufferAttribute(new Float32Array(m),3)),this.setAttribute("uv",new I.BufferAttribute(new Float32Array(v),2)),this.setIndex(new I.BufferAttribute(new Uint32Array(g),1))}}function qA(i,t){let e=!Ro;const n=t!=null?t:document.createElement("video");n.preload="metadata",n.crossOrigin="anonymous",n.muted=!0,n.loop=!0,n.playsInline=!0,n.autoplay=!0;const o=new I.VideoTexture(n);o.minFilter=I.LinearFilter,o.magFilter=I.LinearFilter,o.encoding=I.sRGBEncoding,o.metadataLoaded=!1,n.src=i;const s=()=>{o.metadataLoaded||(o.dispatchEvent({type:"videoLoaded"}),o.metadataLoaded=!0)};if(Ro||(n.onloadedmetadata=()=>{s()}),Ro){const r=()=>{if(!e){if(!n.paused){s();return}e=!0,n.muted=!0,n.play().then(()=>{n.pause(),n.currentTime=0,s()})}};document.addEventListener("click",r,{once:!0}),_h&&document.addEventListener("touchstart",r,{once:!0})}return o}const JA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdBTOS/cgUIB3a+gMwI9mFzE3a0I3z5B4r292JzGVA8tSSZILMcUDyzIykthOZvYDk+V9Ktmz4yGzhOhV4/+5YU4N/hzqo0StX3Fg5TcnNlYvgs8bPsM4hkScHoyO46haRnGEYktQVI+4ypUYKyXtxyUu27JCceAMJvjo0HoM5CEZ7cPX7i013q3IWVV5r2aw/2TK+svWbPGU68KQCa6pYeus1V0X99quSfvtVSc39lmfz2mdbz32tg1dAJ0421AVs9E7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NJnsjF/ls0r980YRQDlAqBylIqylcCzf4lHecB5veigSfmYoBycaxN2SHgT8e7pWKZwCzqzZpigUr9DlRuoIxXn8pIZJgHtkwpa8togHIiw587LeNx9mc2ZwIK5DOlXJaMFqhWwoMp/Ax+1W+ToOXTHGKNrDMLLo38LmKsQKmbdSrWil+N82UJaS40YTuJv/RdtAdpzet+aJDzvMpQV71oo2gYX5RXG2HnYZXtouzNRzXE3R0KE6jWjZU2iaZ9u8pqpU3UfvwrYSgSBVDtGDurBlHn/zj0QMIh7qlDNOfmcBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=",ZA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAABcVBMVEUAAAAAAAD////////+/v45OTn////////39/fp6enPz8/7+/vw8PD+/v7x8fHc3NzHx8f////////+/v77+/vr6+v////7+/v5+fn////z8/P////////q6uqgoKD+/v79/f3m5ub+/v7////////////////39/f39/f////z8/P////t7e3s7Oz29vb////5+fn////h4eH////g4ODV1dX////////BwcH///////////+Ojo5zc3MlJSX////////////////////////7+/v////////////v7+/u7u7n5+f////39/f////09PT6+vr09PT+/v76+vr////5+fnv7+/09PTk5OT////////////////Jycn///++vr7///////+0tLT///9TU1P///8SEhL////////+/v76+vr////8/Pz39/ft7e3t7e36+vr////////X19fV1dX///+xsbF9fX1iYmL///////+K8mOEAAAAenRSTlMaAIDy8CD41cWRX9uk7Kl1VVEw6dWT/M/NvKyVkY475eWIgx0Z39rHv7axnZyZmIuKhn56emZjX1FEPTU0Kx4PCAX69fTgxcKkopWL7crJuri2sa6rnIyHhX54bVtZVU9NSUcsJSIcFROno6Hcwp+ekHVxbWhnRC8nDLc9s8oAAAOGSURBVE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Y9v4kVQZGavpt6c6l3tLpNsc38gGOC01IeLg4Xi8NaLz1KkqO0VzvcTrFscYo4oLjiRAsKEXeJPRqxW0bsFWLGLVbiocyZSm5vbW0nU9BsIfyp/AGqAvfOkBaFawAAAABJRU5ErkJggg==";function Ri(i,t,e){if(i==="fill")return t;if(i==="contain"){const[n,o,s,r]=t,a=n.distanceTo(o),l=s.distanceTo(r),c=n.distanceTo(r),d=o.distanceTo(s),h=a,u=c,m=h/u;if(m>e){const g=u*e,A=new I.Vector3().subVectors(o,n).multiplyScalar((a-g)/2/a),b=new I.Vector3().subVectors(s,r).multiplyScalar((l-g)/2/l);return[n.clone().add(A),o.clone().sub(A),s.clone().sub(b),r.clone().add(b)]}else if(m<e){const g=h/e,A=new I.Vector3().subVectors(r,n).multiplyScalar((c-g)/2/c),b=new I.Vector3().subVectors(s,o).multiplyScalar((d-g)/2/d);return[n.clone().add(A),o.clone().add(b),s.clone().sub(b),r.clone().sub(A)]}else return t}else return console.warn(`objectFit: ${i} is not supported yet`),t}class KA extends I.ShaderMaterial{constructor(e){super();f(this,"transparent",!1);f(this,"blending",I.CustomBlending);f(this,"blendSrc",I.SrcAlphaFactor);f(this,"blendDst",I.OneMinusSrcAlphaFactor);f(this,"blendSrcAlpha",I.OneFactor);f(this,"blendDstAlpha",I.OneMinusSrcAlphaFactor);f(this,"vertexShader",`
551
+ `,e.container.style.pointerEvents="none";const n=A=>(e.wrapper=A,A.appendChild(e.container),l(),!0),o=A=>{e.itemLabels=N0(A),l()},s=()=>(e.enabled||(e.enabled=!0,l()),!0),r=()=>(e.enabled&&(e.enabled=!1,l()),!0),a=()=>{d(),e.container.remove()},l=()=>{var A;if(e.wrapper){if(!e.enabled||!e.fiveModeEnabled){(A=e.app)==null||A.$destroy(),e.app=void 0;return}e.app?e.app.$set({five:i,itemLabels:e.itemLabels}):e.app=new W0({target:e.container,props:{five:i,modelOcclusionEnable:e.modelOcclusionEnable,itemLabels:e.itemLabels,hooks:e.hooks,displayStrategyType:e.displayStrategyType,maxVisibleDistance:e.maxVisibleDistance}})}},c=()=>{i.on("modeChange",h),i.once("dispose",a)},d=()=>{i.off("modeChange",h)},h=A=>{if(A!==ze.Five.Mode.Panorama){e.fiveModeEnabled=!1,r();return}i.once("initAnimationEnded",()=>{e.fiveModeEnabled=!0,s()})};return c(),{appendTo:n,load:o,enable:s,disable:r,dispose:a,hooks:e.hooks}},U0={name:"ItemLabelPlugin",version:0};class q0 extends eo{constructor(e){super(e);f(this,"state");f(this,"container");f(this,"enabled");this.five=e,this.five.once("dispose",this.dispose),this.enabled=!0,this.state=this.initState()}enable(e){this.enabled=!0,this.updateState(ye(F({},e),{userAction:!0}))}disable(e){this.enabled=!1,this.updateState(ye(F({},e),{userAction:!0}))}show(e){if(this.state.enabled)return this.setState(ye(F({},this.state),{visible:!0}),e),Promise.resolve()}hide(e){if(this.state.enabled)return this.setState(ye(F({},this.state),{visible:!1}),e),Promise.resolve()}dispose(){this.container.remove()}setState(e,n){if(!this.enabled)return;const o=F({},this.state);this.state=F(F(F({},this.state),e),n),this.stateChangedCallback(o,n)}get visible(){return this.five.state.mode===ze.Five.Mode.Panorama}appendTo(e){this.enabled&&(this.container=e,this.render())}updateState(e){this.setState(ye(F({},this.state),{enabled:this.enabled,visible:this.visible}),e)}}function J0(i){fe(i,"svelte-wpy7pz",'.plugin-DoorLabelPlugin-item.svelte-wpy7pz.svelte-wpy7pz{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity 0.3s ease}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz{position:absolute;top:50%;left:50%;border-radius:0.125rem;background:rgba(0, 0, 0, 0.35);line-height:0.75rem;padding:0.375rem;white-space:nowrap;font-size:0.75rem;font-style:normal;color:white;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform ease 1s, background ease 0.3s, color ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz::after{content:"";display:block;position:absolute;top:-0.0625rem;left:-0.0625rem;bottom:-0.0625rem;right:-0.0625rem;border-radius:0.125rem;border:0.0625rem solid rgba(0, 0, 0, 0);-o-border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;border-image:url("//vrlab-image4.ljcdn.com/release/web/highlightCarouseal-border-image.14b51834.png") 4;transition:opacity ease 0.3s}.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(255, 255, 255, 0.5)}.plugin-DoorLabelPlugin-icon.svelte-wpy7pz.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/DoorLabel-icon.de1304ae.svg") no-repeat;background-size:100%;display:inline-block;width:0.625rem;height:0.625rem;margin-left:0.25rem;transform-origin:center}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=forward].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=right].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].back.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=left].forward.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].right.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(90deg)}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-txt.svelte-wpy7pz{order:1}.plugin-DoorLabelPlugin-cnt[data-camera-toward=back].left.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{transform:rotate(-90deg);margin-left:0;margin-right:0.25rem;order:0}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz{color:#f9eac1}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz .plugin-DoorLabelPlugin-icon.svelte-wpy7pz{background:url("//vrlab-image4.ljcdn.com/release/web/arrow.6e8ec00e.svg") no-repeat}.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:active,.plugin-DoorLabelPlugin-cnt--customBrand.svelte-wpy7pz.svelte-wpy7pz:focus{background:rgba(0, 0, 0, 0.5);color:rgba(249, 234, 193, 0.5)}')}function Z0(i){let t,e,n,o,s,r,a,l;return{c(){t=z("div"),e=z("div"),n=z("span"),n.textContent=`${i[8]}`,o=ne(),s=z("i"),w(n,"class","plugin-DoorLabelPlugin-txt svelte-wpy7pz"),w(s,"class","plugin-DoorLabelPlugin-icon svelte-wpy7pz"),w(e,"class",r=Be(it("plugin-DoorLabelPlugin-cnt",i[0].toward))+" svelte-wpy7pz"),w(e,"style",`transform: ${i[6]||"initial"};pointer-events: ${i[5]?"auto":"none"};opacity: ${i[5]?1:0}`),w(e,"data-camera-toward",i[7]),w(t,"style",`left: ${i[3]||0}%;top: ${i[4]||0}%;opacity: ${i[5]?1:0}`),w(t,"class","plugin-DoorLabelPlugin-item svelte-wpy7pz")},m(c,d){j(c,t,d),O(t,e),O(e,n),O(e,o),O(e,s),i[10](t),a||(l=Ce(e,"click",i[9]),a=!0)},p(c,[d]){d&1&&r!==(r=Be(it("plugin-DoorLabelPlugin-cnt",c[0].toward))+" svelte-wpy7pz")&&w(e,"class",r)},i:K,o:K,d(c){c&&V(t),i[10](null),a=!1,l()}}}function K0(i,t,e){let{props:n}=t,{onClick:o}=t,s,{left:r,top:a,inSight:l,transform:c,panoIndex:d,cameraToward:h,name:u}=n;const m=()=>{if(!r||!a||!l||!s)return;const A=s.current.clientWidth/window.innerWidth*100,b=s.current.clientHeight/window.innerHeight*100;r<=A/2||r>=100-A/2||a<=b/2||a>=100-b/2},v=A=>{o&&o()};function g(A){Ke[A?"unshift":"push"](()=>{s=A,e(2,s)})}return i.$$set=A=>{"props"in A&&e(0,n=A.props),"onClick"in A&&e(1,o=A.onClick)},m(),[n,o,s,r,a,l,c,h,u,v,g]}class $0 extends ce{constructor(t){super(),le(this,t,K0,Z0,ae,{props:0,onClick:1},J0)}}function eA(i,t){const e=Math.abs(i.top+i.height/2-t.top-t.height/2),n=Math.abs(i.left+i.width/2-t.left-t.width/2),o=(i.height+t.height)/2,s=(i.width+t.width)/2;return!(e>o&&n>s)}function tA(i){const{camera:t}=i,e=t.getWorldDirection(new R.Vector3);let n=Math.atan(e.z/e.x)*180/Math.PI,o="";return e.x<0&&(n+=180),n<0&&(n+=360),n>315||n<=45?o="right":n>45&&n<=135?o="back":n>135&&n<=225?o="left":n>225&&n<=315&&(o="forward"),o}function nA(i,t){return Math.sqrt(Math.pow(i.z-t.z,2)+Math.pow(i.x-t.x,2))}function iA(i){const t=Math.PI/4;return i>-t&&i<=t?"left":i>t*3||i<=-t*3?"right":i>-t*3&&i<=-t?"forward":i>t&&i<=t*3?"back":""}const oA={userAction:!0};class sA extends q0{constructor(e){super(e);f(this,"MinVisibledistance",1.8);f(this,"MaxVisibledistance",5);f(this,"OffsetHeight",-1.3);f(this,"rooms");f(this,"floorplanServerData");f(this,"doorLabelItems");f(this,"visibleLabelMap",new Map);f(this,"labelItems",[]);f(this,"doorLabels");f(this,"roomObservers");f(this,"loadData",(e,n)=>{n&&(this.MaxVisibledistance=n.MaxVisibledistance,this.MinVisibledistance=n.MinVisibledistance,this.OffsetHeight=n.OffsetHeight),this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(o=>{o.$destroy()}),this.labelItems=[],this.doorLabels=[],this.doorLabelItems=[],this.floorplanServerData=e,typeof this.five.ready=="function"?this.five.ready().then(()=>this.initData()):this.five.once("panoArrived",()=>{this.initData()})});f(this,"initRoomObservers",()=>{var s,r;const e=this.floorplanServerData.computed_data.floor_datas||[],o=(((r=(s=this.five)==null?void 0:s.work)==null?void 0:r.observers)||[]).map(a=>{const l=a.panoIndex,c=a.floorIndex,d=e==null?void 0:e.find(h=>h.floor_index===c);if(d){const h=d.rooms.find(u=>u.observer_indexs.includes(l));if(h)return{panoIndex:l,floorIndex:c,name:h.name}}}).filter(Boolean);this.roomObservers=o});f(this,"hideAllLabels",()=>{this.labelItems.forEach(e=>{e.visible=!1,e.inSight=!1}),this.render()});f(this,"fixDoorVisibleAndPosition",()=>{this.initRoomObservers();const{panoIndex:e}=this.five;if(!this.visible||this.five.model.empty||e===null||!this.roomObservers.find(a=>a.panoIndex===e))return;const n=this.roomObservers.find(a=>a.panoIndex===e),s=this.five.work.observers.find(a=>a.panoIndex===e).position.clone(),r=(()=>{if(this.visibleLabelMap.has(e))return this.visibleLabelMap.get(e);{const a=[];return this.doorLabels.forEach((l,c)=>{if(l.roomName===n.name)return;const d=l.position.clone(),h=d.distanceTo(s);if(h<this.MinVisibledistance||h>this.MaxVisibledistance)return;const u=new R.Raycaster,m=d.clone().sub(s).normalize();u.set(s,m);const[v]=this.five.model.intersectRaycaster(u);v&&v.distance+.1<h||a.push(c)}),this.visibleLabelMap.set(e,a),a}})();this.labelItems.forEach((a,l)=>{a.visible=r.includes(l)}),this.fixDoorPosition()});f(this,"fixDoorPosition",()=>{var d,h,u,m,v,g,A,b,y,E,k,S;const{panoIndex:e,camera:n}=this.five;if(e===null)return;if(this.five.currentMode!=="Panorama")return this.hideAllLabels();const o=this.five.getElement(),s=o.clientWidth,r=o.clientHeight,a=n.getWorldDirection(new R.Vector3),l=[],c=[...this.labelItems];if(c.forEach((C,_)=>{if(C.visible){const M=n.position.distanceTo(C.position),X=C.position.clone().add(new R.Vector3(0,this.OffsetHeight,0)),H=X.clone().sub(n.position).normalize().angleTo(a),Q=X.clone().project(n),G=(Q.x+1)/2.2*100,B=(-Q.y+1)/2.2*100,W=G>=0&&G<=100&&B>=0&&B<=100&&M>this.MinVisibledistance&&M<=this.MaxVisibledistance;C.left=G,C.top=B,C.inSight=W&&H<Math.PI/2,C.cameraToward=tA(this.five),W?l.push({disFromCameraToLabel:M,left:G,top:B,index:_}):C.transform="translate(-50%, -50%)"}else C.inSight=!1}),l.length>1){let C=0;l.sort((_,M)=>M.disFromCameraToLabel-_.disFromCameraToLabel);for(let _=1;_<l.length;_++){const{index:M,left:X,top:J}=l[_-1],{index:H,left:Q,top:G}=l[_],B=this.container.children[M],W=this.container.children[H];if(!B||!W)return;const q={left:s*X/100,top:r*J/100,width:(u=(h=(d=B.children)==null?void 0:d[0])==null?void 0:h.clientWidth)!=null?u:0,height:(g=(v=(m=B.children)==null?void 0:m[0])==null?void 0:v.clientHeight)!=null?g:0},U={left:s*Q/100,top:r*G/100,width:(y=(b=(A=W.children)==null?void 0:A[0])==null?void 0:b.clientWidth)!=null?y:0,height:(S=(k=(E=W.children)==null?void 0:E[0])==null?void 0:k.clientHeight)!=null?S:0};eA(q,U)&&(C++,c[M].transform=`translate(-50%, ${(C-1)*100-50}%)`,c[H].transform=`translate(-50%, ${C*100-50}%)`)}}this.labelItems=c,this.render()});f(this,"onClick",(e,n)=>{if(!this.roomObservers)return;const{work:o}=this.five;let s,r,a=1/0;for(const l of o.observers)if(this.roomObservers.find(d=>d.panoIndex===l.panoIndex&&d.name===e)){const d=l.standingPosition,h=n.distanceTo(d);h<a&&(s=l.panoIndex,r=d.clone().sub(n).normalize(),a=h)}if(r!==null&&s!==null){const l={};if(a>0){const d=new R.Vector3(0,0,-1),h=r.clone(),u=new R.Quaternion;u.setFromUnitVectors(d,h);const m=new R.Euler;m.setFromQuaternion(u,"YXZ"),l.longitude=m.y}this.five.emit("wantsToMoveToPano",s,{},!0)||this.five.moveToPano(s,{longitude:l.longitude})}});f(this,"initData",()=>{var s;this.doorLabels=[];const e=this.five.panoIndex,n=this.floorplanServerData.computed_data.observers[e].floor_index,o=n!==void 0&&((s=this.floorplanServerData.computed_data.floor_datas[n])==null?void 0:s.rooms);this.rooms=o,this.rooms&&this.rooms.length>0&&this.rooms.forEach(r=>{var c;const a=(c=this.floorplanServerData.computed_data.doors)==null?void 0:c.filter(d=>!!(d&&d.name===r.name)),l=this.five.work.observers.filter((d,h)=>!!r.observer_indexs.find(u=>u===h));a&&a.forEach(d=>{const h=d.position;let u=1/0,m;l.forEach(g=>{const A=g.standingPosition,b={x:A.x,y:A.y,z:A.z},y=nA(h,b);y<u&&(u=y,m=b)}),m&&(h.y=m.y+.01);const v=new R.Vector3(h.x,h.y,h.z);v.add(new R.Vector3(-.2,1.8,0).applyEuler(new R.Euler(0,d.rad,0))),this.doorLabels.push({roomName:r.name,name:d.name,position:v,toward:iA(d.rad)})})}),this.labelItems=this.doorLabels.map(r=>ye(F({},r),{left:0,top:0,visible:!1,inSight:!1,transform:"",cameraToward:""})),this.five.on("wantsToMoveToPano",this.hideAllLabels),this.five.on("modelLoaded",this.fixDoorVisibleAndPosition),this.five.on("panoArrived",this.fixDoorVisibleAndPosition),this.five.on("initAnimationEnded",this.fixDoorPosition),this.five.on("cameraUpdate",this.fixDoorPosition),this.five.on("mouseWheel",this.fixDoorPosition),this.five.on("pinchGesture",this.fixDoorPosition),this.fixDoorVisibleAndPosition()})}stateChangedCallback(e,n){if(this.hooks.hasListener("stateChange")){const o={state:this.state,prevState:e,userAction:n?n.userAction:oA.userAction};this.hooks.emit("stateChange",o)}}render(){if(!this.enabled){this.doorLabelItems&&this.doorLabelItems.length>0&&this.doorLabelItems.forEach(e=>{e==null||e.$destroy()}),this.doorLabels=void 0;return}this.doorLabelItems&&this.doorLabelItems.forEach(e=>{e.$destroy()}),this.doorLabelItems=[],this.labelItems.forEach(e=>{this.doorLabelItems.push(new $0({target:this.container,props:{props:e,onClick:()=>{this.onClick(e.name,e.position)}}}))})}initState(){return{enabled:!0,visible:!0}}dispose(){this&&this.five&&(this.five.off("wantsToMoveToPano",this.hideAllLabels),this.five.off("modelLoaded",this.fixDoorVisibleAndPosition),this.five.off("panoArrived",this.fixDoorVisibleAndPosition),this.five.off("initAnimationEnded",this.fixDoorPosition),this.five.off("cameraUpdate",this.fixDoorPosition),this.five.off("mouseWheel",this.fixDoorPosition),this.five.off("pinchGesture",this.fixDoorPosition),super.dispose())}}const rA=i=>new sA(i);function aA(i,t){console.warn(`⛔ ==> [${i}]: ${t}`)}function Sh(i,t){console.warn(`🚫 ==> [${i}]: ${t}`)}var gs={},lA=cA;function cA(i,t,e){return i[0]=t[0]+e[0],i[1]=t[1]+e[1],i}var dA=hA;function hA(i,t,e){return i[0]=t,i[1]=e,i}var uA=fA;function fA(i,t){var e=t[0],n=t[1],o=e*e+n*n;return o>0&&(o=1/Math.sqrt(o),i[0]=t[0]*o,i[1]=t[1]*o),i}var mA=pA;function pA(i,t,e){return i[0]=t[0]-e[0],i[1]=t[1]-e[1],i}var gA=vA;function vA(i,t){return i[0]*t[0]+i[1]*t[1]}var AA=lA,Nr=dA,Lh=uA,bA=mA,yA=gA,ql=[0,0];gs.computeMiter=function(t,e,n,o,s){return AA(t,n,o),Lh(t,t),Nr(e,-t[1],t[0]),Nr(ql,-n[1],n[0]),s/yA(e,ql)};gs.normal=function(t,e){return Nr(t,-e[1],e[0]),t};gs.direction=function(t,e,n){return bA(t,e,n),Lh(t,t),t};var Nt=gs,yn=[0,0],Lo=[0,0],Jl=[0,0],Vi=[0,0],wA=function(i,t){var e=null,n=[];t&&(i=i.slice(),i.push(i[0]));for(var o=i.length,s=1;s<o;s++){var r=i[s-1],a=i[s],l=s<i.length-1?i[s+1]:null;if(Nt.direction(yn,a,r),e||(e=[0,0],Nt.normal(e,yn)),s===1&&br(n,e,1),!l)Nt.normal(e,yn),br(n,e,1);else{Nt.direction(Lo,l,a);var c=Nt.computeMiter(Jl,Vi,yn,Lo,1);br(n,Vi,c)}}if(i.length>2&&t){var d=i[o-2],h=i[0],u=i[1];Nt.direction(yn,h,d),Nt.direction(Lo,u,h),Nt.normal(e,yn);var m=Nt.computeMiter(Jl,Vi,yn,Lo,1);n[0][0]=Vi.slice(),n[o-1][0]=Vi.slice(),n[0][1]=m,n[o-1][1]=m,n.pop()}return n};function br(i,t,e){i.push([[t[0],t[1]],e])}const PA=2,CA=3,EA=3,IA=2;function kA(i){const t=i.width,n=i.unitLength/t,o=t/2,s=i.path;if(s.length===0)return{geometry:new I.BufferGeometry,maxU:0};const r=new I.CurvePath;s.forEach(C=>{const _=xA(C);_&&r.add(_)});const a=Math.ceil(r.getLength()*100);r.arcLengthDivisions=a;const l=r.getPoints(a),c=l.length,d=wA(l.map(C=>[C.x,C.z])),u=(c-1)*PA*CA,m=2*c,v=m*EA,g=m*IA,A=new Uint32Array(u),b=new Float32Array(v),y=new Float32Array(g);let E=0,k=0;for(let C=0;C<l.length;C++){const[_,M]=d[C][0],X=l[C],{x:J,y:H,z:Q}=X,G=new R.Vector3(J+_*o,H+.05,Q+M*o);b[C*6+0]=G.x,b[C*6+1]=G.y,b[C*6+2]=G.z;const B=new R.Vector3(J-_*o,H+.05,Q-M*o);b[C*6+3]=B.x,b[C*6+4]=B.y,b[C*6+5]=B.z,E+=C>0?l[C-1].clone().sub(l[C]).length():0;const W=E/t/n;if(k=W,y[C*4+0]=0,y[C*4+1]=W,y[C*4+2]=1,y[C*4+3]=W,i.skipPositions){const q=new I.Vector3().lerpVectors(G,B,.5);if(i.skipPositions.some(Z=>Z.distanceTo(q)<.26))continue}C!==l.length-1&&(A[C*6+0]=C*2+0,A[C*6+1]=C*2+2,A[C*6+2]=C*2+1,A[C*6+3]=C*2+2,A[C*6+4]=C*2+3,A[C*6+5]=C*2+1)}const S=new I.BufferGeometry;return S.setAttribute("position",new I.BufferAttribute(b,3)),S.setAttribute("uv",new I.BufferAttribute(y,2)),S.setIndex(new I.BufferAttribute(A,1)),{geometry:S,maxU:k,curvePath:r,curvePoints:l}}function xA(i){if(DA(i)){const t=[i.closed,i.curve_type,i.tension],e=i.points.map(o=>new I.Vector3().fromArray(o));return new I.CatmullRomCurve3(e,...t)}}function DA(i){return i.type==="CatmullRomCurve3"}var Ye={},MA={get exports(){return Ye},set exports(i){Ye=i}};function Ko(i){return i===null?"null":typeof i=="undefined"?"undefined":typeof i=="object"?Array.isArray(i)?"array":"object":typeof i}function Th(i){return Ko(i)==="object"?Yr(i):Ko(i)==="array"?Xr(i):i}function Xr(i){return i.map(Th)}function Yr(i){const t={};for(const e in i)i.hasOwnProperty(e)&&(t[e]=Th(i[e]));return t}function vs(i,t=[],e={}){const n={arrayBehaviour:e.arrayBehaviour||"replace"},o=t.map(r=>r||{}),s=i||{};for(let r=0;r<o.length;r++){const a=o[r],l=Object.keys(a);for(let c=0;c<l.length;c++){const d=l[c],h=a[d],u=Ko(h),m=Ko(s[d]);if(u==="object")if(m!=="undefined"){const v=m==="object"?s[d]:{};s[d]=vs({},[v,Yr(h)],n)}else s[d]=Yr(h);else if(u==="array")if(m==="array"){const v=Xr(h);s[d]=n.arrayBehaviour==="merge"?s[d].concat(v):v}else s[d]=Xr(h);else s[d]=h}}return s}MA.exports=function(t,...e){return vs(t,e)};Ye.noMutate=function(...t){return vs({},t)};Ye.withOptions=function(t,e,n){return vs(t,e,n)};function SA(i,t){t.forEach(e=>{const n=new I.SphereGeometry(.02,16,16),o=[],s=[new I.MeshBasicMaterial({color:16776960}),new I.MeshBasicMaterial({color:16711935}),new I.MeshBasicMaterial({color:16711680}),new I.MeshBasicMaterial({color:65535})];if(e.position.length===4)e.position.forEach((r,a)=>{const l=s[a],c=new I.Mesh(n,l);c.position.copy(xt(r)),o.push(c)});else{const r=s[0],a=new I.Mesh(n,r);a.position.copy(xt(e.position)),o.push(a)}o.forEach(r=>{r.material.depthTest=!1,i.scene.add(r)})})}const He=i=>i;function yr(i){if(!i||i.length<3)return;const t=i.map(Ni),e=t[1].clone().sub(t[0]),n=t[2].clone().sub(t[1]);return e.cross(n)}function LA(i){return i.stickType==="Plane"}function TA(i){return i.stickType==="3DPoint"}function zA(i){return i.stickType==="3DPoint"||i.stickType==="Plane"}function pt(i){return i.stickType==="Model"&&i.contentType==="MediaModel"}function _A(i){return i.stickType==="Model"&&i.contentType==="Model"}function VA(i){return i.stickType==="Model"}function jA(i){return i.stickType==="Plane"&&i.contentType==="MediaPlane"}function $o(i){if(i)if(Array.isArray(i)&&i.length===4){const e=i.map(Ni);return xn(e[0],e[2])}else return Ni(i)}function zh(i){if(pt(i)&&i.matrix){const t=new R.Matrix4().fromArray(i.matrix),e=i.data.mediaPosition.map(n=>new R.Vector3().fromArray(n).applyMatrix4(t));return xn(e[0],e[2])}else return $o(i.position)}function ji(i,t){if(i===void 0)return;const{min:e,max:n}=t!=null?t:{};if(!(e===void 0&&n===void 0))return!(typeof n=="number"&&n<i||typeof e=="number"&&e>i)}function OA(i){return new Promise(t=>{i.model.loaded?t():i.once("modelLoaded",()=>t())})}function BA(i,t,e){const o=new I.Plane().setFromNormalAndCoplanarPoint(e,t),s=t.clone().sub(i).cross(new I.Vector3(0,1,0)).setLength(.01),r=new I.Vector3(0,.01,0);return[t.clone().sub(s).sub(r),t.clone().add(s).sub(r),t.clone().add(s).add(r),t.clone().sub(s).add(r)].map(l=>o.projectPoint(l,new I.Vector3))}const Zl=(i,t=1e3/60)=>{let e=null;const n=i;return(...s)=>{e&&clearTimeout(e),e=setTimeout(()=>{n==null||n(...s),e&&clearTimeout(e),e=null},t)}};function RA(i,t=200){let e;return function(...n){e||(i.apply(this,n),e=setTimeout(function(){e=null},t))}}function QA(i,t){const[e,n]=t;if(e>=n||n<=1||e<=1)return-1;const o={},s=r=>(o[r]||(o[r]=i(r)),o[r]);for(let r=e;r<n;r++){const a=s(r),l=s(r-1);if(a<l)return r}return-1}function Kl(i,t){if(!t||typeof ResizeObserver=="undefined"||!ResizeObserver)return{observe:()=>window.addEventListener("resize",i),unobserve:()=>window.removeEventListener("resize",i)};{const e=new ResizeObserver(i);return{observe:()=>e.observe(t),unobserve:()=>e.unobserve(t)}}}function HA(i){var t,e,n,o;if(!i.stickType){const s=(()=>i.pointType==="PointTag"&&i.dimensionType==="3D"?"3DPoint":i.pointType==="PlaneTag"?"Plane":"2DPoint")();i.stickType=s}if(i.contentType==="VRLink"||i.contentType==="PanoLink"||i.contentType==="Link"){const s=i;!((e=(t=s.data)==null?void 0:t.icon)!=null&&e.url)&&!((o=(n=s.style)==null?void 0:n.point)!=null&&o.url)&&(s.data.icon={url:"//vrlab-static.ljcdn.com/release/web/test.09dee741.png",steps:28})}return i}const ri="data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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KxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=",Fi={};var ga=(i=>(i.Default="default",i.GetAudioDuration="getAudioDuration",i.PlayAudio="playAudio",i))(ga||{});function GA(i,t){const e=(t==null?void 0:t.namespace)||"default",n=Fi[e]||(Fi[e]=[]);let o=n.find(s=>!s.realSrc||s.realSrc===ri);return o||(console.warn("未找到缓存音频,已新建",Fi),o=new _h(ri),n.push(o)),i&&(o.src=i),o}function FA(i,t){const e=(t==null?void 0:t.namespace)||"default",n=Fi[e]||(Fi[e]=[]),o=i-n.length;if(!(o<=0))for(let s=0;s<o;s++)n.push(new _h(ri))}class _h extends Audio{constructor(e){super(e);f(this,"preload","auto");f(this,"crossOrigin","anonymous");f(this,"realSrc","");f(this,"inited",!1);f(this,"removeDocumentEventListener");this.realSrc=e!=null?e:"",this.muted=!0,super.autoplay=!0,super.addEventListener("ended",()=>{this.src=""});const n=()=>WA(this);document.addEventListener("click",n),document.addEventListener("touchend",n),this.removeDocumentEventListener=()=>{document.removeEventListener("click",n),document.removeEventListener("touchend",n)}}get isBlankAudio(){return this.realSrc===ri||!this.realSrc}get src(){return super.src}set src(e){super.src=e,this.realSrc=e,this.removeDocumentEventListener()}get muted(){return super.muted}set muted(e){super.muted=e}clear(){this.currentTime=0,this.src=ri}}function WA(i){i&&(i.inited||(i.src&&(i.inited=!0,i.removeDocumentEventListener()),i.src===ri&&i.play()))}const NA={globalConfig:{visibleConfig:{followModelVisibility:!0},unfoldedConfig:{autoUnfold:{strategy:"MinimumDistance",distance:{max:5}}},tag3DConfig:{ratio:.0035}},contentTypeConfig:{"Any-Audio-plane":{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},Link:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},VRLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},PanoLink:{unfoldedConfig:{keep:"unfolded"},initialState:{unfolded:!0}},MediaPlane:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{alwaysShowWhenMovePano:!0},initialData:{autoplayConfig:{autoplayCarousel:!0,autoplayVideo:!1,autoplayVideoInCarousel:!1}}},MediaModel:{unfoldedConfig:{keep:"unfolded"},visibleConfig:{keep:"visible",visibleFiveMode:["Panorama","Floorplan","Model","Mapview"],alwaysShowWhenMovePano:!0}}}};class XA extends eo{constructor(e){super(e);f(this,"tagCacheByPanoIndex",{})}getCache({panoIndex:e,id:n,key:o}){var c,d,h;const{five:s}=this,r=e!=null?e:s.getCurrentState().panoIndex;if(r===void 0)throw new Error(`TagCacheController getCache(): fivePanoIndex is ${r}`);const a=`${(d=(c=s.work)==null?void 0:c.workCode)!=null?d:s.model.uuid}-${r}`;let l=this.tagCacheByPanoIndex[a];if(l||(l=new Map,this.tagCacheByPanoIndex[a]=l),n===void 0)return l;if(o===void 0){const u=l.get(n);return u||(l.set(n,{}),l.get(n))}return(h=l.get(n))==null?void 0:h[o]}clearCache(){this.tagCacheByPanoIndex={}}removeCache(){}}const Vh=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1;navigator.userAgent.toLowerCase().indexOf("android");const Ro=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,YA=Vh&&Ro;function UA(i){if(i.length!==4)return!1;const[t,e,n,o]=i,s=t.distanceTo(e),r=e.distanceTo(n),a=n.distanceTo(o),l=o.distanceTo(t),c=t.distanceTo(n),d=e.distanceTo(o);return s===a&&r===l&&c===d}class wr extends I.Mesh{constructor(e,n,o){if(e.length!==4)throw new Error("QuadrangleMesh: Invalid number of points, it's not a quadrangle");const[s,r,a,l]=e,c=xn(...e),d=[s.clone().sub(c),r.clone().sub(c),a.clone().sub(c),l.clone().sub(c)],h=new jh(d,o);super(h,n);f(this,"name","QuadrangleMesh");this.position.copy(c)}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}}class jh extends I.BufferGeometry{constructor(e,n){super();f(this,"name","QuadrangleGeometry");f(this,"points");this.points=e;const o=n!=null?n:UA(e)?64:1;if(e.length!==4){console.error("Invalid number of points, it's not a quadrangle");return}const[s,r,a,l]=e,[c,d,h,u]=[new I.Vector2(0,0),new I.Vector2(1,0),new I.Vector2(1,1),new I.Vector2(0,1)],m=[],v=[];m.push(...s.toArray()),v.push(...c.toArray());for(let A=1;A<o;A++)m.push(s.x+(r.x-s.x)*A/o,s.y+(r.y-s.y)*A/o,s.z+(r.z-s.z)*A/o),v.push(c.x+(d.x-c.x)*A/o,c.y+(d.y-c.y)*A/o);m.push(...r.toArray()),v.push(...d.toArray()),m.push(...a.toArray()),v.push(...h.toArray());for(let A=1;A<o;A++)m.push(a.x+(l.x-a.x)*A/o,a.y+(l.y-a.y)*A/o,a.z+(l.z-a.z)*A/o),v.push(h.x+(u.x-h.x)*A/o,h.y+(u.y-h.y)*A/o);m.push(...l.toArray()),v.push(...u.toArray());const g=[];for(let A=0;A<o;A++)g.push(A,A+1,o*2-A,A,o*2-A,o*2+1-A);this.setAttribute("position",new I.BufferAttribute(new Float32Array(m),3)),this.setAttribute("uv",new I.BufferAttribute(new Float32Array(v),2)),this.setIndex(new I.BufferAttribute(new Uint32Array(g),1))}}function qA(i,t){let e=!Ro;const n=t!=null?t:document.createElement("video");n.preload="metadata",n.crossOrigin="anonymous",n.muted=!0,n.loop=!0,n.playsInline=!0,n.autoplay=!0;const o=new I.VideoTexture(n);o.minFilter=I.LinearFilter,o.magFilter=I.LinearFilter,o.encoding=I.sRGBEncoding,o.metadataLoaded=!1,n.src=i;const s=()=>{o.metadataLoaded||(o.dispatchEvent({type:"videoLoaded"}),o.metadataLoaded=!0)};if(Ro||(n.onloadedmetadata=()=>{s()}),Ro){const r=()=>{if(!e){if(!n.paused){s();return}e=!0,n.muted=!0,n.play().then(()=>{n.pause(),n.currentTime=0,s()})}};document.addEventListener("click",r,{once:!0}),Vh&&document.addEventListener("touchstart",r,{once:!0})}return o}const JA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAYAAADFw8lbAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKqADAAQAAAABAAAAKgAAAADUGqULAAAB0ElEQVRYCe2WSUoEQRBFLVHEiVZU1I03cKW38SSewRt4A5fiTty5cQIFR9pZQWkcUNSe2/Z9yISiSGxRkUAy4BGZSVX168gistraYsQKxArECsQKxApYqkDyU5lmsznMM+ZgAGpQhaUkSRbINgLJCXiCBtSgAkVYtGGIBTKj8AgKSVahDNvQa0IUkUG4Bx91BpLdB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fmIlMnJ+K/MojfzIrl8B3kpU1osxJSYtTAL8wKf4EYJQFk+JeQMlvE3UcLRmTkkUANm1ZOZmE24dqGU5gOfCyZkyGWQT+IykW8zmSz0IpiLNN8t5iTmdTkgGTrInI7JcfULaH10Qnh/4IMVjAxNk6jxwajuUb8lqOZRT3S/lx06RY1g8C4akfiEJAOZdFKzsq/nNjIssdufjbhQAEAUodOGDWp4m8S0oHEhb+YexGkD4EBUpdVMrfl/E/RhNJnsjF/ls0r980YRQDlAqBylIqylcCzf4lHecB5veigSfmYoBycaxN2SHgT8e7pWKZwCzqzZpigUr9DlRuoIxXn8pIZJgHtkwpa8togHIiw587LeNx9mc2ZwIK5DOlXJaMFqhWwoMp/Ax+1W+ToOXTHGKNrDMLLo38LmKsQKmbdSrWil+N82UJaS40YTuJv/RdtAdpzet+aJDzvMpQV71oo2gYX5RXG2HnYZXtouzNRzXE3R0KE6jWjZU2iaZ9u8pqpU3UfvwrYSgSBVDtGDurBlHn/zj0QMIh7qlDNOfmcBj9ihKo9o+l1euiWGxSE5eun3na6jxQk3joEgdQ7TR+FWutE43lhQpph3sQvISAVRa9ppRzipY4gZqdw8/WigIWDWt1gD8EIsqSLlT/KPUVlKSAujs2XTLYeRHiIlA2DVi1qkRtK8PSULaEDF+Ue7ashwkTlf8DQc/cITdx9+UAAAAASUVORK5CYII=",ZA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAABcVBMVEUAAAAAAAD////////+/v45OTn////////39/fp6enPz8/7+/vw8PD+/v7x8fHc3NzHx8f////////+/v77+/vr6+v////7+/v5+fn////z8/P////////q6uqgoKD+/v79/f3m5ub+/v7////////////////39/f39/f////z8/P////t7e3s7Oz29vb////5+fn////h4eH////g4ODV1dX////////BwcH///////////+Ojo5zc3MlJSX////////////////////////7+/v////////////v7+/u7u7n5+f////39/f////09PT6+vr09PT+/v76+vr////5+fnv7+/09PTk5OT////////////////Jycn///++vr7///////+0tLT///9TU1P///8SEh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HkjS89MPz0MFnhKdCSWpc8RBnPAZB3RUvLt7i3oob7f5juDzuikY81tjcHlcHg9xabdyUWDvF2ay3slecr1ptimNx9lhhs1bzXQxy5NZa6VMx9pS2Wt1H77cVjFartYvBdlDICDc0cbVa3Twd2NcOyuLwVqo+K1ebjgdcr0k+O1uXwThfl8vlhqm+99kASup5GINsYhhmG8d7UXzcBgo2e21cd9WlUll5/7G958ql8uxu7y0zS5SGSkOGBA51TRiGQAi232Y9v4kVQZGavpt6c6l3tLpNsc38gGOC01IeLg4Xi8NaLz1KkqO0VzvcTrFscYo4oLjiRAsKEXeJPRqxW0bsFWLGLVbiocyZSm5vbW0nU9BsIfyp/AGqAvfOkBaFawAAAABJRU5ErkJggg==";function Ri(i,t,e){if(i==="fill")return t;if(i==="contain"){const[n,o,s,r]=t,a=n.distanceTo(o),l=s.distanceTo(r),c=n.distanceTo(r),d=o.distanceTo(s),h=a,u=c,m=h/u;if(m>e){const g=u*e,A=new I.Vector3().subVectors(o,n).multiplyScalar((a-g)/2/a),b=new I.Vector3().subVectors(s,r).multiplyScalar((l-g)/2/l);return[n.clone().add(A),o.clone().sub(A),s.clone().sub(b),r.clone().add(b)]}else if(m<e){const g=h/e,A=new I.Vector3().subVectors(r,n).multiplyScalar((c-g)/2/c),b=new I.Vector3().subVectors(s,o).multiplyScalar((d-g)/2/d);return[n.clone().add(A),o.clone().add(b),s.clone().sub(b),r.clone().sub(A)]}else return t}else return console.warn(`objectFit: ${i} is not supported yet`),t}class KA extends I.ShaderMaterial{constructor(e){super();f(this,"transparent",!1);f(this,"blending",I.CustomBlending);f(this,"blendSrc",I.SrcAlphaFactor);f(this,"blendDst",I.OneMinusSrcAlphaFactor);f(this,"blendSrcAlpha",I.OneFactor);f(this,"blendDstAlpha",I.OneMinusSrcAlphaFactor);f(this,"vertexShader",`
552
552
  varying vec2 vUv;
553
553
  void main() {
554
554
  vUv = uv;
@@ -561,24 +561,24 @@ void main() {
561
561
  void main() {
562
562
  gl_FragColor = texture2D(map, vUv);
563
563
  }
564
- `);this.uniforms={map:{value:e}}}}let Bh=class extends I.Mesh{constructor(){super(...arguments);f(this,"name","MediaPlane");f(this,"src")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}};class $l extends Bh{constructor(e,n,o){super();f(this,"name","PanoTagPluginImagePlane");this.src=e,Ui(e).then(s=>{var u;const r=new URL(e,location.href).pathname.endsWith(".png"),a=new I.MeshBasicMaterial({map:s,transparent:r}),l=Ri((u=o==null?void 0:o.objectFit)!=null?u:"contain",n,s.image.width/s.image.height),c=xn(...l),d=l.map(m=>m.clone().sub(c)),h=new Vh(d);this.position.copy(c),this.geometry=h,this.material=a}).catch(s=>{console.error(`Imageplane error ${s}`)})}}class qr extends Bh{constructor(e,n,o){const{videoCoverSrc:s,objectFit:r="contain",playButton:a="withText",paused:l=!0,videoTextureMap:c,ImageTextureMap:d}=o!=null?o:{};super();f(this,"isVideoPlane",!0);f(this,"name","PanoTagPluginImagePlane");f(this,"videoInstance");f(this,"onVideoReady");f(this,"objectFit");f(this,"buttonSrc");f(this,"videoCoverSrc");f(this,"domEvents");f(this,"disposers",[]);f(this,"domEventsListenerTemporaryList",[]);f(this,"cornerPoints");f(this,"videoMesh");f(this,"coverMesh");f(this,"buttonMesh");f(this,"videoTextureMap");f(this,"ImageTextureMap");this.cornerPoints=n,this.src=e,this.buttonSrc=(()=>a==="withText"?Oh:a==="withoutText"?Ur:typeof a=="string"?a:Ur)(),this.videoCoverSrc=s,this.objectFit=r,this.videoTextureMap=c,this.ImageTextureMap=d,this.position.copy(xn(...n)),this.videoCoverSrc&&l?this.addCoverMesh().then(()=>this.addButtonMesh()):this.addVideoMesh().then(()=>{l?this.addButtonMesh():this.play(!0)}),this.addEventListener("removed",()=>{this.remove(...this.children)}),this.addEventListener("dispose",()=>{var h;this.domEventsListenerTemporaryList=[],(h=this.disposers)==null||h.forEach(u=>u==null?void 0:u())})}play(e=!1){return Y(this,null,function*(){this.videoMesh||(yield this.addVideoMesh()),this.showPlayUI(),this.videoInstance.paused&&this.videoInstance.play().then(()=>this.showPlayUI()).catch(n=>{this.pause(),console.error("play error",n)}),this.videoInstance.muted=e,this.render()})}pause(){this.videoInstance&&(this.videoInstance.pause(),this.showPauseUI().then(()=>this.render()))}initialDomEvents(e){this.domEvents||(this.domEvents=e,this.domEventsListenerTemporaryList.forEach(n=>this.addDomEventListener(...n)),this.domEventsListenerTemporaryList=[])}initialRenderHooks(e){const o=e(()=>{var s;this.videoMesh&&((s=this.videoInstance)==null?void 0:s.paused)===!1&&(this.videoMesh.needsRender=!0)});this.disposers.push(()=>o)}showPlayUI(){this.coverMesh&&(this.coverMesh.visible=!1),this.remove(this.buttonMesh),this.videoMesh.visible=!0}showPauseUI(){return Y(this,null,function*(){this.coverMesh?(this.coverMesh.visible=!0,this.videoMesh&&(this.videoMesh.visible=!1)):(yield this.addCoverMesh(),this.coverMesh&&(this.videoMesh.visible=!1)),this.addButtonMesh().then(()=>this.render())})}render(){var e;this.videoMesh&&(this.videoMesh.needsRender=!0),this.coverMesh&&(this.coverMesh.needsRender=!0),this.buttonMesh&&(this.buttonMesh.needsRender=!0),this.videoMesh&&((e=this.videoInstance)==null?void 0:e.paused)===!1&&(this.videoMesh.needsRender=!0)}addAutoBindEventListener(...e){const n=e[0];n.addEventListener("added",()=>{this.addDomEventListener(...e)}),n.addEventListener("removed",()=>{this.removeDomEventListener(...e)}),n.addEventListener("dispose",()=>{this.removeDomEventListener(...e)})}addDomEventListener(...e){this.domEvents?(this.domEvents.addEventListener(...e),this.disposers.push(()=>{var n;return(n=this.domEvents)==null?void 0:n.removeEventListener(...e)})):this.domEventsListenerTemporaryList.push(e)}removeDomEventListener(...e){this.domEvents?this.domEvents.removeEventListener(...e):this.domEventsListenerTemporaryList=this.domEventsListenerTemporaryList.filter(n=>n!==e)}addCoverMesh(){return Y(this,null,function*(){if(this.children.includes(this.coverMesh))return;const e=yield(()=>Y(this,null,function*(){if(this.coverMesh)return this.coverMesh;if(!this.videoCoverSrc)return;const n=yield this.getImageTexture(this.videoCoverSrc);if(!n)return;const o=new I.MeshBasicMaterial({transparent:!1,map:n}),s=Ri(this.objectFit,this.cornerPoints,n.image.width/n.image.height),r=new wr(s,o);return r.position.copy(new R.Vector3(0,0,0)),r.name="videoCoverMesh",r}))();return e&&(this.children.includes(this.coverMesh)||(this.add(e),this.coverMesh=e)),e})}addVideoMesh(){return Y(this,null,function*(){if(this.children.includes(this.videoMesh))return;const e=yield(()=>Y(this,null,function*(){if(this.videoMesh)return this.videoMesh;if(!this.src)return;const o=this.getVideoTexture(this.src),s=new I.MeshBasicMaterial({transparent:!1,map:o}),r=yield new Promise(l=>{o.metadataLoaded?l(Ri(this.objectFit,this.cornerPoints,o.image.videoWidth/o.image.videoHeight)):o.addEventListener("videoLoaded",()=>l(Ri(this.objectFit,this.cornerPoints,o.image.videoWidth/o.image.videoHeight)))}),a=new wr(r,s);return a.name="videoMesh",a.position.copy(new R.Vector3(0,0,0)),a}))();if(!e)return;this.addAutoBindEventListener(e,"click",()=>{!this.videoInstance.paused&&this.videoInstance.muted?this.videoInstance.muted=!1:this.pause()});const n=e.material.map.image;return n.addEventListener("playing",()=>{this.coverMesh||this.remove(this.buttonMesh),this.render()}),n.addEventListener("pause",()=>{this.showPauseUI(),this.render()}),this.children.includes(this.videoMesh)||(this.add(e),this.videoMesh=e,this.videoInstance=n),e})}addButtonMesh(){return Y(this,null,function*(){if(this.children.includes(this.buttonMesh))return;const e=yield(()=>Y(this,null,function*(){var u,m,v,g;if(this.buttonMesh)return this.buttonMesh;const n=(m=(u=this.videoMesh)==null?void 0:u.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3]))!=null?m:1/0,o=(g=(v=this.coverMesh)==null?void 0:v.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3]))!=null?g:1/0,s=this.cornerPoints[0].distanceTo(this.cornerPoints[3]),a=Math.min(n,o,s)/s*.3,l=yield this.getImageTexture(this.buttonSrc),c=Ri("contain",this.cornerPoints,l.image.width/l.image.height),d=new wr(c,new KA(l));d.position.copy(new R.Vector3(0,0,0)),d.name="buttonMesh",d.scale.set(a,a,a),this.addAutoBindEventListener(d,"click",()=>this.play());const h=new I.Vector3().crossVectors(new I.Vector3().subVectors(c[0],c[1]),new I.Vector3().subVectors(c[0],c[3])).normalize().multiplyScalar(1e-4);return d.position.add(h),d}))();return this.children.includes(this.buttonMesh)||(this.add(e),this.buttonMesh=e),e})}getImageTexture(e){return Y(this,null,function*(){var o,s;if((o=this.ImageTextureMap)!=null&&o.has(e))return this.ImageTextureMap.get(e);const n=yield Ui(e);return(s=this.ImageTextureMap)==null||s.set(e,n),n})}getVideoTexture(e){var o,s;if((o=this.videoTextureMap)!=null&&o.has(e))return this.videoTextureMap.get(e);const n=qA(e);return(s=this.videoTextureMap)==null||s.set(e,n),n}}function Me(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new I.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}Me.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)};Me.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];Me.prototype._getRelativeMouseXY=function(i){var t=i.target||i.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},n=t,o=getComputedStyle(n,null);e.y+=parseInt(o.getPropertyValue("padding-top"),10),e.x+=parseInt(o.getPropertyValue("padding-left"),10);do e.x+=n.offsetLeft,e.y+=n.offsetTop,o=getComputedStyle(n,null),e.x+=parseInt(o.getPropertyValue("border-left-width"),10),e.y+=parseInt(o.getPropertyValue("border-top-width"),10);while(n=n.offsetParent);var s={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((i.pageX-e.x)/s.width)*2-1,y:-((i.pageY-e.y)/s.height)*2+1}};Me.prototype._objectCtxInit=function(i){i._3xDomEvent={}};Me.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent};Me.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent};Me.prototype._objectCtxGet=function(i){return i._3xDomEvent};Me.prototype.camera=function(i){return i&&(this._camera=i),this._camera};Me.prototype.bind=function(i,t,e,n){console.assert(Me.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]),o[t+"Handlers"].push({callback:e,useCapture:n}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(i)};Me.prototype.addEventListener=Me.prototype.bind;Me.prototype.unbind=function(i,t,e,n){console.assert(Me.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]);for(var s=o[t+"Handlers"],r=0;r<s.length;r++){var a=s[r];if(e==a.callback&&n==a.useCapture){s.splice(r,1);break}}var l=this._boundObjs[t].indexOf(i);this._boundObjs[t].splice(l,1)};Me.prototype.removeEventListener=Me.prototype.unbind;Me.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1};Me.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o),a=this._selected;if(r.length>0){var l,c,d,h=r[0],u=h.object;this._selected=u,d=this._bound("mousemove",u),a!=u&&(l=this._bound("mouseover",u),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;d&&this._notify("mousemove",u,n,h),l&&this._notify("mouseover",u,n,h),c&&this._notify("mouseout",a,n,h)}};Me.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o,!0);if(r.length!==0){for(var a=r[0],l=a.object,c=this._objectCtxGet(l),d=l.parent;typeof c=="undefined"&&d;)c=this._objectCtxGet(d),d=d.parent;c&&this._notify(i,l,n,a)}}};Me.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(!o||!s||s.length===0){t.parent&&this._notify(i,t.parent,e,n);return}for(var s=o[i+"Handlers"],r=0;r<s.length;r++){var a=s[r],l=!0;a.callback({type:i,target:t,origDomEvent:e,intersect:n,stopPropagation:function(){l=!1}}),l&&a.useCapture===!1&&t.parent&&this._notify(i,t.parent,e,n)}};Me.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)};Me.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)};Me.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)};Me.prototype._onMouseMove=function(i){var t=this._getRelativeMouseXY(i);this._onMove("mousemove",t.x,t.y,i),this._onMove("mouseover",t.x,t.y,i),this._onMove("mouseout",t.x,t.y,i)};Me.prototype._onClick=function(i){this._onMouseEvent("click",i)};Me.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)};Me.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)};Me.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)};Me.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)};Me.prototype._onTouchMove=function(i){if(i.touches.length==1){var t=Number(i.touches[0].pageX/window.innerWidth)*2-1,e=-(i.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,i),this._onMove("mouseover",t,e,i),this._onMove("mouseout",t,e,i)}};Me.prototype._onTouchEvent=function(i,t){var e=t.touches;if(e.length==0&&(e=t.changedTouches),e.length==1){var n=Number(e[0].pageX/window.innerWidth)*2-1,o=-(e[0].pageY/window.innerHeight)*2+1;this._onEvent(i,n,o,t)}};class $A extends Me{constructor(e){super(e.camera,e.getElement());f(this,"mouseInfo");f(this,"clickHandlerMap",new Map);const n=()=>this.preventWhenMouseDown();e.on("wantsMoveToPano",n),e.on("wantsTapGesture",n)}addAutoBindEventListener(...e){const n=e[0];n.addEventListener("added",()=>{this.addEventListener(...e)}),n.addEventListener("removed",()=>{this.removeEventListener(...e)}),n.addEventListener("dispose",()=>{this.removeEventListener(...e)})}addEventListener(e,n,o,s){const r=d=>{if(Qi(e)===!1){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo={x:h.clientX,y:h.clientY,isDown:!0,mouseDownTimestamp:Date.now()}},a=d=>{if(Qi(e)===!1){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo&&(this.mouseInfo.isDown&&this.mouseInfo.x===h.clientX&&this.mouseInfo.y===h.clientY&&Date.now()-this.mouseInfo.mouseDownTimestamp<400&&o(h),this.mouseInfo=void 0)},l=d=>{if(Qi(e)===!1){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo={x:Math.floor(h.touches[0].clientX),y:Math.floor(h.touches[0].clientY),isDown:!0,mouseDownTimestamp:Date.now()}},c=d=>{if(Qi(e)===!1){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo&&(this.mouseInfo.isDown&&this.mouseInfo.x===Math.floor(h.changedTouches[h.changedTouches.length-1].clientX)&&this.mouseInfo.y===Math.floor(h.changedTouches[h.changedTouches.length-1].clientY)&&Date.now()-this.mouseInfo.mouseDownTimestamp<400&&o(h),this.mouseInfo=void 0)};n==="click"?(super.addEventListener(e,"mousedown",r,s),super.addEventListener(e,"mouseup",a,s),super.addEventListener(e,"touchstart",l,s),super.addEventListener(e,"touchend",c,s),this.clickHandlerMap.set(o,{mousedown:r,mouseup:a,touchstart:l,touchend:c})):super.addEventListener(e,n,o,s)}removeEventListener(e,n,o,s){if(n==="click"){const r=this.clickHandlerMap.get(o);r&&(super.removeEventListener(e,"mousedown",r.mousedown,s),super.removeEventListener(e,"mouseup",r.mouseup,s),super.removeEventListener(e,"touchstart",r.touchstart,s),super.removeEventListener(e,"touchend",r.touchend,s),this.clickHandlerMap.delete(o))}else super.removeEventListener(e,n,o,s)}preventWhenMouseDown(){var e;if((e=this.mouseInfo)!=null&&e.isDown)return!1}}function Qi(i){return i?i.visible===!1?!1:Qi(i.parent):!0}class eb extends XA{constructor(e){super(e);f(this,"tags",[]);f(this,"config",NA);f(this,"mediaStore",ca({currentMediaElement:null}));f(this,"css3DRenderPlugin");f(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});f(this,"domEvents",new $A(this.five));f(this,"mouseInfo");f(this,"preventWhenMouseDown",()=>{var e;if((e=this.mouseInfo)!=null&&e.isDown)return!1});this.five.on("wantsMoveToPano",this.preventWhenMouseDown),this.five.on("wantsTapGesture",this.preventWhenMouseDown),this.mediaStore.subscribe(({currentMediaElement:n})=>{this.tags.forEach(o=>{var s;if(o.mediaPlane instanceof qr&&n!==o.mediaPlane.videoInstance){if(!((s=o.mediaPlane.videoInstance)!=null&&s.src)||n===o.mediaPlane.videoInstance)return;o.mediaPlane.pause()}})}),this.store.disposers.push(()=>{this.five.off("wantsMoveToPano",this.preventWhenMouseDown),this.five.off("wantsTapGesture",this.preventWhenMouseDown)})}get isPanorama(){return this.five.currentMode==="Panorama"}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.warn(`error: can not find tag id ${e} by getTagById()`);return}return n}pauseCurrentMedia(){this.mediaStore.set({currentMediaElement:null})}getTagConfig(e){var s,r;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(a=>{const l=a;if(n[l])return;const c=l.split("-");if(c.length===1){const[d]=c;e.contentType===d&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===2){const[d="Any",h="Any"]=c;d==="Mixin"&&e.contentType===h&&(n[l]=this.config.contentTypeConfig[l]),(e.stickType===d||d==="Any")&&(e.contentType===h||h==="Any")&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===3){const[d="Any",h,u]=c;if(h==="Audio"&&e.contentType==="Audio"){const m=e;(m.stickType===d||d==="Any")&&m.data.appearance===u&&(n[l]=this.config.contentTypeConfig[l])}}});const o=Ye({},this.config.globalConfig,...Object.values(n),e.config);return typeof o.unfoldedConfig=="object"&&(o.unfoldedConfig.disableFold&&(o.unfoldedConfig={keep:"unfolded"}),o.unfoldedConfig.disableUnfold&&(o.unfoldedConfig={keep:"folded"}),o.unfoldedConfig.keep&&(o.unfoldedConfig={keep:o.unfoldedConfig.keep})),typeof o.visibleConfig=="object"&&o.visibleConfig.keep&&(o.visibleConfig={keep:o.visibleConfig.keep,visibleFiveMode:(r=o.visibleConfig)==null?void 0:r.visibleFiveMode}),o}loadVideoFirstFrame(){YA&&this.hooks.emit("loadVideoFirstFrame")}updateTagConfig(e){e!=null&&e.force&&this.clearCache(),this.tags.forEach(n=>{const o=this.getTagConfig(n);n.config=o,n.data=Ye({},o.initialData,n.data)})}can(e,n){const o=n,s=this.getTagConfig(o);if(!s||typeof s!="object")return!0;if(e==="show"||e==="hide"){if(!s.visibleConfig||typeof s.visibleConfig!="object")return!0;if(e==="show"&&s.visibleConfig.keep==="hidden"||e==="hide"&&(s.visibleConfig.keep==="visible"||s.visibleConfig.alwaysShowWhenMovePano))return!1}if(e==="fold"||e==="unfold"){if(!s.unfoldedConfig||typeof s.unfoldedConfig!="object")return!0;if(e==="fold"&&s.unfoldedConfig.keep==="unfolded"||e==="unfold"&&s.unfoldedConfig.keep==="folded")return!1}return!0}getRenderType(e){const n=(()=>{if(e.stickType==="3DPoint")return"Dom";const o=this.getTagConfig(e);if(!o||typeof o!="object"||!o.renderType)return;const s=e.data.mediaData;if(!(!s||s.length===0)&&o.renderType==="Mesh"){if(VA(e)){if(s.length===1&&(s[0].type==="Image"||s[0].type==="Video"))return"Mesh"}else if(pt(e))return s.length===1&&s[0].type==="Image"?"Mesh":"BehindDom"}})();return n!=null?n:"Dom"}getAngle(e,n){var r,a;const o=n!=null?n:this.five.getCurrentState().panoIndex;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCache({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const l=(a=(r=this.five.work)==null?void 0:r.observers[o])==null?void 0:a.position;if(l===void 0)throw new Error(`getAngleRange(): observerPosition is ${l}`);const c=(()=>e.stickType==="3DPoint"?Ni(e.normal):yr(e.position))();if(!c)return;const d=$o(e.position);if(!d)return;const h=new I.Vector3().copy(l).sub(d),u=c.angleTo(h)*180/Math.PI;return s.angle=u,s.angle}}getDistance(e,n){var r,a;const o=n!=null?n:this.five.getCurrentState().panoIndex;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCache({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const l=(a=(r=this.five.work)==null?void 0:r.observers[o])==null?void 0:a.position;if(l===void 0)throw new Error(`getDistance(): observerPosition is ${l}`);const c=zh(e);if(!c)return-1;const d=l.distanceTo(c);return s.distance=d,d}}getPositions(e){if(LA(e))return e.position;if(pt(e))return e.data.mediaPosition;if(TA(e))return BA(this.five.camera.position,xt(e.position),xt(e.normal))}addObjectClickHandler(e,n,o){if(!n||!this.domEvents)return()=>{};const s=()=>!(!e.state.visible||!this.state.visible||pt(e)&&!e.mediaVisible),r=d=>{if(!s()){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo={x:h.clientX,y:h.clientY,isDown:!0,mouseDownTimestamp:Date.now()}},a=d=>{if(!s()){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo&&(this.mouseInfo.isDown&&this.mouseInfo.x===h.clientX&&this.mouseInfo.y===h.clientY&&Date.now()-this.mouseInfo.mouseDownTimestamp<400&&o(h),this.mouseInfo=void 0)},l=d=>{if(!s()){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo={x:Math.floor(h.touches[0].clientX),y:Math.floor(h.touches[0].clientY),isDown:!0,mouseDownTimestamp:Date.now()}},c=d=>{if(!s()){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo&&(this.mouseInfo.isDown&&this.mouseInfo.x===Math.floor(h.changedTouches[h.changedTouches.length-1].clientX)&&this.mouseInfo.y===Math.floor(h.changedTouches[h.changedTouches.length-1].clientY)&&Date.now()-this.mouseInfo.mouseDownTimestamp<400&&o(h),this.mouseInfo=void 0)};return this.domEvents.addEventListener(n,"mousedown",r,!1),this.domEvents.addEventListener(n,"mouseup",a,!1),this.domEvents.addEventListener(n,"touchstart",l,!1),this.domEvents.addEventListener(n,"touchend",c,!1),()=>{this.domEvents&&(this.mouseInfo=void 0,this.domEvents.removeEventListener(n,"mousedown",r),this.domEvents.removeEventListener(n,"mouseup",a),this.domEvents.removeEventListener(n,"touchstart",l),this.domEvents.removeEventListener(n,"touchend",c))}}getTagNormal(e){if(e.normal)return xt(e.normal);if(e.stickType==="Plane")return yr(e.position);if(e.stickType==="Model")return yr(this.getPositions(e))}get filterPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint"||e.stickType==="3DPoint").filter(e=>e.position)}get filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint").filter(e=>e.position)}get filter3DPointTag(){return this.tags.filter(e=>e.stickType==="3DPoint").filter(e=>e.position)}get filterImagePlane(){return this.tags.filter(e=>e.contentType==="MediaPlane"&&e.stickType==="Plane"&&this.getRenderType(e)==="Mesh")}get filterMediaModel(){return this.tags.filter(e=>e.stickType==="Model"&&e.contentType==="MediaModel")}get filterModelTag(){return this.tags.filter(e=>e.stickType==="Model")}get filterCSS3DTag(){return this.tags.filter(n=>n.stickType==="3DPoint"||n.stickType==="Plane"||n.stickType==="Model"&&n.contentType==="MediaModel").filter(n=>{const o=this.getRenderType(n);return o==="BehindDom"||o==="Dom"})}checkDisposed(){return this.store.disposed?(console.error("PanoTagPluginController has been disposed"),!0):!1}}function tb(i,t){if(!t||!i)return console.error("getFloorIndex: invalid arguments: ",{point:t,observer:i}),0;const e=[];i.forEach(o=>{var r,a;const s=(a=(r=o.floorIndex)!=null?r:o.floor_index)!=null?a:0;e[s]||(e[s]=[]),e[s].push(o.position.y)});const n=e.map(o=>o.reduce((s,r)=>s+r,0)/o.length);for(let o=n.length-1;o>0;o--)if(t.y>=n[o])return o;return 0}class nb extends eb{constructor(e){super(e);f(this,"raycaster",new I.Raycaster)}getVisibleByPanoIndex(e,n){const o=this.getCache({panoIndex:n,id:e.id}),s=n!=null?n:this.five.getCurrentState().panoIndex;if(e.stickType==="Model")return!0;if(o.visible!==void 0)return o.visible;{const r=(()=>{var c,d,h;const a=(c=this.getTagConfig(e).visibleConfig)!=null?c:{},l=this.getDistance(e);if(typeof a=="function")return{value:a(this.five,{tag:e,distance:l}),reason:"config function result"};if(a.keep==="hidden")return{value:!1,reason:"config.keep is hidden"};if(a.keep==="visible")return{value:!0,reason:"config.keep is visible"};if(a.visiblePanoIndex!==void 0&&a.visiblePanoIndex!=="all"&&s!==void 0){if(Array.isArray(a.visiblePanoIndex)&&!a.visiblePanoIndex.includes(s))return{value:!1,reason:`current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${a.visiblePanoIndex}`};if(a.visiblePanoIndex==="current"&&s!==((d=e.fiveState)==null?void 0:d.panoIndex))return{value:!1,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(h=e.fiveState)==null?void 0:h.panoIndex}`}}if(a.visibleDistance!==void 0&&a.visibleDistance!=="unLimited"&&Vi(l,a.visibleDistance)===!1)return{value:!1,reason:`distance is not in visibleDistance. distance: ${l}, visibleDistance: ${a.visibleDistance}`};if(a.intersectRaycaster!==!1&&(typeof a.intersectRaycaster!="object"||a.intersectRaycaster.enabled!==!1)){if(s===void 0)return{value:!1,reason:`intersectRaycaster check failed: fivePanoIndex is ${s}`};const u=this.getRaycasterFromPanoIndex(e,s);if(!u)return{value:!1,reason:`intersectRaycaster check failed: raycaster is ${u}`};const m=this.getTagEnableByIntersect(e,u);if(m.value===!1)return m}if(a.angleRange&&zA(e)){const u=this.getAngle(e);if(Vi(u,a.angleRange)===!1)return{value:!1,reason:`angle is not in angleRange. angle: ${u}, angleRange: ${a.angleRange}`}}return{value:!0,reason:"all check passed"}})();return o.visible=r.value,o.__debug_visible_reason__=r,o.visible}}getVisibleByFiveMode(e,n){const o=n!=null?n:this.five.getCurrentState().mode,s=this.getTagConfig(e).visibleConfig;if(s){if(typeof s=="object"){const r=s==null?void 0:s.visibleFiveMode;return r?r!=null&&r.includes(o)?s.followModelVisibility===!0&&(o==="Floorplan"||o==="Mapview")?this.getVisibleByFloorIndex(e):!0:!1:o==="Panorama"}else if(typeof s=="function")return n==="Panorama"}else return o==="Panorama"}getCurrentVisibleState(e){var n;return(n=this.state.visible&&e.state.visible)!=null?n:!0}getVisible(e){const n=this.five.getCurrentState(),o=this.getVisibleByFiveMode(e),s=n.mode==="Panorama"?this.getVisibleByPanoIndex(e,n.panoIndex):!0;return o&&s}getModelMedialVisibleByPanoIndex(e){if(!this.getCurrentVisibleState(e))return!1;const n=this.five.getCurrentState().panoIndex,o=this.getCache({panoIndex:n,id:e.id});if(o.modelMedialVisible!==void 0)return o.modelMedialVisible;const s=this.getRaycasterFromPanoIndex(e,n);if(!s)return!1;const r=this.getTagEnableByIntersect(e,s);return o.modelMedialVisible=r.value,o.__debug_visible_reason__=r,r.value!==!1}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCache({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.unfoldDistance&&Vi(c,r.unfoldDistance)===!1)return!1})();s.unfolded=a;const l=this.getUnfoldedByCamera(e);return l!==void 0?l:s.unfolded}}getUnfoldedByCamera(e){return this.getVisible(e)?(()=>{var a;const s=this.getDistance(e),r=this.getTagConfig(e).unfoldedConfig;if(r){if(typeof r=="function")return r(this.five,{tag:e,distance:s});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.autoUnfold===void 0||r.autoUnfold===!1||r.autoUnfold.enable===!1||!r.autoUnfold.strategy)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&Vi(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const d=this.filterPointTag.filter(u=>this.getVisible(u)).filter(u=>{const m=this.getTagProject(u);if(!m)return!1;const{x:v,y:g,z:A}=m;return!(Math.abs(A)>1||Math.abs(v)>1||Math.abs(g)>1)}).map(u=>({tag:u,id:u.id,tagConfig:this.getTagConfig(u).unfoldedConfig})).filter(({tag:u,tagConfig:m})=>{var v,g;return!(typeof m!="object"||m.keep||m.autoUnfold===!1||((v=m.autoUnfold)==null?void 0:v.enable)===!1||((g=m.autoUnfold)==null?void 0:g.strategy)!=="MinimumDistance")}).map(u=>ye(F({},u),{distance:this.getDistance(u.tag)})).filter(({distance:u,tagConfig:m})=>{var v,g;return!(u===void 0||typeof m!="object"||m.autoUnfold===!1||((v=m.autoUnfold)==null?void 0:v.enable)===!1||((g=m.autoUnfold)==null?void 0:g.strategy)!=="MinimumDistance"||m.autoUnfold.distance&&Vi(u,m.autoUnfold.distance)===!1)}).sort((u,m)=>u.distance-m.distance).findIndex(u=>u.id===e.id);if(d===-1||d<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}sort(e){return e.sort((n,o)=>{const s=this.getDistance(n),r=this.getDistance(o);return s===void 0||r===void 0?0:r-s})}setTagZIndex(e){return e.forEach(n=>{const o=this.getDistance(n);n.zIndex=Math.round((o!=null?o:0)*100)})}setPointTagPosition(){const e=this.filterPointTag;e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.screenPosition=null;return}const o=this.getTagProject(n);if(!o){n.screenPosition=null;return}n.screenPosition={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisible(){this.tags.forEach(e=>{const n=this.getVisible(e);e.state&&(e.state.visible=n)})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setModelMedialVisible(){const e=this.five.getCurrentState().mode;this.tags.forEach(n=>{var s;if(!pt(n))return;if(!((s=n.model)!=null&&s.object)){n.mediaVisible=!1;return}const o=e==="Panorama"?this.getModelMedialVisibleByPanoIndex(n):!0;n.mediaVisible=o})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoFoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisible(e))return;const o=$o(e.position);if(!o)return;const{x:s,y:r,z:a}=o.project(this.five.camera);if(!(a>1))return{x:s,y:r,z:a}}getTagEnableByIntersect(e,n){var d,h,u;const o=(d=this.getTagConfig(e).visibleConfig)!=null?d:{},s=this.getDistance(e),[r]=this.five.model.intersectRaycaster(n),a=(()=>{if(!pt(e))return;const m=this.tags.filter(pt).map(g=>{var A;return(A=g.model)==null?void 0:A.object}).filter(ci);return n.intersectObjects(m,!0)[0]})(),l=(()=>{var m;return typeof o=="object"&&typeof o.intersectRaycaster=="object"&&(m=o.intersectRaycaster.distanceAccuracy)!=null?m:.01})(),c=Math.min((h=r==null?void 0:r.distance)!=null?h:1/0,(u=a==null?void 0:a.distance)!=null?u:1/0);return c+l<s?{value:!1,reason:`intersectRaycaster check failed: distance is ${s}, intersection.distance is ${r==null?void 0:r.distance}, intersection.point is ${r==null?void 0:r.point.toArray()},
565
- customModelIntersection.point is ${a==null?void 0:a.point.toArray()}, minIntersectionDistance is ${c}`}:{value:!0,reason:""}}getRaycasterFromPanoIndex(e,n){var a;const o=(a=this.five.work.observers[n])==null?void 0:a.position;if(o===void 0)throw new Error(`getVisible(): observerPosition is ${o}`);const s=$o(e.position);if(!s)return;const r=s.sub(o).normalize();return this.raycaster.set(o,r),this.raycaster}getVisibleByFloorIndex(e){var r,a,l,c,d,h,u;let n=0;const o=(r=e.fiveState)==null?void 0:r.panoIndex;o!==void 0?n=(a=this.five.work.observers[o])==null?void 0:a.floorIndex:n=tb(this.five.work.observers,(u=(h=(c=(l=e.model)==null?void 0:l.object)==null?void 0:c.position)!=null?h:(d=e.mediaPlane)==null?void 0:d.position)!=null?u:zh(e));const s=this.five.model.shownFloor;return s===null||s===n}}function ib(i){fe(i,"svelte-xuejcm",".line.svelte-xuejcm{position:absolute;pointer-events:none}.line.vertical.svelte-xuejcm{transform:rotate(-90deg) translate3d(0.03125rem, 0, 0.625rem);transform-origin:0 0}.line.horizontal.svelte-xuejcm{transform:translate3d(0, -0.03125rem, 0.625rem)}.straight-line.svelte-xuejcm{display:block;width:100%;height:100%;overflow:visible}")}function ec(i){let t,e,n,o,s,r,a,l=i[3]&&tc(i);return{c(){t=z("div"),e=Te("svg"),n=Te("defs"),o=Te("linearGradient"),s=Te("stop"),r=Te("stop"),l&&l.c(),w(s,"offset","25%"),w(s,"stop-color",i[5]),w(s,"stop-opacity","1"),w(r,"offset","100%"),w(r,"stop-color",i[5]),w(r,"stop-opacity","0.5"),w(o,"x1",.5),w(o,"y1",.5),w(o,"x2",i[8]),w(o,"y2",.5),w(o,"id",i[10]),w(o,"gradientUnits","userSpaceOnUse"),w(e,"class","straight-line svelte-xuejcm"),w(e,"viewBox",a="0 0 "+i[8]+" "+i[7]),w(e,"preserveAspectRatio","none"),w(t,"class","line svelte-xuejcm"),$(t,"vertical",i[9]),$(t,"horizontal",!i[9]),T(t,"width",i[8]+"px"),T(t,"height",i[7]+"px")},m(c,d){V(c,t,d),O(t,e),O(e,n),O(n,o),O(o,s),O(o,r),l&&l.m(e,null)},p(c,d){d&32&&w(s,"stop-color",c[5]),d&32&&w(r,"stop-color",c[5]),d&256&&w(o,"x2",c[8]),c[3]?l?(l.p(c,d),d&8&&x(l,1)):(l=tc(c),l.c(),x(l,1),l.m(e,null)):l&&(de(),L(l,1,1,()=>{l=null}),he()),d&384&&a!==(a="0 0 "+c[8]+" "+c[7])&&w(e,"viewBox",a),d&512&&$(t,"vertical",c[9]),d&512&&$(t,"horizontal",!c[9]),d&256&&T(t,"width",c[8]+"px"),d&128&&T(t,"height",c[7]+"px")},d(c){c&&_(t),l&&l.d()}}}function tc(i){let t,e,n,o,s;return{c(){t=Te("path"),w(t,"fill","none"),w(t,"stroke",e=i[4]?`url(#${i[10]})`:i[5]),w(t,"stroke-width",1),w(t,"d",i[6])},m(r,a){V(r,t,a),s=!0},p(r,a){i=r,(!s||a&48&&e!==(e=i[4]?`url(#${i[10]})`:i[5]))&&w(t,"stroke",e),(!s||a&64)&&w(t,"d",i[6])},i(r){s||(r&&ot(()=>{s&&(o&&o.end(1),n=Dn(t,Jo,{duration:i[2],delay:i[0],easing:sn}),n.start())}),s=!0)},o(r){n&&n.invalidate(),r&&(o=gi(t,Jo,{duration:i[2],delay:i[1],easing:sn})),s=!1},d(r){r&&_(t),r&&o&&o.end()}}}function ob(i){let t,e=i[8]&&ec(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),V(n,t,o)},p(n,[o]){n[8]?e?e.p(n,o):(e=ec(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:K,o:K,d(n){e&&e.d(n),n&&_(t)}}}function sb(i,t,e){let n,o,s,r,{inDelay:a=0}=t,{outDelay:l=0}=t,{duration:c=1e3}=t,{unfolded:d}=t,{length:h}=t,{direction:u="horizontal"}=t,{useLinearColor:m=!1}=t,{color:v="white"}=t;const g=dt();return i.$$set=A=>{"inDelay"in A&&e(0,a=A.inDelay),"outDelay"in A&&e(1,l=A.outDelay),"duration"in A&&e(2,c=A.duration),"unfolded"in A&&e(3,d=A.unfolded),"length"in A&&e(11,h=A.length),"direction"in A&&e(12,u=A.direction),"useLinearColor"in A&&e(4,m=A.useLinearColor),"color"in A&&e(5,v=A.color)},i.$$.update=()=>{i.$$.dirty&4096&&e(9,n=u==="vertical"),i.$$.dirty&2048&&e(8,o=h),i.$$.dirty&2048&&e(6,r=`M0.5 0.5 H ${h}`)},e(7,s=1),[a,l,c,d,m,v,r,s,o,n,g,h,u]}class va extends ce{constructor(t){super(),le(this,t,sb,ob,ae,{inDelay:0,outDelay:1,duration:2,unfolded:3,length:11,direction:12,useLinearColor:4,color:5},ib)}}function rb(i){fe(i,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function nc(i){let t,e,n,o,s;return{c(){t=z("div"),w(t,"class","shadow svelte-faoauy"),w(t,"style",e=`
564
+ `);this.uniforms={map:{value:e}}}}let Bh=class extends I.Mesh{constructor(){super(...arguments);f(this,"name","MediaPlane");f(this,"src")}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}};class $l extends Bh{constructor(e,n,o){super();f(this,"name","PanoTagPluginImagePlane");this.src=e,Ui(e).then(s=>{var u;const r=new URL(e,location.href).pathname.endsWith(".png"),a=new I.MeshBasicMaterial({map:s,transparent:r}),l=Ri((u=o==null?void 0:o.objectFit)!=null?u:"contain",n,s.image.width/s.image.height),c=xn(...l),d=l.map(m=>m.clone().sub(c)),h=new jh(d);this.position.copy(c),this.geometry=h,this.material=a}).catch(s=>{console.error(`Imageplane error ${s}`)})}}class qr extends Bh{constructor(e,n,o){const{videoCoverSrc:s,objectFit:r="contain",playButton:a="withText",paused:l=!0,videoTextureMap:c,ImageTextureMap:d}=o!=null?o:{};super();f(this,"isVideoPlane",!0);f(this,"name","PanoTagPluginImagePlane");f(this,"videoInstance");f(this,"onVideoReady");f(this,"objectFit");f(this,"buttonSrc");f(this,"videoCoverSrc");f(this,"domEvents");f(this,"disposers",[]);f(this,"domEventsListenerTemporaryList",[]);f(this,"cornerPoints");f(this,"videoMesh");f(this,"coverMesh");f(this,"buttonMesh");f(this,"videoTextureMap");f(this,"ImageTextureMap");this.cornerPoints=n,this.src=e,this.buttonSrc=(()=>a==="withText"?Oh:a==="withoutText"?Ur:typeof a=="string"?a:Ur)(),this.videoCoverSrc=s,this.objectFit=r,this.videoTextureMap=c,this.ImageTextureMap=d,this.position.copy(xn(...n)),this.videoCoverSrc&&l?this.addCoverMesh().then(()=>this.addButtonMesh()):this.addVideoMesh().then(()=>{l?this.addButtonMesh():this.play(!0)}),this.addEventListener("removed",()=>{this.remove(...this.children)}),this.addEventListener("dispose",()=>{var h;this.domEventsListenerTemporaryList=[],(h=this.disposers)==null||h.forEach(u=>u==null?void 0:u())})}play(e=!1){return Y(this,null,function*(){this.videoMesh||(yield this.addVideoMesh()),this.showPlayUI(),this.videoInstance.paused&&this.videoInstance.play().then(()=>this.showPlayUI()).catch(n=>{this.pause(),console.error("play error",n)}),this.videoInstance.muted=e,this.render()})}pause(){this.videoInstance&&(this.videoInstance.pause(),this.showPauseUI().then(()=>this.render()))}initialDomEvents(e){this.domEvents||(this.domEvents=e,this.domEventsListenerTemporaryList.forEach(n=>this.addDomEventListener(...n)),this.domEventsListenerTemporaryList=[])}initialRenderHooks(e){const o=e(()=>{var s;this.videoMesh&&((s=this.videoInstance)==null?void 0:s.paused)===!1&&(this.videoMesh.needsRender=!0)});this.disposers.push(()=>o)}showPlayUI(){this.coverMesh&&(this.coverMesh.visible=!1),this.remove(this.buttonMesh),this.videoMesh.visible=!0}showPauseUI(){return Y(this,null,function*(){this.coverMesh?(this.coverMesh.visible=!0,this.videoMesh&&(this.videoMesh.visible=!1)):(yield this.addCoverMesh(),this.coverMesh&&(this.videoMesh.visible=!1)),this.addButtonMesh().then(()=>this.render())})}render(){var e;this.videoMesh&&(this.videoMesh.needsRender=!0),this.coverMesh&&(this.coverMesh.needsRender=!0),this.buttonMesh&&(this.buttonMesh.needsRender=!0),this.videoMesh&&((e=this.videoInstance)==null?void 0:e.paused)===!1&&(this.videoMesh.needsRender=!0)}addAutoBindEventListener(...e){const n=e[0];n.addEventListener("added",()=>{this.addDomEventListener(...e)}),n.addEventListener("removed",()=>{this.removeDomEventListener(...e)}),n.addEventListener("dispose",()=>{this.removeDomEventListener(...e)})}addDomEventListener(...e){this.domEvents?(this.domEvents.addEventListener(...e),this.disposers.push(()=>{var n;return(n=this.domEvents)==null?void 0:n.removeEventListener(...e)})):this.domEventsListenerTemporaryList.push(e)}removeDomEventListener(...e){this.domEvents?this.domEvents.removeEventListener(...e):this.domEventsListenerTemporaryList=this.domEventsListenerTemporaryList.filter(n=>n!==e)}addCoverMesh(){return Y(this,null,function*(){if(this.children.includes(this.coverMesh))return;const e=yield(()=>Y(this,null,function*(){if(this.coverMesh)return this.coverMesh;if(!this.videoCoverSrc)return;const n=yield this.getImageTexture(this.videoCoverSrc);if(!n)return;const o=new I.MeshBasicMaterial({transparent:!1,map:n}),s=Ri(this.objectFit,this.cornerPoints,n.image.width/n.image.height),r=new wr(s,o);return r.position.copy(new R.Vector3(0,0,0)),r.name="videoCoverMesh",r}))();return e&&(this.children.includes(this.coverMesh)||(this.add(e),this.coverMesh=e)),e})}addVideoMesh(){return Y(this,null,function*(){if(this.children.includes(this.videoMesh))return;const e=yield(()=>Y(this,null,function*(){if(this.videoMesh)return this.videoMesh;if(!this.src)return;const o=this.getVideoTexture(this.src),s=new I.MeshBasicMaterial({transparent:!1,map:o}),r=yield new Promise(l=>{o.metadataLoaded?l(Ri(this.objectFit,this.cornerPoints,o.image.videoWidth/o.image.videoHeight)):o.addEventListener("videoLoaded",()=>l(Ri(this.objectFit,this.cornerPoints,o.image.videoWidth/o.image.videoHeight)))}),a=new wr(r,s);return a.name="videoMesh",a.position.copy(new R.Vector3(0,0,0)),a}))();if(!e)return;this.addAutoBindEventListener(e,"click",()=>{!this.videoInstance.paused&&this.videoInstance.muted?this.videoInstance.muted=!1:this.pause()});const n=e.material.map.image;return n.addEventListener("playing",()=>{this.coverMesh||this.remove(this.buttonMesh),this.render()}),n.addEventListener("pause",()=>{this.showPauseUI(),this.render()}),this.children.includes(this.videoMesh)||(this.add(e),this.videoMesh=e,this.videoInstance=n),e})}addButtonMesh(){return Y(this,null,function*(){if(this.children.includes(this.buttonMesh))return;const e=yield(()=>Y(this,null,function*(){var u,m,v,g;if(this.buttonMesh)return this.buttonMesh;const n=(m=(u=this.videoMesh)==null?void 0:u.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3]))!=null?m:1/0,o=(g=(v=this.coverMesh)==null?void 0:v.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3]))!=null?g:1/0,s=this.cornerPoints[0].distanceTo(this.cornerPoints[3]),a=Math.min(n,o,s)/s*.3,l=yield this.getImageTexture(this.buttonSrc),c=Ri("contain",this.cornerPoints,l.image.width/l.image.height),d=new wr(c,new KA(l));d.position.copy(new R.Vector3(0,0,0)),d.name="buttonMesh",d.scale.set(a,a,a),this.addAutoBindEventListener(d,"click",()=>this.play());const h=new I.Vector3().crossVectors(new I.Vector3().subVectors(c[0],c[1]),new I.Vector3().subVectors(c[0],c[3])).normalize().multiplyScalar(1e-4);return d.position.add(h),d}))();return this.children.includes(this.buttonMesh)||(this.add(e),this.buttonMesh=e),e})}getImageTexture(e){return Y(this,null,function*(){var o,s;if((o=this.ImageTextureMap)!=null&&o.has(e))return this.ImageTextureMap.get(e);const n=yield Ui(e);return(s=this.ImageTextureMap)==null||s.set(e,n),n})}getVideoTexture(e){var o,s;if((o=this.videoTextureMap)!=null&&o.has(e))return this.videoTextureMap.get(e);const n=qA(e);return(s=this.videoTextureMap)==null||s.set(e,n),n}}function Me(i,t){this._camera=i||null,this._domElement=t||document,this._raycaster=new I.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}Me.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)};Me.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];Me.prototype._getRelativeMouseXY=function(i){var t=i.target||i.srcElement;t.nodeType===3&&(t=t.parentNode);var e={x:0,y:0},n=t,o=getComputedStyle(n,null);e.y+=parseInt(o.getPropertyValue("padding-top"),10),e.x+=parseInt(o.getPropertyValue("padding-left"),10);do e.x+=n.offsetLeft,e.y+=n.offsetTop,o=getComputedStyle(n,null),e.x+=parseInt(o.getPropertyValue("border-left-width"),10),e.y+=parseInt(o.getPropertyValue("border-top-width"),10);while(n=n.offsetParent);var s={width:t===window?window.innerWidth:t.offsetWidth,height:t===window?window.innerHeight:t.offsetHeight};return{x:Number((i.pageX-e.x)/s.width)*2-1,y:-((i.pageY-e.y)/s.height)*2+1}};Me.prototype._objectCtxInit=function(i){i._3xDomEvent={}};Me.prototype._objectCtxDeinit=function(i){delete i._3xDomEvent};Me.prototype._objectCtxIsInit=function(i){return!!i._3xDomEvent};Me.prototype._objectCtxGet=function(i){return i._3xDomEvent};Me.prototype.camera=function(i){return i&&(this._camera=i),this._camera};Me.prototype.bind=function(i,t,e,n){console.assert(Me.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]),o[t+"Handlers"].push({callback:e,useCapture:n}),this._boundObjs[t]===void 0&&(this._boundObjs[t]=[]),this._boundObjs[t].push(i)};Me.prototype.addEventListener=Me.prototype.bind;Me.prototype.unbind=function(i,t,e,n){console.assert(Me.eventNames.indexOf(t)!==-1,"not available events:"+t),this._objectCtxIsInit(i)||this._objectCtxInit(i);var o=this._objectCtxGet(i);o[t+"Handlers"]||(o[t+"Handlers"]=[]);for(var s=o[t+"Handlers"],r=0;r<s.length;r++){var a=s[r];if(e==a.callback&&n==a.useCapture){s.splice(r,1);break}}var l=this._boundObjs[t].indexOf(i);this._boundObjs[t].splice(l,1)};Me.prototype.removeEventListener=Me.prototype.unbind;Me.prototype._bound=function(i,t){var e=this._objectCtxGet(t);return e?!!e[i+"Handlers"]:!1};Me.prototype._onMove=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o),a=this._selected;if(r.length>0){var l,c,d,h=r[0],u=h.object;this._selected=u,d=this._bound("mousemove",u),a!=u&&(l=this._bound("mouseover",u),c=a&&this._bound("mouseout",a))}else c=a&&this._bound("mouseout",a),this._selected=null;d&&this._notify("mousemove",u,n,h),l&&this._notify("mouseover",u,n,h),c&&this._notify("mouseout",a,n,h)}};Me.prototype._onEvent=function(i,t,e,n){var o=this._boundObjs[i];if(!(o===void 0||o.length===0)){var s=new I.Vector2;s.set(t,e),this._raycaster.setFromCamera(s,this._camera);var r=this._raycaster.intersectObjects(o,!0);if(r.length!==0){for(var a=r[0],l=a.object,c=this._objectCtxGet(l),d=l.parent;typeof c=="undefined"&&d;)c=this._objectCtxGet(d),d=d.parent;c&&this._notify(i,l,n,a)}}};Me.prototype._notify=function(i,t,e,n){var o=this._objectCtxGet(t),s=o?o[i+"Handlers"]:null;if(!o||!s||s.length===0){t.parent&&this._notify(i,t.parent,e,n);return}for(var s=o[i+"Handlers"],r=0;r<s.length;r++){var a=s[r],l=!0;a.callback({type:i,target:t,origDomEvent:e,intersect:n,stopPropagation:function(){l=!1}}),l&&a.useCapture===!1&&t.parent&&this._notify(i,t.parent,e,n)}};Me.prototype._onMouseDown=function(i){return this._onMouseEvent("mousedown",i)};Me.prototype._onMouseUp=function(i){return this._onMouseEvent("mouseup",i)};Me.prototype._onMouseEvent=function(i,t){var e=this._getRelativeMouseXY(t);this._onEvent(i,e.x,e.y,t)};Me.prototype._onMouseMove=function(i){var t=this._getRelativeMouseXY(i);this._onMove("mousemove",t.x,t.y,i),this._onMove("mouseover",t.x,t.y,i),this._onMove("mouseout",t.x,t.y,i)};Me.prototype._onClick=function(i){this._onMouseEvent("click",i)};Me.prototype._onDblClick=function(i){this._onMouseEvent("dblclick",i)};Me.prototype._onContextmenu=function(i){this._onMouseEvent("contextmenu",i)};Me.prototype._onTouchStart=function(i){return this._onTouchEvent("touchstart",i)};Me.prototype._onTouchEnd=function(i){return this._onTouchEvent("touchend",i)};Me.prototype._onTouchMove=function(i){if(i.touches.length==1){var t=Number(i.touches[0].pageX/window.innerWidth)*2-1,e=-(i.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",t,e,i),this._onMove("mouseover",t,e,i),this._onMove("mouseout",t,e,i)}};Me.prototype._onTouchEvent=function(i,t){var e=t.touches;if(e.length==0&&(e=t.changedTouches),e.length==1){var n=Number(e[0].pageX/window.innerWidth)*2-1,o=-(e[0].pageY/window.innerHeight)*2+1;this._onEvent(i,n,o,t)}};class $A extends Me{constructor(e){super(e.camera,e.getElement());f(this,"mouseInfo");f(this,"clickHandlerMap",new Map);const n=()=>this.preventWhenMouseDown();e.on("wantsMoveToPano",n),e.on("wantsTapGesture",n)}addAutoBindEventListener(...e){const n=e[0];n.addEventListener("added",()=>{this.addEventListener(...e)}),n.addEventListener("removed",()=>{this.removeEventListener(...e)}),n.addEventListener("dispose",()=>{this.removeEventListener(...e)})}addEventListener(e,n,o,s){const r=d=>{if(Qi(e)===!1){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo={x:h.clientX,y:h.clientY,isDown:!0,mouseDownTimestamp:Date.now()}},a=d=>{if(Qi(e)===!1){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo&&(this.mouseInfo.isDown&&this.mouseInfo.x===h.clientX&&this.mouseInfo.y===h.clientY&&Date.now()-this.mouseInfo.mouseDownTimestamp<400&&o(h),this.mouseInfo=void 0)},l=d=>{if(Qi(e)===!1){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo={x:Math.floor(h.touches[0].clientX),y:Math.floor(h.touches[0].clientY),isDown:!0,mouseDownTimestamp:Date.now()}},c=d=>{if(Qi(e)===!1){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo&&(this.mouseInfo.isDown&&this.mouseInfo.x===Math.floor(h.changedTouches[h.changedTouches.length-1].clientX)&&this.mouseInfo.y===Math.floor(h.changedTouches[h.changedTouches.length-1].clientY)&&Date.now()-this.mouseInfo.mouseDownTimestamp<400&&o(h),this.mouseInfo=void 0)};n==="click"?(super.addEventListener(e,"mousedown",r,s),super.addEventListener(e,"mouseup",a,s),super.addEventListener(e,"touchstart",l,s),super.addEventListener(e,"touchend",c,s),this.clickHandlerMap.set(o,{mousedown:r,mouseup:a,touchstart:l,touchend:c})):super.addEventListener(e,n,o,s)}removeEventListener(e,n,o,s){if(n==="click"){const r=this.clickHandlerMap.get(o);r&&(super.removeEventListener(e,"mousedown",r.mousedown,s),super.removeEventListener(e,"mouseup",r.mouseup,s),super.removeEventListener(e,"touchstart",r.touchstart,s),super.removeEventListener(e,"touchend",r.touchend,s),this.clickHandlerMap.delete(o))}else super.removeEventListener(e,n,o,s)}preventWhenMouseDown(){var e;if((e=this.mouseInfo)!=null&&e.isDown)return!1}}function Qi(i){return i?i.visible===!1?!1:Qi(i.parent):!0}class eb extends XA{constructor(e){super(e);f(this,"tags",[]);f(this,"config",NA);f(this,"mediaStore",ca({currentMediaElement:null}));f(this,"css3DRenderPlugin");f(this,"store",{disposers:[],disposed:!1,resizeObserverDisposerAdding:!1,css3DRenderDisposer:new Map});f(this,"domEvents",new $A(this.five));f(this,"mouseInfo");f(this,"preventWhenMouseDown",()=>{var e;if((e=this.mouseInfo)!=null&&e.isDown)return!1});this.five.on("wantsMoveToPano",this.preventWhenMouseDown),this.five.on("wantsTapGesture",this.preventWhenMouseDown),this.mediaStore.subscribe(({currentMediaElement:n})=>{this.tags.forEach(o=>{var s;if(o.mediaPlane instanceof qr&&n!==o.mediaPlane.videoInstance){if(!((s=o.mediaPlane.videoInstance)!=null&&s.src)||n===o.mediaPlane.videoInstance)return;o.mediaPlane.pause()}})}),this.store.disposers.push(()=>{this.five.off("wantsMoveToPano",this.preventWhenMouseDown),this.five.off("wantsTapGesture",this.preventWhenMouseDown)})}get isPanorama(){return this.five.currentMode==="Panorama"}getTagById(e){const n=this.tags.find(o=>o.id===e);if(!n){console.warn(`error: can not find tag id ${e} by getTagById()`);return}return n}pauseCurrentMedia(){this.mediaStore.set({currentMediaElement:null})}getTagConfig(e){var s,r;if(!e)return(s=this.config.globalConfig)!=null?s:{};const n={};this.config.contentTypeConfig&&Object.keys(this.config.contentTypeConfig).forEach(a=>{const l=a;if(n[l])return;const c=l.split("-");if(c.length===1){const[d]=c;e.contentType===d&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===2){const[d="Any",h="Any"]=c;d==="Mixin"&&e.contentType===h&&(n[l]=this.config.contentTypeConfig[l]),(e.stickType===d||d==="Any")&&(e.contentType===h||h==="Any")&&(n[l]=this.config.contentTypeConfig[l])}if(c.length===3){const[d="Any",h,u]=c;if(h==="Audio"&&e.contentType==="Audio"){const m=e;(m.stickType===d||d==="Any")&&m.data.appearance===u&&(n[l]=this.config.contentTypeConfig[l])}}});const o=Ye({},this.config.globalConfig,...Object.values(n),e.config);return typeof o.unfoldedConfig=="object"&&(o.unfoldedConfig.disableFold&&(o.unfoldedConfig={keep:"unfolded"}),o.unfoldedConfig.disableUnfold&&(o.unfoldedConfig={keep:"folded"}),o.unfoldedConfig.keep&&(o.unfoldedConfig={keep:o.unfoldedConfig.keep})),typeof o.visibleConfig=="object"&&o.visibleConfig.keep&&(o.visibleConfig={keep:o.visibleConfig.keep,visibleFiveMode:(r=o.visibleConfig)==null?void 0:r.visibleFiveMode}),o}loadVideoFirstFrame(){YA&&this.hooks.emit("loadVideoFirstFrame")}updateTagConfig(e){e!=null&&e.force&&this.clearCache(),this.tags.forEach(n=>{const o=this.getTagConfig(n);n.config=o,n.data=Ye({},o.initialData,n.data)})}can(e,n){const o=n,s=this.getTagConfig(o);if(!s||typeof s!="object")return!0;if(e==="show"||e==="hide"){if(!s.visibleConfig||typeof s.visibleConfig!="object")return!0;if(e==="show"&&s.visibleConfig.keep==="hidden"||e==="hide"&&(s.visibleConfig.keep==="visible"||s.visibleConfig.alwaysShowWhenMovePano))return!1}if(e==="fold"||e==="unfold"){if(!s.unfoldedConfig||typeof s.unfoldedConfig!="object")return!0;if(e==="fold"&&s.unfoldedConfig.keep==="unfolded"||e==="unfold"&&s.unfoldedConfig.keep==="folded")return!1}return!0}getRenderType(e){const n=(()=>{if(e.stickType==="3DPoint")return"Dom";const o=this.getTagConfig(e);if(!o||typeof o!="object"||!o.renderType)return;const s=e.data.mediaData;if(!(!s||s.length===0)&&o.renderType==="Mesh"){if(jA(e)){if(s.length===1&&(s[0].type==="Image"||s[0].type==="Video"))return"Mesh"}else if(pt(e))return s.length===1&&s[0].type==="Image"?"Mesh":"BehindDom"}})();return n!=null?n:"Dom"}getAngle(e,n){var r,a;const o=n!=null?n:this.five.getCurrentState().panoIndex;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCache({panoIndex:n,id:e.id});if(s.angle!==void 0)return s.angle;{const l=(a=(r=this.five.work)==null?void 0:r.observers[o])==null?void 0:a.position;if(l===void 0)throw new Error(`getAngleRange(): observerPosition is ${l}`);const c=(()=>e.stickType==="3DPoint"?Ni(e.normal):yr(e.position))();if(!c)return;const d=$o(e.position);if(!d)return;const h=new I.Vector3().copy(l).sub(d),u=c.angleTo(h)*180/Math.PI;return s.angle=u,s.angle}}getDistance(e,n){var r,a;const o=n!=null?n:this.five.getCurrentState().panoIndex;if(o===void 0)throw new Error(`getDistance(): fivePanoIndex is ${o}`);const s=this.getCache({panoIndex:n,id:e.id});if(s.distance!==void 0)return s.distance;{const l=(a=(r=this.five.work)==null?void 0:r.observers[o])==null?void 0:a.position;if(l===void 0)throw new Error(`getDistance(): observerPosition is ${l}`);const c=zh(e);if(!c)return-1;const d=l.distanceTo(c);return s.distance=d,d}}getPositions(e){if(LA(e))return e.position;if(pt(e))return e.data.mediaPosition;if(TA(e))return BA(this.five.camera.position,xt(e.position),xt(e.normal))}addObjectClickHandler(e,n,o){if(!n||!this.domEvents)return()=>{};const s=()=>!(!e.state.visible||!this.state.visible||pt(e)&&!e.mediaVisible),r=d=>{if(!s()){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo={x:h.clientX,y:h.clientY,isDown:!0,mouseDownTimestamp:Date.now()}},a=d=>{if(!s()){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo&&(this.mouseInfo.isDown&&this.mouseInfo.x===h.clientX&&this.mouseInfo.y===h.clientY&&Date.now()-this.mouseInfo.mouseDownTimestamp<400&&o(h),this.mouseInfo=void 0)},l=d=>{if(!s()){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo={x:Math.floor(h.touches[0].clientX),y:Math.floor(h.touches[0].clientY),isDown:!0,mouseDownTimestamp:Date.now()}},c=d=>{if(!s()){this.mouseInfo=void 0;return}const h=d.origDomEvent;this.mouseInfo&&(this.mouseInfo.isDown&&this.mouseInfo.x===Math.floor(h.changedTouches[h.changedTouches.length-1].clientX)&&this.mouseInfo.y===Math.floor(h.changedTouches[h.changedTouches.length-1].clientY)&&Date.now()-this.mouseInfo.mouseDownTimestamp<400&&o(h),this.mouseInfo=void 0)};return this.domEvents.addEventListener(n,"mousedown",r,!1),this.domEvents.addEventListener(n,"mouseup",a,!1),this.domEvents.addEventListener(n,"touchstart",l,!1),this.domEvents.addEventListener(n,"touchend",c,!1),()=>{this.domEvents&&(this.mouseInfo=void 0,this.domEvents.removeEventListener(n,"mousedown",r),this.domEvents.removeEventListener(n,"mouseup",a),this.domEvents.removeEventListener(n,"touchstart",l),this.domEvents.removeEventListener(n,"touchend",c))}}getTagNormal(e){if(e.normal)return xt(e.normal);if(e.stickType==="Plane")return yr(e.position);if(e.stickType==="Model")return yr(this.getPositions(e))}get filterPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint"||e.stickType==="3DPoint").filter(e=>e.position)}get filter2DPointTag(){return this.tags.filter(e=>e.stickType==="2DPoint").filter(e=>e.position)}get filter3DPointTag(){return this.tags.filter(e=>e.stickType==="3DPoint").filter(e=>e.position)}get filterImagePlane(){return this.tags.filter(e=>e.contentType==="MediaPlane"&&e.stickType==="Plane"&&this.getRenderType(e)==="Mesh")}get filterMediaModel(){return this.tags.filter(e=>e.stickType==="Model"&&e.contentType==="MediaModel")}get filterModelTag(){return this.tags.filter(e=>e.stickType==="Model")}get filterCSS3DTag(){return this.tags.filter(n=>n.stickType==="3DPoint"||n.stickType==="Plane"||n.stickType==="Model"&&n.contentType==="MediaModel").filter(n=>{const o=this.getRenderType(n);return o==="BehindDom"||o==="Dom"})}checkDisposed(){return this.store.disposed?(console.error("PanoTagPluginController has been disposed"),!0):!1}}function tb(i,t){if(!t||!i)return console.error("getFloorIndex: invalid arguments: ",{point:t,observer:i}),0;const e=[];i.forEach(o=>{var r,a;const s=(a=(r=o.floorIndex)!=null?r:o.floor_index)!=null?a:0;e[s]||(e[s]=[]),e[s].push(o.position.y)});const n=e.map(o=>o.reduce((s,r)=>s+r,0)/o.length);for(let o=n.length-1;o>0;o--)if(t.y>=n[o])return o;return 0}class nb extends eb{constructor(e){super(e);f(this,"raycaster",new I.Raycaster)}getVisibleByPanoIndex(e,n){const o=this.getCache({panoIndex:n,id:e.id}),s=n!=null?n:this.five.getCurrentState().panoIndex;if(e.stickType==="Model")return!0;if(o.visible!==void 0)return o.visible;{const r=(()=>{var c,d,h;const a=(c=this.getTagConfig(e).visibleConfig)!=null?c:{},l=this.getDistance(e);if(typeof a=="function")return{value:a(this.five,{tag:e,distance:l}),reason:"config function result"};if(a.keep==="hidden")return{value:!1,reason:"config.keep is hidden"};if(a.keep==="visible")return{value:!0,reason:"config.keep is visible"};if(a.visiblePanoIndex!==void 0&&a.visiblePanoIndex!=="all"&&s!==void 0){if(Array.isArray(a.visiblePanoIndex)&&!a.visiblePanoIndex.includes(s))return{value:!1,reason:`current panoIndex is not included in visiblePano. currentPanoIndex: ${s}, visiblePanoIndex: ${a.visiblePanoIndex}`};if(a.visiblePanoIndex==="current"&&s!==((d=e.fiveState)==null?void 0:d.panoIndex))return{value:!1,reason:`current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${s}, tag.panoIndex: ${(h=e.fiveState)==null?void 0:h.panoIndex}`}}if(a.visibleDistance!==void 0&&a.visibleDistance!=="unLimited"&&ji(l,a.visibleDistance)===!1)return{value:!1,reason:`distance is not in visibleDistance. distance: ${l}, visibleDistance: ${a.visibleDistance}`};if(a.intersectRaycaster!==!1&&(typeof a.intersectRaycaster!="object"||a.intersectRaycaster.enabled!==!1)){if(s===void 0)return{value:!1,reason:`intersectRaycaster check failed: fivePanoIndex is ${s}`};const u=this.getRaycasterFromPanoIndex(e,s);if(!u)return{value:!1,reason:`intersectRaycaster check failed: raycaster is ${u}`};const m=this.getTagEnableByIntersect(e,u);if(m.value===!1)return m}if(a.angleRange&&zA(e)){const u=this.getAngle(e);if(ji(u,a.angleRange)===!1)return{value:!1,reason:`angle is not in angleRange. angle: ${u}, angleRange: ${a.angleRange}`}}return{value:!0,reason:"all check passed"}})();return o.visible=r.value,o.__debug_visible_reason__=r,o.visible}}getVisibleByFiveMode(e,n){const o=n!=null?n:this.five.getCurrentState().mode,s=this.getTagConfig(e).visibleConfig;if(s){if(typeof s=="object"){const r=s==null?void 0:s.visibleFiveMode;return r?r!=null&&r.includes(o)?s.followModelVisibility===!0&&(o==="Floorplan"||o==="Mapview")?this.getVisibleByFloorIndex(e):!0:!1:o==="Panorama"}else if(typeof s=="function")return n==="Panorama"}else return o==="Panorama"}getCurrentVisibleState(e){var n;return(n=this.state.visible&&e.state.visible)!=null?n:!0}getVisible(e){const n=this.five.getCurrentState(),o=this.getVisibleByFiveMode(e),s=n.mode==="Panorama"?this.getVisibleByPanoIndex(e,n.panoIndex):!0;return o&&s}getModelMedialVisibleByPanoIndex(e){if(!this.getCurrentVisibleState(e))return!1;const n=this.five.getCurrentState().panoIndex,o=this.getCache({panoIndex:n,id:e.id});if(o.modelMedialVisible!==void 0)return o.modelMedialVisible;const s=this.getRaycasterFromPanoIndex(e,n);if(!s)return!1;const r=this.getTagEnableByIntersect(e,s);return o.modelMedialVisible=r.value,o.__debug_visible_reason__=r,r.value!==!1}getUnfoldedByPanoIndex(e,n){if(!this.getVisibleByPanoIndex(e))return;const s=this.getCache({panoIndex:n,id:e.id});if(s.unfolded!==void 0)return s.unfolded;{const r=this.getTagConfig(e).unfoldedConfig;if(!r)return;const a=(()=>{const c=this.getDistance(e);if(typeof r=="function")return r(this.five,{tag:e,distance:c});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.unfoldDistance&&ji(c,r.unfoldDistance)===!1)return!1})();s.unfolded=a;const l=this.getUnfoldedByCamera(e);return l!==void 0?l:s.unfolded}}getUnfoldedByCamera(e){return this.getVisible(e)?(()=>{var a;const s=this.getDistance(e),r=this.getTagConfig(e).unfoldedConfig;if(r){if(typeof r=="function")return r(this.five,{tag:e,distance:s});if(r.keep==="folded")return!1;if(r.keep==="unfolded")return!0;if(r.autoUnfold===void 0||r.autoUnfold===!1||r.autoUnfold.enable===!1||!r.autoUnfold.strategy)return;if(r.autoUnfold.strategy==="ScreenPostion"){const l=this.getTagProject(e);if(l&&ji(l.x,r.autoUnfold.autoUnfoldProjectX)===!1)return!1}if(r.autoUnfold.strategy==="MinimumDistance"){const d=this.filterPointTag.filter(u=>this.getVisible(u)).filter(u=>{const m=this.getTagProject(u);if(!m)return!1;const{x:v,y:g,z:A}=m;return!(Math.abs(A)>1||Math.abs(v)>1||Math.abs(g)>1)}).map(u=>({tag:u,id:u.id,tagConfig:this.getTagConfig(u).unfoldedConfig})).filter(({tag:u,tagConfig:m})=>{var v,g;return!(typeof m!="object"||m.keep||m.autoUnfold===!1||((v=m.autoUnfold)==null?void 0:v.enable)===!1||((g=m.autoUnfold)==null?void 0:g.strategy)!=="MinimumDistance")}).map(u=>ye(F({},u),{distance:this.getDistance(u.tag)})).filter(({distance:u,tagConfig:m})=>{var v,g;return!(u===void 0||typeof m!="object"||m.autoUnfold===!1||((v=m.autoUnfold)==null?void 0:v.enable)===!1||((g=m.autoUnfold)==null?void 0:g.strategy)!=="MinimumDistance"||m.autoUnfold.distance&&ji(u,m.autoUnfold.distance)===!1)}).sort((u,m)=>u.distance-m.distance).findIndex(u=>u.id===e.id);if(d===-1||d<=((a=r.autoUnfold.maxNumber)!=null?a:1)-1===!1)return!1}return!0}})():void 0}sort(e){return e.sort((n,o)=>{const s=this.getDistance(n),r=this.getDistance(o);return s===void 0||r===void 0?0:r-s})}setTagZIndex(e){return e.forEach(n=>{const o=this.getDistance(n);n.zIndex=Math.round((o!=null?o:0)*100)})}setPointTagPosition(){const e=this.filterPointTag;e.length!==0&&e.forEach(n=>{var s;if(!((s=n.state)!=null&&s.visible)){n.screenPosition=null;return}const o=this.getTagProject(n);if(!o){n.screenPosition=null;return}n.screenPosition={leftPercent:(o.x+1)/2*100,topPercent:(-o.y+1)/2*100}})}setVisible(){this.tags.forEach(e=>{const n=this.getVisible(e);e.state&&(e.state.visible=n)})}setVisibleByPanoIndex(){this.tags.forEach(e=>{const n=this.getVisibleByPanoIndex(e);e.state&&(e.state.visible=n)})}setModelMedialVisible(){const e=this.five.getCurrentState().mode;this.tags.forEach(n=>{var s;if(!pt(n))return;if(!((s=n.model)!=null&&s.object)){n.mediaVisible=!1;return}const o=e==="Panorama"?this.getModelMedialVisibleByPanoIndex(n):!0;n.mediaVisible=o})}setUnfoldedByPanoIndex(){this.tags.forEach(e=>{const n=this.getUnfoldedByPanoIndex(e);if(e.state&&(n!==void 0&&(e.state.unfolded=n),n&&!e.state.visible)){const o=this.getTagConfig(e);typeof o.unfoldedConfig=="object"&&o.unfoldedConfig.autoFoldWhenHide!==!1&&(e.state.unfolded=!1)}})}getTagProject(e){if(!this.getVisible(e))return;const o=$o(e.position);if(!o)return;const{x:s,y:r,z:a}=o.project(this.five.camera);if(!(a>1))return{x:s,y:r,z:a}}getTagEnableByIntersect(e,n){var d,h,u;const o=(d=this.getTagConfig(e).visibleConfig)!=null?d:{},s=this.getDistance(e),[r]=this.five.model.intersectRaycaster(n),a=(()=>{if(!pt(e))return;const m=this.tags.filter(pt).map(g=>{var A;return(A=g.model)==null?void 0:A.object}).filter(ci);return n.intersectObjects(m,!0)[0]})(),l=(()=>{var m;return typeof o=="object"&&typeof o.intersectRaycaster=="object"&&(m=o.intersectRaycaster.distanceAccuracy)!=null?m:.01})(),c=Math.min((h=r==null?void 0:r.distance)!=null?h:1/0,(u=a==null?void 0:a.distance)!=null?u:1/0);return c+l<s?{value:!1,reason:`intersectRaycaster check failed: distance is ${s}, intersection.distance is ${r==null?void 0:r.distance}, intersection.point is ${r==null?void 0:r.point.toArray()},
565
+ customModelIntersection.point is ${a==null?void 0:a.point.toArray()}, minIntersectionDistance is ${c}`}:{value:!0,reason:""}}getRaycasterFromPanoIndex(e,n){var a;const o=(a=this.five.work.observers[n])==null?void 0:a.position;if(o===void 0)throw new Error(`getVisible(): observerPosition is ${o}`);const s=$o(e.position);if(!s)return;const r=s.sub(o).normalize();return this.raycaster.set(o,r),this.raycaster}getVisibleByFloorIndex(e){var r,a,l,c,d,h,u;let n=0;const o=(r=e.fiveState)==null?void 0:r.panoIndex;o!==void 0?n=(a=this.five.work.observers[o])==null?void 0:a.floorIndex:n=tb(this.five.work.observers,(u=(h=(c=(l=e.model)==null?void 0:l.object)==null?void 0:c.position)!=null?h:(d=e.mediaPlane)==null?void 0:d.position)!=null?u:zh(e));const s=this.five.model.shownFloor;return s===null||s===n}}function ib(i){fe(i,"svelte-xuejcm",".line.svelte-xuejcm{position:absolute;pointer-events:none}.line.vertical.svelte-xuejcm{transform:rotate(-90deg) translate3d(0.03125rem, 0, 0.625rem);transform-origin:0 0}.line.horizontal.svelte-xuejcm{transform:translate3d(0, -0.03125rem, 0.625rem)}.straight-line.svelte-xuejcm{display:block;width:100%;height:100%;overflow:visible}")}function ec(i){let t,e,n,o,s,r,a,l=i[3]&&tc(i);return{c(){t=z("div"),e=Te("svg"),n=Te("defs"),o=Te("linearGradient"),s=Te("stop"),r=Te("stop"),l&&l.c(),w(s,"offset","25%"),w(s,"stop-color",i[5]),w(s,"stop-opacity","1"),w(r,"offset","100%"),w(r,"stop-color",i[5]),w(r,"stop-opacity","0.5"),w(o,"x1",.5),w(o,"y1",.5),w(o,"x2",i[8]),w(o,"y2",.5),w(o,"id",i[10]),w(o,"gradientUnits","userSpaceOnUse"),w(e,"class","straight-line svelte-xuejcm"),w(e,"viewBox",a="0 0 "+i[8]+" "+i[7]),w(e,"preserveAspectRatio","none"),w(t,"class","line svelte-xuejcm"),$(t,"vertical",i[9]),$(t,"horizontal",!i[9]),T(t,"width",i[8]+"px"),T(t,"height",i[7]+"px")},m(c,d){j(c,t,d),O(t,e),O(e,n),O(n,o),O(o,s),O(o,r),l&&l.m(e,null)},p(c,d){d&32&&w(s,"stop-color",c[5]),d&32&&w(r,"stop-color",c[5]),d&256&&w(o,"x2",c[8]),c[3]?l?(l.p(c,d),d&8&&x(l,1)):(l=tc(c),l.c(),x(l,1),l.m(e,null)):l&&(de(),L(l,1,1,()=>{l=null}),he()),d&384&&a!==(a="0 0 "+c[8]+" "+c[7])&&w(e,"viewBox",a),d&512&&$(t,"vertical",c[9]),d&512&&$(t,"horizontal",!c[9]),d&256&&T(t,"width",c[8]+"px"),d&128&&T(t,"height",c[7]+"px")},d(c){c&&V(t),l&&l.d()}}}function tc(i){let t,e,n,o,s;return{c(){t=Te("path"),w(t,"fill","none"),w(t,"stroke",e=i[4]?`url(#${i[10]})`:i[5]),w(t,"stroke-width",1),w(t,"d",i[6])},m(r,a){j(r,t,a),s=!0},p(r,a){i=r,(!s||a&48&&e!==(e=i[4]?`url(#${i[10]})`:i[5]))&&w(t,"stroke",e),(!s||a&64)&&w(t,"d",i[6])},i(r){s||(r&&ot(()=>{s&&(o&&o.end(1),n=Dn(t,Jo,{duration:i[2],delay:i[0],easing:sn}),n.start())}),s=!0)},o(r){n&&n.invalidate(),r&&(o=gi(t,Jo,{duration:i[2],delay:i[1],easing:sn})),s=!1},d(r){r&&V(t),r&&o&&o.end()}}}function ob(i){let t,e=i[8]&&ec(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),j(n,t,o)},p(n,[o]){n[8]?e?e.p(n,o):(e=ec(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:K,o:K,d(n){e&&e.d(n),n&&V(t)}}}function sb(i,t,e){let n,o,s,r,{inDelay:a=0}=t,{outDelay:l=0}=t,{duration:c=1e3}=t,{unfolded:d}=t,{length:h}=t,{direction:u="horizontal"}=t,{useLinearColor:m=!1}=t,{color:v="white"}=t;const g=dt();return i.$$set=A=>{"inDelay"in A&&e(0,a=A.inDelay),"outDelay"in A&&e(1,l=A.outDelay),"duration"in A&&e(2,c=A.duration),"unfolded"in A&&e(3,d=A.unfolded),"length"in A&&e(11,h=A.length),"direction"in A&&e(12,u=A.direction),"useLinearColor"in A&&e(4,m=A.useLinearColor),"color"in A&&e(5,v=A.color)},i.$$.update=()=>{i.$$.dirty&4096&&e(9,n=u==="vertical"),i.$$.dirty&2048&&e(8,o=h),i.$$.dirty&2048&&e(6,r=`M0.5 0.5 H ${h}`)},e(7,s=1),[a,l,c,d,m,v,r,s,o,n,g,h,u]}class va extends ce{constructor(t){super(),le(this,t,sb,ob,ae,{inDelay:0,outDelay:1,duration:2,unfolded:3,length:11,direction:12,useLinearColor:4,color:5},ib)}}function rb(i){fe(i,"svelte-faoauy",".shadow.svelte-faoauy{position:absolute}")}function nc(i){let t,e,n,o,s;return{c(){t=z("div"),w(t,"class","shadow svelte-faoauy"),w(t,"style",e=`
566
566
  left:${bt(i[5])};
567
567
  bottom:${bt(i[6])};
568
568
  box-shadow: 0 0 ${bt(i[10])} ${bt(i[11])} rgba(0, 0, 0, ${i[12]});
569
569
  ${i[8]?"transform: translateX(-50%); left: 50%":""}
570
570
  ${i[9]?"transform: translateX(-50%); top: 50%":""}
571
571
  ${i[7]?"transform: translate(-50%, -50%); left: 50%; top: 50%;":""}
572
- `),T(t,"width",bt(i[3])),T(t,"height",bt(i[4])),T(t,"z-index",i[13])},m(r,a){V(r,t,a),s=!0},p(r,a){i=r,(!s||a&8160&&e!==(e=`
572
+ `),T(t,"width",bt(i[3])),T(t,"height",bt(i[4])),T(t,"z-index",i[13])},m(r,a){j(r,t,a),s=!0},p(r,a){i=r,(!s||a&8160&&e!==(e=`
573
573
  left:${bt(i[5])};
574
574
  bottom:${bt(i[6])};
575
575
  box-shadow: 0 0 ${bt(i[10])} ${bt(i[11])} rgba(0, 0, 0, ${i[12]});
576
576
  ${i[8]?"transform: translateX(-50%); left: 50%":""}
577
577
  ${i[9]?"transform: translateX(-50%); top: 50%":""}
578
578
  ${i[7]?"transform: translate(-50%, -50%); left: 50%; top: 50%;":""}
579
- `))&&w(t,"style",e);const l=a&8160;(l||a&8168)&&T(t,"width",bt(i[3])),(l||a&8176)&&T(t,"height",bt(i[4])),(l||a&16352)&&T(t,"z-index",i[13])},i(r){s||(r&&ot(()=>{s&&(o&&o.end(1),n=Dn(t,In,{duration:i[0]}),n.start())}),s=!0)},o(r){n&&n.invalidate(),r&&(o=gi(t,In,{duration:i[1]})),s=!1},d(r){r&&_(t),r&&o&&o.end()}}}function ab(i){let t,e=i[2]&&nc(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),V(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&x(e,1)):(e=nc(n),e.c(),x(e,1),e.m(t.parentNode,t)):e&&(de(),L(e,1,1,()=>{e=null}),he())},i(n){x(e)},o(n){L(e)},d(n){e&&e.d(n),n&&_(t)}}}function bt(i){return typeof i=="number"?i/16+"rem":i}function lb(i,t,e){let{inDelay:n=1e3}=t,{outDelay:o=1e3}=t,{visible:s=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:d=!1}=t,{horizontalCenter:h=!1}=t,{verticalCenter:u=!1}=t,{blurRadius:m}=t,{spreadRadius:v}=t,{opacity:g=.15}=t,{zIndex:A=-1}=t;return i.$$set=b=>{"inDelay"in b&&e(0,n=b.inDelay),"outDelay"in b&&e(1,o=b.outDelay),"visible"in b&&e(2,s=b.visible),"width"in b&&e(3,r=b.width),"height"in b&&e(4,a=b.height),"left"in b&&e(5,l=b.left),"bottom"in b&&e(6,c=b.bottom),"center"in b&&e(7,d=b.center),"horizontalCenter"in b&&e(8,h=b.horizontalCenter),"verticalCenter"in b&&e(9,u=b.verticalCenter),"blurRadius"in b&&e(10,m=b.blurRadius),"spreadRadius"in b&&e(11,v=b.spreadRadius),"opacity"in b&&e(12,g=b.opacity),"zIndex"in b&&e(13,A=b.zIndex)},[n,o,s,r,a,l,c,d,h,u,m,v,g,A]}class Rt extends ce{constructor(t){super(),le(this,t,lb,ab,ae,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,blurRadius:10,spreadRadius:11,opacity:12,zIndex:13},rb)}}function cb(){return Math.random().toString(36).slice(-6)}const Pr=cb();function db(i){fe(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function ic(i,t,e){const n=i.slice();return n[18]=t[e].id,n[0]=t[e].content,n[19]=t,n[20]=e,n}function hb(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=z("span"),n=je(e),w(t,"class","text-char svelte-1b2n9wi")},m(a,l){V(a,t,l),O(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&Oe(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&_(t),r()}}}function ub(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=z("span"),t.textContent=" ",w(t,"class","text-char svelte-1b2n9wi")},m(s,r){V(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&_(t),o()}}}function oc(i,t){let e,n;function o(a,l){return a[0]===a[3]?ub:hb}let s=o(t),r=s(t);return{key:i,first:null,c(){e=Ee(),r.c(),n=Ee(),this.first=e},m(a,l){V(a,e,l),r.m(a,l),V(a,n,l)},p(a,l){t=a,s===(s=o(t))&&r?r.p(t,l):(r.d(1),r=s(t),r&&(r.c(),r.m(n.parentNode,n)))},d(a){a&&_(e),r.d(a),a&&_(n)}}}function fb(i){let t=[],e=new Map,n,o=i[2];const s=r=>r[18];for(let r=0;r<o.length;r+=1){let a=ic(i,o,r),l=s(a);e.set(l,t[r]=oc(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=Ee()},m(r,a){for(let l=0;l<t.length;l+=1)t[l]&&t[l].m(r,a);V(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=St(t,a,s,1,r,o,e,n.parentNode,aa,oc,n,ic))},i:K,o:K,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&_(n)}}}function mb(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${Pr}__`,d=`__EMOJI_${Pr}__`,h=`__SPACE_${Pr}__`;let u,m,v=[];function g(S){const C=[],j=new RegExp(new RegExp("\\p{Regional_Indicator}\\p{Regional_Indicator}|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?(\\u200D\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?)+|\\p{Emoji_Presentation}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)","gu"));return S.slice().replace(j,M=>`${c}${d}${M}${c}`).split(c).forEach(M=>M.startsWith(d)?C.push({id:dt(),content:M.slice(d.length)}):C.push(...M.split("").map(X=>X===" "?h:X).map(X=>({id:dt(),content:X})))),C}function A(){if(!m)return;const S=!a;m.reversed!==S&&m.reverse(),m.play()}function b(S){if(l){e(4,l=!1);return}clearTimeout(u),u=setTimeout(A,S?o:s)}function y(S){const C=function(){const j=QA(M=>S[M].getBoundingClientRect().x,[Math.min(S.length-1,10),Math.min(S.length-1,30)]);if(j>0)return j}();m=Ma({targets:S.slice(0,C).filter(ci),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Ma.stagger(50),easing:"easeInOutCubic"}),a&&m.seek(m.duration)}function E(S,C){Ke[S?"unshift":"push"](()=>{v[C]=S,e(1,v)})}function k(S,C){Ke[S?"unshift":"push"](()=>{v[C]=S,e(1,v)})}return i.$$set=S=>{"inDelay"in S&&e(5,o=S.inDelay),"outDelay"in S&&e(6,s=S.outDelay),"content"in S&&e(0,r=S.content),"unfolded"in S&&e(7,a=S.unfolded),"isFistUnfoldedUpdate"in S&&e(4,l=S.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=g(r)),i.$$.dirty&128&&b(a),i.$$.dirty&2&&y(v.filter(S=>!!S))},[r,v,n,h,l,o,s,a,E,k]}class Rh extends ce{constructor(t){super(),le(this,t,mb,fb,ae,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},db)}}function pb(i){fe(i,"svelte-1ogmlqq",".arrow.svelte-1ogmlqq{width:100%;height:100%;background-size:100%;transition:transform 400ms ease-in-out;cursor:pointer;pointer-events:auto}.arrow-wrapper.svelte-1ogmlqq{position:relative;width:100%;height:100%}.arrow.left.svelte-1ogmlqq{transform:rotate(0deg)}.arrow.right.svelte-1ogmlqq{transform:rotate(-180deg)}.arrow.top.svelte-1ogmlqq{transform:rotate(90deg)}.arrow.bottom.svelte-1ogmlqq{transform:rotate(-90deg)}")}function sc(i){let t,e,n,o,s,r,a,l,c,d;return e=new Rt({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),o=z("div"),w(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),T(o,"background-image","url("+JA+")"),w(t,"class","arrow-wrapper svelte-1ogmlqq")},m(h,u){V(h,t,u),ee(e,t,null),O(t,n),O(t,o),l=!0,c||(d=Ce(o,"click",i[5]),c=!0)},p(h,u){i=h,(!l||u&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&w(o,"class",s)},i(h){l||(x(e.$$.fragment,h),h&&ot(()=>{l&&(a&&a.end(1),r=Dn(o,In,{duration:i[2],delay:i[3],easing:oi}),r.start())}),l=!0)},o(h){L(e.$$.fragment,h),r&&r.invalidate(),h&&(a=gi(o,In,{duration:i[2],delay:i[4],easing:oi})),l=!1},d(h){h&&_(t),te(e),h&&a&&a.end(),c=!1,d()}}}function gb(i){let t,e,n=i[1]&&sc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=sc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function vb(i,t,e){let{direction:n="right"}=t,{visible:o=!0}=t,{duration:s=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){pi.call(this,i,c)}return i.$$set=c=>{"direction"in c&&e(0,n=c.direction),"visible"in c&&e(1,o=c.visible),"duration"in c&&e(2,s=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[n,o,s,r,a,l]}let Ab=class extends ce{constructor(t){super(),le(this,t,vb,gb,ae,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},pb)}};function bb(i,t,e=20,n=5){return new Promise((o,s)=>{let r=0;const a=setInterval(()=>{const l=i();t(l)?(clearInterval(a),o(l)):r>=n&&(clearInterval(a),s(l)),r++},e)})}function yb(i){fe(i,"svelte-1fuzm7v",".text.svelte-1fuzm7v{pointer-events:auto;box-sizing:border-box;display:inline-block;max-width:7.5rem;transition:transform 400ms ease-in-out;font-size:0.75rem;line-height:1.125rem;white-space:initial;cursor:pointer}.arrow.svelte-1fuzm7v{pointer-events:auto;display:inline-block;vertical-align:top;width:0.875rem;height:0.875rem;margin-left:0.125rem;margin-top:0.125rem}")}function rc(i){let t,e,n;return e=new Rh({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","text svelte-1fuzm7v"),T(t,"transform",i[7])},m(o,s){V(o,t,s),ee(e,t,null),i[10](t),n=!0},p(o,s){const r={};s&1&&(r.unfolded=o[0]),s&2&&(r.content=o[1]),s&32&&(r.outDelay=o[5]),e.$set(r),s&128&&T(t,"transform",o[7])},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&_(t),te(e),i[10](null)}}}function ac(i){let t,e,n;return e=new Ab({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","arrow svelte-1fuzm7v")},m(o,s){V(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.direction=o[6]),s&1&&(r.visible=o[0]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&_(t),te(e)}}}function wb(i){let t,e,n,o=i[1]&&rc(i),s=i[3]<i[4]&&ac(i);return{c(){o&&o.c(),t=ne(),s&&s.c(),e=Ee()},m(r,a){o&&o.m(r,a),V(r,t,a),s&&s.m(r,a),V(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&x(o,1)):(o=rc(r),o.c(),x(o,1),o.m(t.parentNode,t)):o&&(de(),L(o,1,1,()=>{o=null}),he()),r[3]<r[4]?s?(s.p(r,a),a&24&&x(s,1)):(s=ac(r),s.c(),x(s,1),s.m(e.parentNode,e)):s&&(de(),L(s,1,1,()=>{s=null}),he())},i(r){n||(x(o),x(s),n=!0)},o(r){L(o),L(s),n=!1},d(r){o&&o.d(r),r&&_(t),s&&s.d(r),r&&_(e)}}}function Pb(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,d=0,h=0,u=0;function m(v){Ke[v?"unshift":"push"](()=>{c=v,e(2,c)})}return i.$$set=v=>{"visible"in v&&e(0,r=v.visible),"textUnfolded"in v&&e(8,a=v.textUnfolded),"content"in v&&e(1,l=v.content)},i.$$.update=()=>{if(i.$$.dirty&7&&c&&r&&l){const{lineHeight:v}=getComputedStyle(c);e(4,u=c.offsetHeight),bb(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,u=c.offsetHeight)}),e(3,h=Number(v.replace("px","")))}i.$$.dirty&280&&e(9,d=a?h-u:0),i.$$.dirty&512&&e(7,n=`translateY(${d}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,h,u,s,o,n,a,d,m]}class Qh extends ce{constructor(t){super(),le(this,t,Pb,wb,ae,{visible:0,textUnfolded:8,content:1},yb)}}function Cb(i){fe(i,"svelte-nlvd3x",".content.svelte-nlvd3x{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0;overflow:hidden;box-sizing:border-box;font-size:0;pointer-events:none;white-space:nowrap;font-weight:600}")}function lc(i){var d,h;let t,e,n,o,s,r,a,l,c;return t=new Rt({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new va({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((h=(d=i[6][0])==null?void 0:d.content.length)!=null?h:10,15),useLinearColor:!0}}),r=new Qh({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){ie(t.$$.fragment),e=ne(),ie(n.$$.fragment),o=ne(),s=z("div"),ie(r.$$.fragment),w(s,"class","content svelte-nlvd3x")},m(u,m){ee(t,u,m),V(u,e,m),ee(n,u,m),V(u,o,m),V(u,s,m),ee(r,s,null),a=!0,l||(c=[Ut(vi.call(null,s)),Ce(s,"clientWidth",i[8]),Ce(s,"click",i[7])],l=!0)},p(u,m){var b,y;const v={};m&4&&(v.visible=u[2]),m&8&&(v.left=u[3]/2+"px"),t.$set(v);const g={};m&4&&(g.unfolded=u[2]),m&8&&(g.length=u[3]),m&16&&(g.outDelay=u[4]+40*Math.min((y=(b=u[6][0])==null?void 0:b.content.length)!=null?y:10,15)),n.$set(g);const A={};m&4&&(A.visible=u[2]),m&2&&(A.textUnfolded=u[1]),m&32&&(A.content=u[5]),r.$set(A)},i(u){a||(x(t.$$.fragment,u),x(n.$$.fragment,u),x(r.$$.fragment,u),a=!0)},o(u){L(t.$$.fragment,u),L(n.$$.fragment,u),L(r.$$.fragment,u),a=!1},d(u){te(t,u),u&&_(e),te(n,u),u&&_(o),u&&_(s),te(r),l=!1,rt(c)}}}function Eb(i){let t,e,n=i[0].state&&lc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=lc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function Ib(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function d(){e(1,l=!l)}const h=u=>{e(3,a=u.detail)};return i.$$set=u=>{"tag"in u&&e(0,r=u.tag)},i.$$.update=()=>{var u,m,v;i.$$.dirty&1&&e(2,n=!!((u=r.state)!=null&&u.unfolded)),i.$$.dirty&1&&e(5,o=(v=(m=r.data.title)!=null?m:r.data.text)!=null?v:""),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(4,s=l?450:0)},[r,l,n,a,s,o,c,d,h]}class kb extends ce{constructor(t){super(),le(this,t,Ib,Eb,ae,{tag:0},Cb)}}function Ot(i){return typeof i=="number"?i/16+"rem":i}function xb(i){fe(i,"svelte-i9wdo4",".text.svelte-i9wdo4{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-i9wdo4-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-i9wdo4{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-i9wdo4-blink 1.2s infinite}.placeholder.svelte-i9wdo4{opacity:0.5}")}function Db(i){let t;const e=i[6].default,n=hi(e,i,i[5],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&32)&&fi(n,e,o,o[5],t?ui(e,o[5],s,null):mi(o[5]),null)},i(o){t||(x(n,o),t=!0)},o(o){L(n,o),t=!1},d(o){n&&n.d(o)}}}function Mb(i){var s,r;let t,e,n=((s=i[3])==null?void 0:s.inputting)&&cc(),o=((r=i[3])==null?void 0:r.placeholder)&&dc(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=Ee()},m(a,l){n&&n.m(a,l),V(a,t,l),o&&o.m(a,l),V(a,e,l)},p(a,l){var c,d;(c=a[3])!=null&&c.inputting?n||(n=cc(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(d=a[3])!=null&&d.placeholder?o?o.p(a,l):(o=dc(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:K,o:K,d(a){n&&n.d(a),a&&_(t),o&&o.d(a),a&&_(e)}}}function Sb(i){let t;return{c(){t=je(i[2])},m(e,n){V(e,t,n)},p(e,n){n&4&&Oe(t,e[2])},i:K,o:K,d(e){e&&_(t)}}}function cc(i){let t;return{c(){t=z("div"),w(t,"class","caret svelte-i9wdo4")},m(e,n){V(e,t,n)},d(e){e&&_(t)}}}function dc(i){let t,e=i[3].placeholder+"",n;return{c(){t=z("span"),n=je(e),w(t,"class","placeholder svelte-i9wdo4")},m(o,s){V(o,t,s),O(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&Oe(n,e)},d(o){o&&_(t)}}}function Lb(i){let t,e,n,o;const s=[Sb,Mb,Db],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=z("div"),n.c(),w(t,"class","text svelte-i9wdo4"),T(t,"max-width",typeof i[1]=="number"?Ot(i[1]):i[1]),T(t,"-webkit-line-clamp",i[0])},m(l,c){V(l,t,c),r[e].m(t,null),o=!0},p(l,[c]){let d=e;e=a(l),e===d?r[e].p(l,c):(de(),L(r[d],1,1,()=>{r[d]=null}),he(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),x(n,1),n.m(t,null)),c&2&&T(t,"max-width",typeof l[1]=="number"?Ot(l[1]):l[1]),c&1&&T(t,"-webkit-line-clamp",l[0])},i(l){o||(x(n),o=!0)},o(l){L(n),o=!1},d(l){l&&_(t),r[e].d()}}}function Tb(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{maxLine:r=1}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return i.$$set=d=>{"maxLine"in d&&e(0,r=d.maxLine),"maxWidth"in d&&e(1,a=d.maxWidth),"text"in d&&e(2,l=d.text),"edit"in d&&e(3,c=d.edit),"$$scope"in d&&e(5,s=d.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(4,n=(c==null?void 0:c.placeholder)||(c==null?void 0:c.inputting))},[r,a,l,c,n,s,o]}class Aa extends ce{constructor(t){super(),le(this,t,Tb,Lb,ae,{maxLine:0,maxWidth:1,text:2,edit:3},xb)}}function zb(i){fe(i,"svelte-1oxrkr1",".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}")}function hc(i){var h,u;let t,e,n,o,s,r,a,l,c;t=new va({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new Aa({props:{text:i[2],edit:(h=i[0].data.edit)==null?void 0:h.title}});let d=(i[0].data.description||((u=i[0].data.edit)==null?void 0:u.description))&&uc(i);return{c(){ie(t.$$.fragment),e=ne(),n=z("div"),o=z("div"),s=z("div"),r=z("div"),ie(a.$$.fragment),l=ne(),d&&d.c(),w(r,"class","title svelte-1oxrkr1"),w(s,"class","plane svelte-1oxrkr1"),w(o,"class","plane__wrapper svelte-1oxrkr1"),T(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),w(n,"class","plane__container svelte-1oxrkr1"),$(n,"unfolded",i[1]),$(n,"folded",i[3])},m(m,v){ee(t,m,v),V(m,e,v),V(m,n,v),O(n,o),O(o,s),O(s,r),ee(a,r,null),O(s,l),d&&d.m(s,null),c=!0},p(m,v){var b,y;const g={};v&2&&(g.unfolded=m[1]),t.$set(g);const A={};v&4&&(A.text=m[2]),v&1&&(A.edit=(b=m[0].data.edit)==null?void 0:b.title),a.$set(A),m[0].data.description||(y=m[0].data.edit)!=null&&y.description?d?(d.p(m,v),v&1&&x(d,1)):(d=uc(m),d.c(),x(d,1),d.m(s,null)):d&&(de(),L(d,1,1,()=>{d=null}),he()),v&2&&T(o,"transform",m[1]?"translateY(-15px)":"translateY(0)"),(!c||v&2)&&$(n,"unfolded",m[1]),(!c||v&8)&&$(n,"folded",m[3])},i(m){c||(x(t.$$.fragment,m),x(a.$$.fragment,m),x(d),c=!0)},o(m){L(t.$$.fragment,m),L(a.$$.fragment,m),L(d),c=!1},d(m){te(t,m),m&&_(e),m&&_(n),te(a),d&&d.d()}}}function uc(i){var o;let t,e,n;return e=new Aa({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","description svelte-1oxrkr1")},m(s,r){V(s,t,r),ee(e,t,null),n=!0},p(s,r){var l;const a={};r&1&&(a.text=s[0].data.description),r&1&&(a.edit=(l=s[0].data.edit)==null?void 0:l.description),e.$set(a)},i(s){n||(x(e.$$.fragment,s),n=!0)},o(s){L(e.$$.fragment,s),n=!1},d(s){s&&_(t),te(e)}}}function jb(i){let t,e,n=i[0].state&&hc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=hc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function _b(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l,c;i.$$.dirty&1&&e(1,n=!!((a=r.state)!=null&&a.unfolded)),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=(c=(l=r.data.title)!=null?l:r.data.text)!=null?c:"")},[r,n,s,o]}class Vb extends ce{constructor(t){super(),le(this,t,_b,jb,ae,{tag:0},zb)}}function Ob(i){let t,e;return t=new Vb({props:{tag:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Bb(i){let t,e;return t=new kb({props:{tag:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Rb(i){let t,e,n,o;const s=[Bb,Ob],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=Ee()},m(l,c){~t&&r[t].m(l,c),V(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(de(),L(r[d],1,1,()=>{r[d]=null}),he()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(x(e),o=!0)},o(l){L(e),o=!1},d(l){~t&&r[t].d(l),l&&_(n)}}}function Qb(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s;i.$$.dirty&1&&e(1,n=(s=o.data.appearance)!=null?s:"line")},[o,n]}class Hb extends ce{constructor(t){super(),le(this,t,Qb,Rb,ae,{tag:0})}}function Gb(i){fe(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function fc(i){let t,e,n,o;return{c(){t=Te("path"),w(t,"fill","none"),w(t,"stroke","url(#"+i[4]+")"),w(t,"stroke-width","1"),w(t,"d","M0 21 L14 0.5 L105 0.5")},m(s,r){V(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&ot(()=>{o&&(n&&n.end(1),e=Dn(t,Jo,{duration:i[1],delay:i[0],easing:ah}),e.start())}),o=!0)},o(s){e&&e.invalidate(),s&&(n=gi(t,Jo,{duration:i[1],delay:i[2],easing:oi})),o=!1},d(s){s&&_(t),s&&n&&n.end()}}}function Fb(i){let t,e,n,o,s,r=i[3]&&fc(i);return{c(){t=Te("svg"),e=Te("defs"),n=Te("linearGradient"),o=Te("stop"),s=Te("stop"),r&&r.c(),w(o,"offset","25%"),w(o,"stop-color","white"),w(o,"stop-opacity","1"),w(s,"offset","100%"),w(s,"stop-color","white"),w(s,"stop-opacity","0.5"),w(n,"id",i[4]),w(n,"gradientUnits","userSpaceOnUse"),w(t,"class","line svelte-blgtit"),w(t,"viewBox","0 0 105 21")},m(a,l){V(a,t,l),O(t,e),O(e,n),O(n,o),O(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&x(r,1)):(r=fc(a),r.c(),x(r,1),r.m(t,null)):r&&(de(),L(r,1,1,()=>{r=null}),he())},i(a){x(r)},o(a){L(r)},d(a){a&&_(t),r&&r.d()}}}function Wb(i,t,e){let{inDelay:n=0}=t,{duration:o=1e3}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=dt();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Nb extends ce{constructor(t){super(),le(this,t,Wb,Fb,ae,{inDelay:0,duration:1,outDelay:2,unfolded:3},Gb)}}function Xb(i){fe(i,"svelte-1mgyhhn",`:root{--sc-dot-size:6px;--sc-active-dot-size:8px;--sc-dot-size-animation-time:250ms}.sc-carousel-dot__dot.svelte-1mgyhhn{background-color:var(--sc-color-rgb-light);border-radius:50%;display:inline-block;opacity:0.5;transition:opacity 100ms ease,\r
579
+ `))&&w(t,"style",e);const l=a&8160;(l||a&8168)&&T(t,"width",bt(i[3])),(l||a&8176)&&T(t,"height",bt(i[4])),(l||a&16352)&&T(t,"z-index",i[13])},i(r){s||(r&&ot(()=>{s&&(o&&o.end(1),n=Dn(t,In,{duration:i[0]}),n.start())}),s=!0)},o(r){n&&n.invalidate(),r&&(o=gi(t,In,{duration:i[1]})),s=!1},d(r){r&&V(t),r&&o&&o.end()}}}function ab(i){let t,e=i[2]&&nc(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),j(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&x(e,1)):(e=nc(n),e.c(),x(e,1),e.m(t.parentNode,t)):e&&(de(),L(e,1,1,()=>{e=null}),he())},i(n){x(e)},o(n){L(e)},d(n){e&&e.d(n),n&&V(t)}}}function bt(i){return typeof i=="number"?i/16+"rem":i}function lb(i,t,e){let{inDelay:n=1e3}=t,{outDelay:o=1e3}=t,{visible:s=!0}=t,{width:r=0}=t,{height:a=0}=t,{left:l=0}=t,{bottom:c=0}=t,{center:d=!1}=t,{horizontalCenter:h=!1}=t,{verticalCenter:u=!1}=t,{blurRadius:m}=t,{spreadRadius:v}=t,{opacity:g=.15}=t,{zIndex:A=-1}=t;return i.$$set=b=>{"inDelay"in b&&e(0,n=b.inDelay),"outDelay"in b&&e(1,o=b.outDelay),"visible"in b&&e(2,s=b.visible),"width"in b&&e(3,r=b.width),"height"in b&&e(4,a=b.height),"left"in b&&e(5,l=b.left),"bottom"in b&&e(6,c=b.bottom),"center"in b&&e(7,d=b.center),"horizontalCenter"in b&&e(8,h=b.horizontalCenter),"verticalCenter"in b&&e(9,u=b.verticalCenter),"blurRadius"in b&&e(10,m=b.blurRadius),"spreadRadius"in b&&e(11,v=b.spreadRadius),"opacity"in b&&e(12,g=b.opacity),"zIndex"in b&&e(13,A=b.zIndex)},[n,o,s,r,a,l,c,d,h,u,m,v,g,A]}class Rt extends ce{constructor(t){super(),le(this,t,lb,ab,ae,{inDelay:0,outDelay:1,visible:2,width:3,height:4,left:5,bottom:6,center:7,horizontalCenter:8,verticalCenter:9,blurRadius:10,spreadRadius:11,opacity:12,zIndex:13},rb)}}function cb(){return Math.random().toString(36).slice(-6)}const Pr=cb();function db(i){fe(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function ic(i,t,e){const n=i.slice();return n[18]=t[e].id,n[0]=t[e].content,n[19]=t,n[20]=e,n}function hb(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=z("span"),n=_e(e),w(t,"class","text-char svelte-1b2n9wi")},m(a,l){j(a,t,l),O(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&Oe(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&V(t),r()}}}function ub(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=z("span"),t.textContent=" ",w(t,"class","text-char svelte-1b2n9wi")},m(s,r){j(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&V(t),o()}}}function oc(i,t){let e,n;function o(a,l){return a[0]===a[3]?ub:hb}let s=o(t),r=s(t);return{key:i,first:null,c(){e=Ee(),r.c(),n=Ee(),this.first=e},m(a,l){j(a,e,l),r.m(a,l),j(a,n,l)},p(a,l){t=a,s===(s=o(t))&&r?r.p(t,l):(r.d(1),r=s(t),r&&(r.c(),r.m(n.parentNode,n)))},d(a){a&&V(e),r.d(a),a&&V(n)}}}function fb(i){let t=[],e=new Map,n,o=i[2];const s=r=>r[18];for(let r=0;r<o.length;r+=1){let a=ic(i,o,r),l=s(a);e.set(l,t[r]=oc(l,a))}return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=Ee()},m(r,a){for(let l=0;l<t.length;l+=1)t[l]&&t[l].m(r,a);j(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=St(t,a,s,1,r,o,e,n.parentNode,aa,oc,n,ic))},i:K,o:K,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&V(n)}}}function mb(i,t,e){let n,{inDelay:o=0}=t,{outDelay:s=0}=t,{content:r}=t,{unfolded:a}=t,{isFistUnfoldedUpdate:l=!0}=t;const c=`__EMOJI_SPLIT_${Pr}__`,d=`__EMOJI_${Pr}__`,h=`__SPACE_${Pr}__`;let u,m,v=[];function g(S){const C=[],_=new RegExp(new RegExp("\\p{Regional_Indicator}\\p{Regional_Indicator}|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?(\\u200D\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?)+|\\p{Emoji_Presentation}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)?|\\p{Emoji}(\\p{Emoji_Modifier}+|\\uFE0F\\u20E3?)","gu"));return S.slice().replace(_,M=>`${c}${d}${M}${c}`).split(c).forEach(M=>M.startsWith(d)?C.push({id:dt(),content:M.slice(d.length)}):C.push(...M.split("").map(X=>X===" "?h:X).map(X=>({id:dt(),content:X})))),C}function A(){if(!m)return;const S=!a;m.reversed!==S&&m.reverse(),m.play()}function b(S){if(l){e(4,l=!1);return}clearTimeout(u),u=setTimeout(A,S?o:s)}function y(S){const C=function(){const _=QA(M=>S[M].getBoundingClientRect().x,[Math.min(S.length-1,10),Math.min(S.length-1,30)]);if(_>0)return _}();m=Ma({targets:S.slice(0,C).filter(ci),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:Ma.stagger(50),easing:"easeInOutCubic"}),a&&m.seek(m.duration)}function E(S,C){Ke[S?"unshift":"push"](()=>{v[C]=S,e(1,v)})}function k(S,C){Ke[S?"unshift":"push"](()=>{v[C]=S,e(1,v)})}return i.$$set=S=>{"inDelay"in S&&e(5,o=S.inDelay),"outDelay"in S&&e(6,s=S.outDelay),"content"in S&&e(0,r=S.content),"unfolded"in S&&e(7,a=S.unfolded),"isFistUnfoldedUpdate"in S&&e(4,l=S.isFistUnfoldedUpdate)},i.$$.update=()=>{i.$$.dirty&1&&e(2,n=g(r)),i.$$.dirty&128&&b(a),i.$$.dirty&2&&y(v.filter(S=>!!S))},[r,v,n,h,l,o,s,a,E,k]}class Rh extends ce{constructor(t){super(),le(this,t,mb,fb,ae,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},db)}}function pb(i){fe(i,"svelte-1ogmlqq",".arrow.svelte-1ogmlqq{width:100%;height:100%;background-size:100%;transition:transform 400ms ease-in-out;cursor:pointer;pointer-events:auto}.arrow-wrapper.svelte-1ogmlqq{position:relative;width:100%;height:100%}.arrow.left.svelte-1ogmlqq{transform:rotate(0deg)}.arrow.right.svelte-1ogmlqq{transform:rotate(-180deg)}.arrow.top.svelte-1ogmlqq{transform:rotate(90deg)}.arrow.bottom.svelte-1ogmlqq{transform:rotate(-90deg)}")}function sc(i){let t,e,n,o,s,r,a,l,c,d;return e=new Rt({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),o=z("div"),w(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),T(o,"background-image","url("+JA+")"),w(t,"class","arrow-wrapper svelte-1ogmlqq")},m(h,u){j(h,t,u),ee(e,t,null),O(t,n),O(t,o),l=!0,c||(d=Ce(o,"click",i[5]),c=!0)},p(h,u){i=h,(!l||u&1&&s!==(s="arrow "+i[0]+" svelte-1ogmlqq"))&&w(o,"class",s)},i(h){l||(x(e.$$.fragment,h),h&&ot(()=>{l&&(a&&a.end(1),r=Dn(o,In,{duration:i[2],delay:i[3],easing:oi}),r.start())}),l=!0)},o(h){L(e.$$.fragment,h),r&&r.invalidate(),h&&(a=gi(o,In,{duration:i[2],delay:i[4],easing:oi})),l=!1},d(h){h&&V(t),te(e),h&&a&&a.end(),c=!1,d()}}}function gb(i){let t,e,n=i[1]&&sc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=sc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function vb(i,t,e){let{direction:n="right"}=t,{visible:o=!0}=t,{duration:s=0}=t,{inDelay:r=0}=t,{outDelay:a=0}=t;function l(c){pi.call(this,i,c)}return i.$$set=c=>{"direction"in c&&e(0,n=c.direction),"visible"in c&&e(1,o=c.visible),"duration"in c&&e(2,s=c.duration),"inDelay"in c&&e(3,r=c.inDelay),"outDelay"in c&&e(4,a=c.outDelay)},[n,o,s,r,a,l]}let Ab=class extends ce{constructor(t){super(),le(this,t,vb,gb,ae,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},pb)}};function bb(i,t,e=20,n=5){return new Promise((o,s)=>{let r=0;const a=setInterval(()=>{const l=i();t(l)?(clearInterval(a),o(l)):r>=n&&(clearInterval(a),s(l)),r++},e)})}function yb(i){fe(i,"svelte-1fuzm7v",".text.svelte-1fuzm7v{pointer-events:auto;box-sizing:border-box;display:inline-block;max-width:7.5rem;transition:transform 400ms ease-in-out;font-size:0.75rem;line-height:1.125rem;white-space:initial;cursor:pointer}.arrow.svelte-1fuzm7v{pointer-events:auto;display:inline-block;vertical-align:top;width:0.875rem;height:0.875rem;margin-left:0.125rem;margin-top:0.125rem}")}function rc(i){let t,e,n;return e=new Rh({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","text svelte-1fuzm7v"),T(t,"transform",i[7])},m(o,s){j(o,t,s),ee(e,t,null),i[10](t),n=!0},p(o,s){const r={};s&1&&(r.unfolded=o[0]),s&2&&(r.content=o[1]),s&32&&(r.outDelay=o[5]),e.$set(r),s&128&&T(t,"transform",o[7])},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&V(t),te(e),i[10](null)}}}function ac(i){let t,e,n;return e=new Ab({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","arrow svelte-1fuzm7v")},m(o,s){j(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s&64&&(r.direction=o[6]),s&1&&(r.visible=o[0]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&V(t),te(e)}}}function wb(i){let t,e,n,o=i[1]&&rc(i),s=i[3]<i[4]&&ac(i);return{c(){o&&o.c(),t=ne(),s&&s.c(),e=Ee()},m(r,a){o&&o.m(r,a),j(r,t,a),s&&s.m(r,a),j(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&x(o,1)):(o=rc(r),o.c(),x(o,1),o.m(t.parentNode,t)):o&&(de(),L(o,1,1,()=>{o=null}),he()),r[3]<r[4]?s?(s.p(r,a),a&24&&x(s,1)):(s=ac(r),s.c(),x(s,1),s.m(e.parentNode,e)):s&&(de(),L(s,1,1,()=>{s=null}),he())},i(r){n||(x(o),x(s),n=!0)},o(r){L(o),L(s),n=!1},d(r){o&&o.d(r),r&&V(t),s&&s.d(r),r&&V(e)}}}function Pb(i,t,e){let n,o,s,{visible:r=!1}=t,{textUnfolded:a=!1}=t,{content:l}=t,c,d=0,h=0,u=0;function m(v){Ke[v?"unshift":"push"](()=>{c=v,e(2,c)})}return i.$$set=v=>{"visible"in v&&e(0,r=v.visible),"textUnfolded"in v&&e(8,a=v.textUnfolded),"content"in v&&e(1,l=v.content)},i.$$.update=()=>{if(i.$$.dirty&7&&c&&r&&l){const{lineHeight:v}=getComputedStyle(c);e(4,u=c.offsetHeight),bb(()=>c==null?void 0:c.offsetHeight,Boolean).then(()=>{e(4,u=c.offsetHeight)}),e(3,h=Number(v.replace("px","")))}i.$$.dirty&280&&e(9,d=a?h-u:0),i.$$.dirty&512&&e(7,n=`translateY(${d}px)`),i.$$.dirty&256&&e(6,o=a?"left":"right"),i.$$.dirty&256&&e(5,s=a?450:0)},[r,l,c,h,u,s,o,n,a,d,m]}class Qh extends ce{constructor(t){super(),le(this,t,Pb,wb,ae,{visible:0,textUnfolded:8,content:1},yb)}}function Cb(i){fe(i,"svelte-nlvd3x",".content.svelte-nlvd3x{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0;overflow:hidden;box-sizing:border-box;font-size:0;pointer-events:none;white-space:nowrap;font-weight:600}")}function lc(i){var d,h;let t,e,n,o,s,r,a,l,c;return t=new Rt({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new va({props:{unfolded:i[2],length:i[3],outDelay:i[4]+40*Math.min((h=(d=i[6][0])==null?void 0:d.content.length)!=null?h:10,15),useLinearColor:!0}}),r=new Qh({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){ie(t.$$.fragment),e=ne(),ie(n.$$.fragment),o=ne(),s=z("div"),ie(r.$$.fragment),w(s,"class","content svelte-nlvd3x")},m(u,m){ee(t,u,m),j(u,e,m),ee(n,u,m),j(u,o,m),j(u,s,m),ee(r,s,null),a=!0,l||(c=[Ut(vi.call(null,s)),Ce(s,"clientWidth",i[8]),Ce(s,"click",i[7])],l=!0)},p(u,m){var b,y;const v={};m&4&&(v.visible=u[2]),m&8&&(v.left=u[3]/2+"px"),t.$set(v);const g={};m&4&&(g.unfolded=u[2]),m&8&&(g.length=u[3]),m&16&&(g.outDelay=u[4]+40*Math.min((y=(b=u[6][0])==null?void 0:b.content.length)!=null?y:10,15)),n.$set(g);const A={};m&4&&(A.visible=u[2]),m&2&&(A.textUnfolded=u[1]),m&32&&(A.content=u[5]),r.$set(A)},i(u){a||(x(t.$$.fragment,u),x(n.$$.fragment,u),x(r.$$.fragment,u),a=!0)},o(u){L(t.$$.fragment,u),L(n.$$.fragment,u),L(r.$$.fragment,u),a=!1},d(u){te(t,u),u&&V(e),te(n,u),u&&V(o),u&&V(s),te(r),l=!1,rt(c)}}}function Eb(i){let t,e,n=i[0].state&&lc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=lc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function Ib(i,t,e){let n,o,s,{tag:r}=t,a,l=!1,c=[];function d(){e(1,l=!l)}const h=u=>{e(3,a=u.detail)};return i.$$set=u=>{"tag"in u&&e(0,r=u.tag)},i.$$.update=()=>{var u,m,v;i.$$.dirty&1&&e(2,n=!!((u=r.state)!=null&&u.unfolded)),i.$$.dirty&1&&e(5,o=(v=(m=r.data.title)!=null?m:r.data.text)!=null?v:""),i.$$.dirty&4&&(n||setTimeout(()=>{e(1,l=!1)},20)),i.$$.dirty&2&&e(4,s=l?450:0)},[r,l,n,a,s,o,c,d,h]}class kb extends ce{constructor(t){super(),le(this,t,Ib,Eb,ae,{tag:0},Cb)}}function Ot(i){return typeof i=="number"?i/16+"rem":i}function xb(i){fe(i,"svelte-i9wdo4",".text.svelte-i9wdo4{display:-webkit-box;display:-ms-box;display:-moz-box;position:relative;width:-moz-max-content;width:max-content;max-width:100%;-webkit-box-orient:vertical;-ms-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@keyframes svelte-i9wdo4-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.caret.svelte-i9wdo4{position:absolute;width:0.0625rem;height:100%;background-color:#fff;animation:svelte-i9wdo4-blink 1.2s infinite}.placeholder.svelte-i9wdo4{opacity:0.5}")}function Db(i){let t;const e=i[6].default,n=hi(e,i,i[5],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),t=!0},p(o,s){n&&n.p&&(!t||s&32)&&fi(n,e,o,o[5],t?ui(e,o[5],s,null):mi(o[5]),null)},i(o){t||(x(n,o),t=!0)},o(o){L(n,o),t=!1},d(o){n&&n.d(o)}}}function Mb(i){var s,r;let t,e,n=((s=i[3])==null?void 0:s.inputting)&&cc(),o=((r=i[3])==null?void 0:r.placeholder)&&dc(i);return{c(){n&&n.c(),t=ne(),o&&o.c(),e=Ee()},m(a,l){n&&n.m(a,l),j(a,t,l),o&&o.m(a,l),j(a,e,l)},p(a,l){var c,d;(c=a[3])!=null&&c.inputting?n||(n=cc(),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),(d=a[3])!=null&&d.placeholder?o?o.p(a,l):(o=dc(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},i:K,o:K,d(a){n&&n.d(a),a&&V(t),o&&o.d(a),a&&V(e)}}}function Sb(i){let t;return{c(){t=_e(i[2])},m(e,n){j(e,t,n)},p(e,n){n&4&&Oe(t,e[2])},i:K,o:K,d(e){e&&V(t)}}}function cc(i){let t;return{c(){t=z("div"),w(t,"class","caret svelte-i9wdo4")},m(e,n){j(e,t,n)},d(e){e&&V(t)}}}function dc(i){let t,e=i[3].placeholder+"",n;return{c(){t=z("span"),n=_e(e),w(t,"class","placeholder svelte-i9wdo4")},m(o,s){j(o,t,s),O(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&Oe(n,e)},d(o){o&&V(t)}}}function Lb(i){let t,e,n,o;const s=[Sb,Mb,Db],r=[];function a(l,c){return l[2]?0:l[4]?1:2}return e=a(i),n=r[e]=s[e](i),{c(){t=z("div"),n.c(),w(t,"class","text svelte-i9wdo4"),T(t,"max-width",typeof i[1]=="number"?Ot(i[1]):i[1]),T(t,"-webkit-line-clamp",i[0])},m(l,c){j(l,t,c),r[e].m(t,null),o=!0},p(l,[c]){let d=e;e=a(l),e===d?r[e].p(l,c):(de(),L(r[d],1,1,()=>{r[d]=null}),he(),n=r[e],n?n.p(l,c):(n=r[e]=s[e](l),n.c()),x(n,1),n.m(t,null)),c&2&&T(t,"max-width",typeof l[1]=="number"?Ot(l[1]):l[1]),c&1&&T(t,"-webkit-line-clamp",l[0])},i(l){o||(x(n),o=!0)},o(l){L(n),o=!1},d(l){l&&V(t),r[e].d()}}}function Tb(i,t,e){let n,{$$slots:o={},$$scope:s}=t,{maxLine:r=1}=t,{maxWidth:a=null}=t,{text:l=null}=t,{edit:c=null}=t;return i.$$set=d=>{"maxLine"in d&&e(0,r=d.maxLine),"maxWidth"in d&&e(1,a=d.maxWidth),"text"in d&&e(2,l=d.text),"edit"in d&&e(3,c=d.edit),"$$scope"in d&&e(5,s=d.$$scope)},i.$$.update=()=>{i.$$.dirty&8&&e(4,n=(c==null?void 0:c.placeholder)||(c==null?void 0:c.inputting))},[r,a,l,c,n,s,o]}class Aa extends ce{constructor(t){super(),le(this,t,Tb,Lb,ae,{maxLine:0,maxWidth:1,text:2,edit:3},xb)}}function zb(i){fe(i,"svelte-1oxrkr1",".plane__container.svelte-1oxrkr1.svelte-1oxrkr1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1oxrkr1.svelte-1oxrkr1{transition:transform 500ms linear, opacity 200ms linear;padding:0.625rem;background-color:rgba(0, 0, 0, 0.5);border:0.03125rem solid rgba(255, 255, 255, 0.3);border-radius:0.25rem}.unfolded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1oxrkr1 .plane__wrapper.svelte-1oxrkr1{opacity:0}.plane.svelte-1oxrkr1.svelte-1oxrkr1{max-width:11.75rem}.title.svelte-1oxrkr1.svelte-1oxrkr1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem}.description.svelte-1oxrkr1.svelte-1oxrkr1{margin-top:0.25rem;white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}")}function hc(i){var h,u;let t,e,n,o,s,r,a,l,c;t=new va({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new Aa({props:{text:i[2],edit:(h=i[0].data.edit)==null?void 0:h.title}});let d=(i[0].data.description||((u=i[0].data.edit)==null?void 0:u.description))&&uc(i);return{c(){ie(t.$$.fragment),e=ne(),n=z("div"),o=z("div"),s=z("div"),r=z("div"),ie(a.$$.fragment),l=ne(),d&&d.c(),w(r,"class","title svelte-1oxrkr1"),w(s,"class","plane svelte-1oxrkr1"),w(o,"class","plane__wrapper svelte-1oxrkr1"),T(o,"transform",i[1]?"translateY(-15px)":"translateY(0)"),w(n,"class","plane__container svelte-1oxrkr1"),$(n,"unfolded",i[1]),$(n,"folded",i[3])},m(m,v){ee(t,m,v),j(m,e,v),j(m,n,v),O(n,o),O(o,s),O(s,r),ee(a,r,null),O(s,l),d&&d.m(s,null),c=!0},p(m,v){var b,y;const g={};v&2&&(g.unfolded=m[1]),t.$set(g);const A={};v&4&&(A.text=m[2]),v&1&&(A.edit=(b=m[0].data.edit)==null?void 0:b.title),a.$set(A),m[0].data.description||(y=m[0].data.edit)!=null&&y.description?d?(d.p(m,v),v&1&&x(d,1)):(d=uc(m),d.c(),x(d,1),d.m(s,null)):d&&(de(),L(d,1,1,()=>{d=null}),he()),v&2&&T(o,"transform",m[1]?"translateY(-15px)":"translateY(0)"),(!c||v&2)&&$(n,"unfolded",m[1]),(!c||v&8)&&$(n,"folded",m[3])},i(m){c||(x(t.$$.fragment,m),x(a.$$.fragment,m),x(d),c=!0)},o(m){L(t.$$.fragment,m),L(a.$$.fragment,m),L(d),c=!1},d(m){te(t,m),m&&V(e),m&&V(n),te(a),d&&d.d()}}}function uc(i){var o;let t,e,n;return e=new Aa({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","description svelte-1oxrkr1")},m(s,r){j(s,t,r),ee(e,t,null),n=!0},p(s,r){var l;const a={};r&1&&(a.text=s[0].data.description),r&1&&(a.edit=(l=s[0].data.edit)==null?void 0:l.description),e.$set(a)},i(s){n||(x(e.$$.fragment,s),n=!0)},o(s){L(e.$$.fragment,s),n=!1},d(s){s&&V(t),te(e)}}}function _b(i){let t,e,n=i[0].state&&hc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=hc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function Vb(i,t,e){let n,o,s,{tag:r}=t;return i.$$set=a=>{"tag"in a&&e(0,r=a.tag)},i.$$.update=()=>{var a,l,c;i.$$.dirty&1&&e(1,n=!!((a=r.state)!=null&&a.unfolded)),i.$$.dirty&2&&e(3,o=!n),i.$$.dirty&1&&e(2,s=(c=(l=r.data.title)!=null?l:r.data.text)!=null?c:"")},[r,n,s,o]}class jb extends ce{constructor(t){super(),le(this,t,Vb,_b,ae,{tag:0},zb)}}function Ob(i){let t,e;return t=new jb({props:{tag:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Bb(i){let t,e;return t=new kb({props:{tag:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Rb(i){let t,e,n,o;const s=[Bb,Ob],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=Ee()},m(l,c){~t&&r[t].m(l,c),j(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(de(),L(r[d],1,1,()=>{r[d]=null}),he()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(x(e),o=!0)},o(l){L(e),o=!1},d(l){~t&&r[t].d(l),l&&V(n)}}}function Qb(i,t,e){let n,{tag:o}=t;return i.$$set=s=>{"tag"in s&&e(0,o=s.tag)},i.$$.update=()=>{var s;i.$$.dirty&1&&e(1,n=(s=o.data.appearance)!=null?s:"line")},[o,n]}class Hb extends ce{constructor(t){super(),le(this,t,Qb,Rb,ae,{tag:0})}}function Gb(i){fe(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function fc(i){let t,e,n,o;return{c(){t=Te("path"),w(t,"fill","none"),w(t,"stroke","url(#"+i[4]+")"),w(t,"stroke-width","1"),w(t,"d","M0 21 L14 0.5 L105 0.5")},m(s,r){j(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&ot(()=>{o&&(n&&n.end(1),e=Dn(t,Jo,{duration:i[1],delay:i[0],easing:ah}),e.start())}),o=!0)},o(s){e&&e.invalidate(),s&&(n=gi(t,Jo,{duration:i[1],delay:i[2],easing:oi})),o=!1},d(s){s&&V(t),s&&n&&n.end()}}}function Fb(i){let t,e,n,o,s,r=i[3]&&fc(i);return{c(){t=Te("svg"),e=Te("defs"),n=Te("linearGradient"),o=Te("stop"),s=Te("stop"),r&&r.c(),w(o,"offset","25%"),w(o,"stop-color","white"),w(o,"stop-opacity","1"),w(s,"offset","100%"),w(s,"stop-color","white"),w(s,"stop-opacity","0.5"),w(n,"id",i[4]),w(n,"gradientUnits","userSpaceOnUse"),w(t,"class","line svelte-blgtit"),w(t,"viewBox","0 0 105 21")},m(a,l){j(a,t,l),O(t,e),O(e,n),O(n,o),O(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&x(r,1)):(r=fc(a),r.c(),x(r,1),r.m(t,null)):r&&(de(),L(r,1,1,()=>{r=null}),he())},i(a){x(r)},o(a){L(r)},d(a){a&&V(t),r&&r.d()}}}function Wb(i,t,e){let{inDelay:n=0}=t,{duration:o=1e3}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=dt();return i.$$set=l=>{"inDelay"in l&&e(0,n=l.inDelay),"duration"in l&&e(1,o=l.duration),"outDelay"in l&&e(2,s=l.outDelay),"unfolded"in l&&e(3,r=l.unfolded)},[n,o,s,r,a]}class Nb extends ce{constructor(t){super(),le(this,t,Wb,Fb,ae,{inDelay:0,duration:1,outDelay:2,unfolded:3},Gb)}}function Xb(i){fe(i,"svelte-1mgyhhn",`:root{--sc-dot-size:6px;--sc-active-dot-size:8px;--sc-dot-size-animation-time:250ms}.sc-carousel-dot__dot.svelte-1mgyhhn{background-color:var(--sc-color-rgb-light);border-radius:50%;display:inline-block;opacity:0.5;transition:opacity 100ms ease,\r
580
580
  height var(--sc-dot-size-animation-time) ease,\r
581
- width var(--sc-dot-size-animation-time) ease;cursor:pointer;-webkit-tap-highlight-color:transparent;height:var(--sc-dot-size);width:var(--sc-dot-size)}.sc-carousel-dot__dot.svelte-1mgyhhn:hover{opacity:0.9}.sc-carousel-dot__dot_active.svelte-1mgyhhn{opacity:0.7;height:var(--sc-active-dot-size);width:var(--sc-active-dot-size)}`)}function Yb(i){let t,e,n;return{c(){t=z("button"),w(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),$(t,"sc-carousel-dot__dot_active",i[0])},m(o,s){V(o,t,s),e||(n=Ce(t,"click",i[1]),e=!0)},p(o,[s]){s&1&&$(t,"sc-carousel-dot__dot_active",o[0])},i:K,o:K,d(o){o&&_(t),e=!1,n()}}}function Ub(i,t,e){let{active:n=!1}=t;function o(s){pi.call(this,i,s)}return i.$$set=s=>{"active"in s&&e(0,n=s.active)},[n,o]}class qb extends ce{constructor(t){super(),le(this,t,Ub,Yb,ae,{active:0},Xb)}}function Jb(i){fe(i,"svelte-670fde",".sc-carousel-dots__container.svelte-670fde{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 30px}.sc-carousel-dots__dot-container.svelte-670fde{height:calc(var(--sc-dot-size) + 14px);width:calc(var(--sc-dot-size) + 10px);display:flex;align-items:center;justify-content:center}")}function mc(i,t,e){const n=i.slice();return n[5]=t[e],n[7]=e,n}function pc(i,t){let e,n,o,s;function r(){return t[3](t[7])}return n=new qb({props:{active:t[1]===t[7]}}),n.$on("click",r),{key:i,first:null,c(){e=z("div"),ie(n.$$.fragment),o=ne(),w(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){V(a,e,l),ee(n,e,null),O(e,o),s=!0},p(a,l){t=a;const c={};l&3&&(c.active=t[1]===t[7]),n.$set(c)},i(a){s||(x(n.$$.fragment,a),s=!0)},o(a){L(n.$$.fragment,a),s=!1},d(a){a&&_(e),te(n)}}}function Zb(i){let t,e=[],n=new Map,o,s=Array(i[0]);const r=a=>a[7];for(let a=0;a<s.length;a+=1){let l=mc(i,s,a),c=r(l);n.set(c,e[a]=pc(c,l))}return{c(){t=z("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","sc-carousel-dots__container svelte-670fde")},m(a,l){V(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);o=!0},p(a,[l]){l&7&&(s=Array(a[0]),de(),e=St(e,l,r,1,a,s,n,t,un,pc,null,mc),he())},i(a){if(!o){for(let l=0;l<s.length;l+=1)x(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)L(e[l]);o=!1},d(a){a&&_(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Kb(i,t,e){const n=cs();let{pagesCount:o=1}=t,{currentPageIndex:s=0}=t;function r(l){n("pageChange",l)}const a=l=>r(l);return i.$$set=l=>{"pagesCount"in l&&e(0,o=l.pagesCount),"currentPageIndex"in l&&e(1,s=l.currentPageIndex)},[o,s,r,a]}class $b extends ce{constructor(t){super(),le(this,t,Kb,Zb,ae,{pagesCount:0,currentPageIndex:1},Jb)}}const ai="prev",cn="next";function e1(i){fe(i,"svelte-1bftafx",":root{--sc-arrow-size:2px}.sc-carousel-arrow__circle.svelte-1bftafx{width:20px;height:20px;border-radius:50%;background-color:var(--sc-color-rgb-light-50p);display:flex;align-items:center;justify-content:center;transition:opacity 100ms ease;cursor:pointer;-webkit-tap-highlight-color:transparent}.sc-carousel-arrow__circle.svelte-1bftafx:hover{opacity:0.9}.sc-carousel-arrow__arrow.svelte-1bftafx{border:solid var(--sc-color-hex-dark);border-width:0 var(--sc-arrow-size) var(--sc-arrow-size) 0;padding:var(--sc-arrow-size);position:relative}.sc-carousel-arrow__arrow-next.svelte-1bftafx{transform:rotate(-45deg);left:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__arrow-prev.svelte-1bftafx{transform:rotate(135deg);right:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__circle_disabled.svelte-1bftafx,.sc-carousel-arrow__circle_disabled.svelte-1bftafx:hover{opacity:0.5}")}function t1(i){let t,e,n,o;return{c(){t=z("button"),e=z("i"),w(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),$(e,"sc-carousel-arrow__arrow-next",i[0]===cn),$(e,"sc-carousel-arrow__arrow-prev",i[0]===ai),w(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),$(t,"sc-carousel-arrow__circle_disabled",i[1])},m(s,r){V(s,t,r),O(t,e),n||(o=Ce(t,"click",i[2]),n=!0)},p(s,[r]){r&1&&$(e,"sc-carousel-arrow__arrow-next",s[0]===cn),r&1&&$(e,"sc-carousel-arrow__arrow-prev",s[0]===ai),r&2&&$(t,"sc-carousel-arrow__circle_disabled",s[1])},i:K,o:K,d(s){s&&_(t),n=!1,o()}}}function n1(i,t,e){let{direction:n=cn}=t,{disabled:o=!1}=t;function s(r){pi.call(this,i,r)}return i.$$set=r=>{"direction"in r&&e(0,n=r.direction),"disabled"in r&&e(1,o=r.disabled)},[n,o,s]}class Hh extends ce{constructor(t){super(),le(this,t,n1,t1,ae,{direction:0,disabled:1},e1)}}function i1(i){fe(i,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function o1(i){let t;return{c(){t=z("div"),w(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),T(t,"width",i[0]+"%")},m(e,n){V(e,t,n)},p(e,[n]){n&1&&T(t,"width",e[0]+"%")},i:K,o:K,d(e){e&&_(t)}}}const gc=100;function s1(i,t,e){let n,{value:o=0}=t;return i.$$set=s=>{"value"in s&&e(1,o=s.value)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=Math.min(Math.max(o*gc,0),gc))},[n,o]}class r1 extends ce{constructor(t){super(),le(this,t,s1,o1,ae,{value:1},i1)}}function a1(i,t){i.addEventListener("mousedown",t),i.addEventListener("touchstart",t,{passive:!0})}function l1(i,t){i.removeEventListener("mousedown",t),i.removeEventListener("touchstart",t)}function c1(i,t){i.addEventListener("mouseup",t),i.addEventListener("touchend",t)}function vc(i,t){i.removeEventListener("mouseup",t),i.removeEventListener("touchend",t)}function d1(i,t){i.addEventListener("mousemove",t),i.addEventListener("touchmove",t)}function Ac(i,t){i.removeEventListener("mousemove",t),i.removeEventListener("touchmove",t)}function ba(i){return function(t,e){i.dispatchEvent(new CustomEvent(t,{detail:e}))}}const h1=110,u1=9,f1=111,m1=20;function Cr(i){if("TouchEvent"in window&&i instanceof TouchEvent){const t=i.touches[0];return{x:t?t.clientX:0,y:t?t.clientY:0}}return{x:i.clientX,y:i.clientY}}function p1(i,{thresholdProvider:t}){const e=ba(i);let n,o,s=0,r,a=!1;function l(){return Date.now()-r>=f1&&Math.abs(s)>=m1}function c(u){r=Date.now(),s=0,a=!0;const m=Cr(u);n=m.x,o=m.y,e("swipeStart",{x:n,y:o}),d1(window,d),c1(window,h)}function d(u){if(!a)return;const m=Cr(u),v=m.x-n,g=m.y-o;n=m.x,o=m.y,e("swipeMove",{x:n,y:o,dx:v,dy:g}),v!==0&&Math.sign(v)!==Math.sign(s)&&(s=0),s+=v,Math.abs(s)>t()&&(e("swipeThresholdReached",{direction:s>0?ai:cn}),vc(window,h),Ac(window,d))}function h(u){if(vc(window,h),Ac(window,d),a=!1,!l()){e("swipeFailed");return}const m=Cr(u);e("swipeEnd",{x:m.x,y:m.y})}return a1(i,c),{destroy(){l1(i,c)}}}function g1(i,t){i.addEventListener("mouseenter",t)}function v1(i,t){i.removeEventListener("mouseenter",t)}function A1(i,t){i.addEventListener("mouseleave",t)}function bc(i,t){i.removeEventListener("mouseleave",t)}function b1(i){const t=ba(i);function e(){A1(i,n),t("hovered",{value:!0})}function n(){t("hovered",{value:!1}),bc(i,n)}return g1(i,e),{destroy(){v1(i,e),bc(i,n)}}}const y1=(i,t)=>{const e=t.x-i.x,n=t.y-i.y;return Math.sqrt(e*e+n*n)};function $n(i,t,e){return Math.max(i,Math.min(t,e))}function w1(i,t){i.addEventListener("touchstart",t,{passive:!0})}function P1(i,t){i.removeEventListener("touchstart",t)}function C1(i,t){i.addEventListener("touchend",t)}function yc(i,t){i.removeEventListener("touchend",t)}function E1(i){const t=ba(i);let e=0,n={x:0,y:0};function o({tapEndedAt:a,tapEndedPos:l}){const c=a-e,d=y1(n,l);return c<=h1&&d<=u1}function s(a){e=Date.now();const l=a.touches[0];n={x:l.clientX,y:l.clientY},C1(i,r)}function r(a){yc(i,r);const l=a.changedTouches[0];o({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return w1(i,s),{destroy(){P1(i,s),yc(i,r)}}}function I1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:o}){return i===t-e?0:i===0?Gh({particlesCountWithoutClones:t-n,particlesToScroll:o})-1:Math.floor((i-e)/o)}function k1({currentParticleIndex:i,particlesToScroll:t}){return Math.ceil(i/t)}function x1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,infinite:o,particlesToScroll:s}){return o?I1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:s}):k1({currentParticleIndex:i,particlesToScroll:s})}function Gh({particlesCountWithoutClones:i,particlesToScroll:t}){return Math.ceil(i/t)}function D1({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e}){const n=Fh({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e});return Math.ceil(i/t)-n}function M1({infinite:i,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n}){return i?Gh({particlesCountWithoutClones:t,particlesToScroll:e}):D1({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n})}function S1({pageIndex:i,clonesCountHead:t,clonesCountTail:e,particlesToScroll:n,particlesCount:o}){return $n(0,Math.min(t+i*n,o-e),o-1)}function L1({pageIndex:i,particlesToScroll:t,particlesCount:e,particlesToShow:n}){return $n(0,Math.min(i*t,e-n),e-1)}function Er({infinite:i,pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s,particlesToShow:r}){return i?S1({pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s}):L1({pageIndex:t,particlesToScroll:o,particlesCount:s,particlesToShow:r})}function T1({particlesContainerChildren:i,particleWidth:t}){for(let e=0;e<i.length;e++)i[e].style.minWidth=`${t}px`,i[e].style.maxWidth=`${t}px`}function Fh({particlesToScroll:i,particlesToShow:t,particlesCountWithoutClones:e}){const n=i-t;let o=t;for(;;){const s=e-o-n;if(s<t)return Math.max(s,0);o+=t+n}}function z1(i){return new ResizeObserver(t=>{i({width:t[0].contentRect.width})})}function j1({clonesCountHead:i,clonesCountTail:t,particlesContainerChildren:e}){const n=[];for(let r=0;r<t;r++)n.push(e[r].cloneNode(!0));const o=[],s=e.length;for(let r=s-1;r>s-1-i;r--)o.push(e[r].cloneNode(!0));return{clonesToAppend:n,clonesToPrepend:o}}function _1({particlesContainer:i,clonesToAppend:t,clonesToPrepend:e}){for(let n=0;n<t.length;n++)i.append(t[n]);for(let n=0;n<e.length;n++)i.prepend(e[n])}function V1({infinite:i,particlesToShow:t,partialPageSize:e}){const n=i?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return ye(F({},n),{total:n.head+n.tail})}const Wi=(i,t,e)=>{if(i&&i.hasOwnProperty(t))return i[t];if(e===void 0)throw new Error(`Required arg "${t}" was not provided`);return e},Jr=i=>t=>{i[t]&&i[t]()};var O1="Expected a function",Wh="__lodash_hash_undefined__",Nh=1/0,B1="[object Function]",R1="[object GeneratorFunction]",Q1="[object Symbol]",H1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G1=/^\w*$/,F1=/^\./,W1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,N1=/[\\^$.*+?()[\]{}|]/g,X1=/\\(\\)?/g,Y1=/^\[object .+?Constructor\]$/,U1=typeof yt=="object"&&yt&&yt.Object===Object&&yt,q1=typeof self=="object"&&self&&self.Object===Object&&self,ya=U1||q1||Function("return this")();function J1(i,t){return i==null?void 0:i[t]}function Z1(i){var t=!1;if(i!=null&&typeof i.toString!="function")try{t=!!(i+"")}catch(e){}return t}var K1=Array.prototype,$1=Function.prototype,Xh=Object.prototype,Ir=ya["__core-js_shared__"],wc=function(){var i=/[^.]+$/.exec(Ir&&Ir.keys&&Ir.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Yh=$1.toString,wa=Xh.hasOwnProperty,Uh=Xh.toString,ey=RegExp("^"+Yh.call(wa).replace(N1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pc=ya.Symbol,ty=K1.splice,ny=qh(ya,"Map"),Zi=qh(Object,"create"),Cc=Pc?Pc.prototype:void 0,Ec=Cc?Cc.toString:void 0;function kn(i){var t=-1,e=i?i.length:0;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}function iy(){this.__data__=Zi?Zi(null):{}}function oy(i){return this.has(i)&&delete this.__data__[i]}function sy(i){var t=this.__data__;if(Zi){var e=t[i];return e===Wh?void 0:e}return wa.call(t,i)?t[i]:void 0}function ry(i){var t=this.__data__;return Zi?t[i]!==void 0:wa.call(t,i)}function ay(i,t){var e=this.__data__;return e[i]=Zi&&t===void 0?Wh:t,this}kn.prototype.clear=iy;kn.prototype.delete=oy;kn.prototype.get=sy;kn.prototype.has=ry;kn.prototype.set=ay;function Ai(i){var t=-1,e=i?i.length:0;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}function ly(){this.__data__=[]}function cy(i){var t=this.__data__,e=As(t,i);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():ty.call(t,e,1),!0}function dy(i){var t=this.__data__,e=As(t,i);return e<0?void 0:t[e][1]}function hy(i){return As(this.__data__,i)>-1}function uy(i,t){var e=this.__data__,n=As(e,i);return n<0?e.push([i,t]):e[n][1]=t,this}Ai.prototype.clear=ly;Ai.prototype.delete=cy;Ai.prototype.get=dy;Ai.prototype.has=hy;Ai.prototype.set=uy;function Ln(i){var t=-1,e=i?i.length:0;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}function fy(){this.__data__={hash:new kn,map:new(ny||Ai),string:new kn}}function my(i){return bs(this,i).delete(i)}function py(i){return bs(this,i).get(i)}function gy(i){return bs(this,i).has(i)}function vy(i,t){return bs(this,i).set(i,t),this}Ln.prototype.clear=fy;Ln.prototype.delete=my;Ln.prototype.get=py;Ln.prototype.has=gy;Ln.prototype.set=vy;function As(i,t){for(var e=i.length;e--;)if(Dy(i[e][0],t))return e;return-1}function Ay(i,t){t=Py(t,i)?[t]:wy(t);for(var e=0,n=t.length;i!=null&&e<n;)i=i[ky(t[e++])];return e&&e==n?i:void 0}function by(i){if(!Zh(i)||Ey(i))return!1;var t=My(i)||Z1(i)?ey:Y1;return t.test(xy(i))}function yy(i){if(typeof i=="string")return i;if(Ca(i))return Ec?Ec.call(i):"";var t=i+"";return t=="0"&&1/i==-Nh?"-0":t}function wy(i){return Jh(i)?i:Iy(i)}function bs(i,t){var e=i.__data__;return Cy(t)?e[typeof t=="string"?"string":"hash"]:e.map}function qh(i,t){var e=J1(i,t);return by(e)?e:void 0}function Py(i,t){if(Jh(i))return!1;var e=typeof i;return e=="number"||e=="symbol"||e=="boolean"||i==null||Ca(i)?!0:G1.test(i)||!H1.test(i)||t!=null&&i in Object(t)}function Cy(i){var t=typeof i;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?i!=="__proto__":i===null}function Ey(i){return!!wc&&wc in i}var Iy=Pa(function(i){i=Ly(i);var t=[];return F1.test(i)&&t.push(""),i.replace(W1,function(e,n,o,s){t.push(o?s.replace(X1,"$1"):n||e)}),t});function ky(i){if(typeof i=="string"||Ca(i))return i;var t=i+"";return t=="0"&&1/i==-Nh?"-0":t}function xy(i){if(i!=null){try{return Yh.call(i)}catch(t){}try{return i+""}catch(t){}}return""}function Pa(i,t){if(typeof i!="function"||t&&typeof t!="function")throw new TypeError(O1);var e=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=e.cache;if(s.has(o))return s.get(o);var r=i.apply(this,n);return e.cache=s.set(o,r),r};return e.cache=new(Pa.Cache||Ln),e}Pa.Cache=Ln;function Dy(i,t){return i===t||i!==i&&t!==t}var Jh=Array.isArray;function My(i){var t=Zh(i)?Uh.call(i):"";return t==B1||t==R1}function Zh(i){var t=typeof i;return!!i&&(t=="object"||t=="function")}function Sy(i){return!!i&&typeof i=="object"}function Ca(i){return typeof i=="symbol"||Sy(i)&&Uh.call(i)==Q1}function Ly(i){return i==null?"":yy(i)}function Ty(i,t,e){var n=i==null?void 0:Ay(i,t);return n===void 0?e:n}var To=Ty,es={},zy={get exports(){return es},set exports(i){es=i}};(function(i,t){var e=200,n="__lodash_hash_undefined__",o=9007199254740991,s="[object Arguments]",r="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",h="[object GeneratorFunction]",u="[object Map]",m="[object Number]",v="[object Object]",g="[object Promise]",A="[object RegExp]",b="[object Set]",y="[object String]",E="[object Symbol]",k="[object WeakMap]",S="[object ArrayBuffer]",C="[object DataView]",j="[object Float32Array]",M="[object Float64Array]",X="[object Int8Array]",J="[object Int16Array]",H="[object Int32Array]",Q="[object Uint8Array]",G="[object Uint8ClampedArray]",B="[object Uint16Array]",W="[object Uint32Array]",q=/[\\^$.*+?()[\]{}|]/g,U=/\w*$/,Z=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,oe={};oe[s]=oe[r]=oe[S]=oe[C]=oe[a]=oe[l]=oe[j]=oe[M]=oe[X]=oe[J]=oe[H]=oe[u]=oe[m]=oe[v]=oe[A]=oe[b]=oe[y]=oe[E]=oe[Q]=oe[G]=oe[B]=oe[W]=!0,oe[c]=oe[d]=oe[k]=!1;var Ae=typeof yt=="object"&&yt&&yt.Object===Object&&yt,we=typeof self=="object"&&self&&self.Object===Object&&self,ge=Ae||we||Function("return this")(),_e=t&&!t.nodeType&&t,ve=_e&&!0&&i&&!i.nodeType&&i,Ge=ve&&ve.exports===_e;function ue(p,P){return p.set(P[0],P[1]),p}function be(p,P){return p.add(P),p}function Se(p,P){for(var D=-1,N=p?p.length:0;++D<N&&P(p[D],D,p)!==!1;);return p}function me(p,P){for(var D=-1,N=P.length,Pe=p.length;++D<N;)p[Pe+D]=P[D];return p}function Ue(p,P,D,N){var Pe=-1,pe=p?p.length:0;for(N&&pe&&(D=p[++Pe]);++Pe<pe;)D=P(D,p[Pe],Pe,p);return D}function at(p,P){for(var D=-1,N=Array(p);++D<p;)N[D]=P(D);return N}function ke(p,P){return p==null?void 0:p[P]}function $e(p){var P=!1;if(p!=null&&typeof p.toString!="function")try{P=!!(p+"")}catch(D){}return P}function se(p){var P=-1,D=Array(p.size);return p.forEach(function(N,Pe){D[++P]=[Pe,N]}),D}function Ie(p,P){return function(D){return p(P(D))}}function Qe(p){var P=-1,D=Array(p.size);return p.forEach(function(N){D[++P]=N}),D}var ht=Array.prototype,Qt=Function.prototype,gt=Object.prototype,vt=ge["__core-js_shared__"],Ve=function(){var p=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),Re=Qt.toString,Xe=gt.hasOwnProperty,Pt=gt.toString,bi=RegExp("^"+Re.call(Xe).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=Ge?ge.Buffer:void 0,Jt=ge.Symbol,fn=ge.Uint8Array,ut=Ie(Object.getPrototypeOf,Object),Tn=Object.create,zn=gt.propertyIsEnumerable,Cs=ht.splice,yi=Object.getOwnPropertySymbols,jn=Lt?Lt.isBuffer:void 0,io=Ie(Object.keys,Object),_n=Et(ge,"DataView"),mn=Et(ge,"Map"),Ct=Et(ge,"Promise"),Vn=Et(ge,"Set"),wi=Et(ge,"WeakMap"),pn=Et(Object,"create"),Pi=lt(_n),gn=lt(mn),Ci=lt(Ct),Ei=lt(Vn),Ii=lt(wi),Zt=Jt?Jt.prototype:void 0,oo=Zt?Zt.valueOf:void 0;function Ht(p){var P=-1,D=p?p.length:0;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function Es(){this.__data__=pn?pn(null):{}}function Is(p){return this.has(p)&&delete this.__data__[p]}function ks(p){var P=this.__data__;if(pn){var D=P[p];return D===n?void 0:D}return Xe.call(P,p)?P[p]:void 0}function so(p){var P=this.__data__;return pn?P[p]!==void 0:Xe.call(P,p)}function ki(p,P){var D=this.__data__;return D[p]=pn&&P===void 0?n:P,this}Ht.prototype.clear=Es,Ht.prototype.delete=Is,Ht.prototype.get=ks,Ht.prototype.has=so,Ht.prototype.set=ki;function qe(p){var P=-1,D=p?p.length:0;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function xs(){this.__data__=[]}function Ds(p){var P=this.__data__,D=Bn(P,p);if(D<0)return!1;var N=P.length-1;return D==N?P.pop():Cs.call(P,D,1),!0}function Ms(p){var P=this.__data__,D=Bn(P,p);return D<0?void 0:P[D][1]}function Ss(p){return Bn(this.__data__,p)>-1}function Ls(p,P){var D=this.__data__,N=Bn(D,p);return N<0?D.push([p,P]):D[N][1]=P,this}qe.prototype.clear=xs,qe.prototype.delete=Ds,qe.prototype.get=Ms,qe.prototype.has=Ss,qe.prototype.set=Ls;function et(p){var P=-1,D=p?p.length:0;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function Ts(){this.__data__={hash:new Ht,map:new(mn||qe),string:new Ht}}function zs(p){return An(this,p).delete(p)}function js(p){return An(this,p).get(p)}function _s(p){return An(this,p).has(p)}function Vs(p,P){return An(this,p).set(p,P),this}et.prototype.clear=Ts,et.prototype.delete=zs,et.prototype.get=js,et.prototype.has=_s,et.prototype.set=Vs;function ft(p){this.__data__=new qe(p)}function Os(){this.__data__=new qe}function Bs(p){return this.__data__.delete(p)}function Rs(p){return this.__data__.get(p)}function Qs(p){return this.__data__.has(p)}function Hs(p,P){var D=this.__data__;if(D instanceof qe){var N=D.__data__;if(!mn||N.length<e-1)return N.push([p,P]),this;D=this.__data__=new et(N)}return D.set(p,P),this}ft.prototype.clear=Os,ft.prototype.delete=Bs,ft.prototype.get=Rs,ft.prototype.has=Qs,ft.prototype.set=Hs;function On(p,P){var D=Si(p)||Qn(p)?at(p.length,String):[],N=D.length,Pe=!!N;for(var pe in p)(P||Xe.call(p,pe))&&!(Pe&&(pe=="length"||tr(pe,N)))&&D.push(pe);return D}function ro(p,P,D){var N=p[P];(!(Xe.call(p,P)&&uo(N,D))||D===void 0&&!(P in p))&&(p[P]=D)}function Bn(p,P){for(var D=p.length;D--;)if(uo(p[D][0],P))return D;return-1}function Tt(p,P){return p&&Mi(P,Ti(P),p)}function xi(p,P,D,N,Pe,pe,xe){var De;if(N&&(De=pe?N(p,Pe,pe,xe):N(p)),De!==void 0)return De;if(!jt(p))return p;var Fe=Si(p);if(Fe){if(De=$s(p),!P)return Js(p,De)}else{var Le=Ft(p),tt=Le==d||Le==h;if(fo(p))return Rn(p,P);if(Le==v||Le==s||tt&&!pe){if($e(p))return pe?p:{};if(De=zt(tt?{}:p),!P)return Zs(p,Tt(De,p))}else{if(!oe[Le])return pe?p:{};De=er(p,Le,xi,P)}}xe||(xe=new ft);var mt=xe.get(p);if(mt)return mt;if(xe.set(p,De),!Fe)var Ne=D?Ks(p):Ti(p);return Se(Ne||p,function(nt,Je){Ne&&(Je=nt,nt=p[Je]),ro(De,Je,xi(nt,P,D,N,Je,p,xe))}),De}function Gs(p){return jt(p)?Tn(p):{}}function Fs(p,P,D){var N=P(p);return Si(p)?N:me(N,D(p))}function Ws(p){return Pt.call(p)}function Ns(p){if(!jt(p)||ir(p))return!1;var P=Li(p)||$e(p)?bi:Z;return P.test(lt(p))}function Xs(p){if(!co(p))return io(p);var P=[];for(var D in Object(p))Xe.call(p,D)&&D!="constructor"&&P.push(D);return P}function Rn(p,P){if(P)return p.slice();var D=new p.constructor(p.length);return p.copy(D),D}function Di(p){var P=new p.constructor(p.byteLength);return new fn(P).set(new fn(p)),P}function vn(p,P){var D=P?Di(p.buffer):p.buffer;return new p.constructor(D,p.byteOffset,p.byteLength)}function ao(p,P,D){var N=P?D(se(p),!0):se(p);return Ue(N,ue,new p.constructor)}function lo(p){var P=new p.constructor(p.source,U.exec(p));return P.lastIndex=p.lastIndex,P}function Ys(p,P,D){var N=P?D(Qe(p),!0):Qe(p);return Ue(N,be,new p.constructor)}function Us(p){return oo?Object(oo.call(p)):{}}function qs(p,P){var D=P?Di(p.buffer):p.buffer;return new p.constructor(D,p.byteOffset,p.length)}function Js(p,P){var D=-1,N=p.length;for(P||(P=Array(N));++D<N;)P[D]=p[D];return P}function Mi(p,P,D,N){D||(D={});for(var Pe=-1,pe=P.length;++Pe<pe;){var xe=P[Pe],De=N?N(D[xe],p[xe],xe,D,p):void 0;ro(D,xe,De===void 0?p[xe]:De)}return D}function Zs(p,P){return Mi(p,Gt(p),P)}function Ks(p){return Fs(p,Ti,Gt)}function An(p,P){var D=p.__data__;return nr(P)?D[typeof P=="string"?"string":"hash"]:D.map}function Et(p,P){var D=ke(p,P);return Ns(D)?D:void 0}var Gt=yi?Ie(yi,Object):sr,Ft=Ws;(_n&&Ft(new _n(new ArrayBuffer(1)))!=C||mn&&Ft(new mn)!=u||Ct&&Ft(Ct.resolve())!=g||Vn&&Ft(new Vn)!=b||wi&&Ft(new wi)!=k)&&(Ft=function(p){var P=Pt.call(p),D=P==v?p.constructor:void 0,N=D?lt(D):void 0;if(N)switch(N){case Pi:return C;case gn:return u;case Ci:return g;case Ei:return b;case Ii:return k}return P});function $s(p){var P=p.length,D=p.constructor(P);return P&&typeof p[0]=="string"&&Xe.call(p,"index")&&(D.index=p.index,D.input=p.input),D}function zt(p){return typeof p.constructor=="function"&&!co(p)?Gs(ut(p)):{}}function er(p,P,D,N){var Pe=p.constructor;switch(P){case S:return Di(p);case a:case l:return new Pe(+p);case C:return vn(p,N);case j:case M:case X:case J:case H:case Q:case G:case B:case W:return qs(p,N);case u:return ao(p,N,D);case m:case y:return new Pe(p);case A:return lo(p);case b:return Ys(p,N,D);case E:return Us(p)}}function tr(p,P){return P=P==null?o:P,!!P&&(typeof p=="number"||re.test(p))&&p>-1&&p%1==0&&p<P}function nr(p){var P=typeof p;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?p!=="__proto__":p===null}function ir(p){return!!Ve&&Ve in p}function co(p){var P=p&&p.constructor,D=typeof P=="function"&&P.prototype||gt;return p===D}function lt(p){if(p!=null){try{return Re.call(p)}catch(P){}try{return p+""}catch(P){}}return""}function ho(p){return xi(p,!0,!0)}function uo(p,P){return p===P||p!==p&&P!==P}function Qn(p){return or(p)&&Xe.call(p,"callee")&&(!zn.call(p,"callee")||Pt.call(p)==s)}var Si=Array.isArray;function Hn(p){return p!=null&&mo(p.length)&&!Li(p)}function or(p){return po(p)&&Hn(p)}var fo=jn||rr;function Li(p){var P=jt(p)?Pt.call(p):"";return P==d||P==h}function mo(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=o}function jt(p){var P=typeof p;return!!p&&(P=="object"||P=="function")}function po(p){return!!p&&typeof p=="object"}function Ti(p){return Hn(p)?On(p):Xs(p)}function sr(){return[]}function rr(){return!1}i.exports=ho})(zy,es);const jy=es;var ts={},_y={get exports(){return ts},set exports(i){ts=i}};(function(i,t){var e=200,n="__lodash_hash_undefined__",o=1,s=2,r=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",d="[object Boolean]",h="[object Date]",u="[object Error]",m="[object Function]",v="[object GeneratorFunction]",g="[object Map]",A="[object Number]",b="[object Null]",y="[object Object]",E="[object Promise]",k="[object Proxy]",S="[object RegExp]",C="[object Set]",j="[object String]",M="[object Symbol]",X="[object Undefined]",J="[object WeakMap]",H="[object ArrayBuffer]",Q="[object DataView]",G="[object Float32Array]",B="[object Float64Array]",W="[object Int8Array]",q="[object Int16Array]",U="[object Int32Array]",Z="[object Uint8Array]",re="[object Uint8ClampedArray]",oe="[object Uint16Array]",Ae="[object Uint32Array]",we=/[\\^$.*+?()[\]{}|]/g,ge=/^\[object .+?Constructor\]$/,_e=/^(?:0|[1-9]\d*)$/,ve={};ve[G]=ve[B]=ve[W]=ve[q]=ve[U]=ve[Z]=ve[re]=ve[oe]=ve[Ae]=!0,ve[a]=ve[l]=ve[H]=ve[d]=ve[Q]=ve[h]=ve[u]=ve[m]=ve[g]=ve[A]=ve[y]=ve[S]=ve[C]=ve[j]=ve[J]=!1;var Ge=typeof yt=="object"&&yt&&yt.Object===Object&&yt,ue=typeof self=="object"&&self&&self.Object===Object&&self,be=Ge||ue||Function("return this")(),Se=t&&!t.nodeType&&t,me=Se&&!0&&i&&!i.nodeType&&i,Ue=me&&me.exports===Se,at=Ue&&Ge.process,ke=function(){try{return at&&at.binding&&at.binding("util")}catch(p){}}(),$e=ke&&ke.isTypedArray;function se(p,P){for(var D=-1,N=p==null?0:p.length,Pe=0,pe=[];++D<N;){var xe=p[D];P(xe,D,p)&&(pe[Pe++]=xe)}return pe}function Ie(p,P){for(var D=-1,N=P.length,Pe=p.length;++D<N;)p[Pe+D]=P[D];return p}function Qe(p,P){for(var D=-1,N=p==null?0:p.length;++D<N;)if(P(p[D],D,p))return!0;return!1}function ht(p,P){for(var D=-1,N=Array(p);++D<p;)N[D]=P(D);return N}function Qt(p){return function(P){return p(P)}}function gt(p,P){return p.has(P)}function vt(p,P){return p==null?void 0:p[P]}function Ve(p){var P=-1,D=Array(p.size);return p.forEach(function(N,Pe){D[++P]=[Pe,N]}),D}function Re(p,P){return function(D){return p(P(D))}}function Xe(p){var P=-1,D=Array(p.size);return p.forEach(function(N){D[++P]=N}),D}var Pt=Array.prototype,bi=Function.prototype,Lt=Object.prototype,Jt=be["__core-js_shared__"],fn=bi.toString,ut=Lt.hasOwnProperty,Tn=function(){var p=/[^.]+$/.exec(Jt&&Jt.keys&&Jt.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),zn=Lt.toString,Cs=RegExp("^"+fn.call(ut).replace(we,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yi=Ue?be.Buffer:void 0,jn=be.Symbol,io=be.Uint8Array,_n=Lt.propertyIsEnumerable,mn=Pt.splice,Ct=jn?jn.toStringTag:void 0,Vn=Object.getOwnPropertySymbols,wi=yi?yi.isBuffer:void 0,pn=Re(Object.keys,Object),Pi=Gt(be,"DataView"),gn=Gt(be,"Map"),Ci=Gt(be,"Promise"),Ei=Gt(be,"Set"),Ii=Gt(be,"WeakMap"),Zt=Gt(Object,"create"),oo=lt(Pi),Ht=lt(gn),Es=lt(Ci),Is=lt(Ei),ks=lt(Ii),so=jn?jn.prototype:void 0,ki=so?so.valueOf:void 0;function qe(p){var P=-1,D=p==null?0:p.length;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function xs(){this.__data__=Zt?Zt(null):{},this.size=0}function Ds(p){var P=this.has(p)&&delete this.__data__[p];return this.size-=P?1:0,P}function Ms(p){var P=this.__data__;if(Zt){var D=P[p];return D===n?void 0:D}return ut.call(P,p)?P[p]:void 0}function Ss(p){var P=this.__data__;return Zt?P[p]!==void 0:ut.call(P,p)}function Ls(p,P){var D=this.__data__;return this.size+=this.has(p)?0:1,D[p]=Zt&&P===void 0?n:P,this}qe.prototype.clear=xs,qe.prototype.delete=Ds,qe.prototype.get=Ms,qe.prototype.has=Ss,qe.prototype.set=Ls;function et(p){var P=-1,D=p==null?0:p.length;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function Ts(){this.__data__=[],this.size=0}function zs(p){var P=this.__data__,D=Rn(P,p);if(D<0)return!1;var N=P.length-1;return D==N?P.pop():mn.call(P,D,1),--this.size,!0}function js(p){var P=this.__data__,D=Rn(P,p);return D<0?void 0:P[D][1]}function _s(p){return Rn(this.__data__,p)>-1}function Vs(p,P){var D=this.__data__,N=Rn(D,p);return N<0?(++this.size,D.push([p,P])):D[N][1]=P,this}et.prototype.clear=Ts,et.prototype.delete=zs,et.prototype.get=js,et.prototype.has=_s,et.prototype.set=Vs;function ft(p){var P=-1,D=p==null?0:p.length;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function Os(){this.size=0,this.__data__={hash:new qe,map:new(gn||et),string:new qe}}function Bs(p){var P=Et(this,p).delete(p);return this.size-=P?1:0,P}function Rs(p){return Et(this,p).get(p)}function Qs(p){return Et(this,p).has(p)}function Hs(p,P){var D=Et(this,p),N=D.size;return D.set(p,P),this.size+=D.size==N?0:1,this}ft.prototype.clear=Os,ft.prototype.delete=Bs,ft.prototype.get=Rs,ft.prototype.has=Qs,ft.prototype.set=Hs;function On(p){var P=-1,D=p==null?0:p.length;for(this.__data__=new ft;++P<D;)this.add(p[P])}function ro(p){return this.__data__.set(p,n),this}function Bn(p){return this.__data__.has(p)}On.prototype.add=On.prototype.push=ro,On.prototype.has=Bn;function Tt(p){var P=this.__data__=new et(p);this.size=P.size}function xi(){this.__data__=new et,this.size=0}function Gs(p){var P=this.__data__,D=P.delete(p);return this.size=P.size,D}function Fs(p){return this.__data__.get(p)}function Ws(p){return this.__data__.has(p)}function Ns(p,P){var D=this.__data__;if(D instanceof et){var N=D.__data__;if(!gn||N.length<e-1)return N.push([p,P]),this.size=++D.size,this;D=this.__data__=new ft(N)}return D.set(p,P),this.size=D.size,this}Tt.prototype.clear=xi,Tt.prototype.delete=Gs,Tt.prototype.get=Fs,Tt.prototype.has=Ws,Tt.prototype.set=Ns;function Xs(p,P){var D=Qn(p),N=!D&&uo(p),Pe=!D&&!N&&Hn(p),pe=!D&&!N&&!Pe&&po(p),xe=D||N||Pe||pe,De=xe?ht(p.length,String):[],Fe=De.length;for(var Le in p)(P||ut.call(p,Le))&&!(xe&&(Le=="length"||Pe&&(Le=="offset"||Le=="parent")||pe&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||er(Le,Fe)))&&De.push(Le);return De}function Rn(p,P){for(var D=p.length;D--;)if(ho(p[D][0],P))return D;return-1}function Di(p,P,D){var N=P(p);return Qn(p)?N:Ie(N,D(p))}function vn(p){return p==null?p===void 0?X:b:Ct&&Ct in Object(p)?Ft(p):co(p)}function ao(p){return jt(p)&&vn(p)==a}function lo(p,P,D,N,Pe){return p===P?!0:p==null||P==null||!jt(p)&&!jt(P)?p!==p&&P!==P:Ys(p,P,D,N,lo,Pe)}function Ys(p,P,D,N,Pe,pe){var xe=Qn(p),De=Qn(P),Fe=xe?l:zt(p),Le=De?l:zt(P);Fe=Fe==a?y:Fe,Le=Le==a?y:Le;var tt=Fe==y,mt=Le==y,Ne=Fe==Le;if(Ne&&Hn(p)){if(!Hn(P))return!1;xe=!0,tt=!1}if(Ne&&!tt)return pe||(pe=new Tt),xe||po(p)?Mi(p,P,D,N,Pe,pe):Zs(p,P,Fe,D,N,Pe,pe);if(!(D&o)){var nt=tt&&ut.call(p,"__wrapped__"),Je=mt&&ut.call(P,"__wrapped__");if(nt||Je){var Kt=nt?p.value():p,Wt=Je?P.value():P;return pe||(pe=new Tt),Pe(Kt,Wt,D,N,pe)}}return Ne?(pe||(pe=new Tt),Ks(p,P,D,N,Pe,pe)):!1}function Us(p){if(!mo(p)||nr(p))return!1;var P=fo(p)?Cs:ge;return P.test(lt(p))}function qs(p){return jt(p)&&Li(p.length)&&!!ve[vn(p)]}function Js(p){if(!ir(p))return pn(p);var P=[];for(var D in Object(p))ut.call(p,D)&&D!="constructor"&&P.push(D);return P}function Mi(p,P,D,N,Pe,pe){var xe=D&o,De=p.length,Fe=P.length;if(De!=Fe&&!(xe&&Fe>De))return!1;var Le=pe.get(p);if(Le&&pe.get(P))return Le==P;var tt=-1,mt=!0,Ne=D&s?new On:void 0;for(pe.set(p,P),pe.set(P,p);++tt<De;){var nt=p[tt],Je=P[tt];if(N)var Kt=xe?N(Je,nt,tt,P,p,pe):N(nt,Je,tt,p,P,pe);if(Kt!==void 0){if(Kt)continue;mt=!1;break}if(Ne){if(!Qe(P,function(Wt,bn){if(!gt(Ne,bn)&&(nt===Wt||Pe(nt,Wt,D,N,pe)))return Ne.push(bn)})){mt=!1;break}}else if(!(nt===Je||Pe(nt,Je,D,N,pe))){mt=!1;break}}return pe.delete(p),pe.delete(P),mt}function Zs(p,P,D,N,Pe,pe,xe){switch(D){case Q:if(p.byteLength!=P.byteLength||p.byteOffset!=P.byteOffset)return!1;p=p.buffer,P=P.buffer;case H:return!(p.byteLength!=P.byteLength||!pe(new io(p),new io(P)));case d:case h:case A:return ho(+p,+P);case u:return p.name==P.name&&p.message==P.message;case S:case j:return p==P+"";case g:var De=Ve;case C:var Fe=N&o;if(De||(De=Xe),p.size!=P.size&&!Fe)return!1;var Le=xe.get(p);if(Le)return Le==P;N|=s,xe.set(p,P);var tt=Mi(De(p),De(P),N,Pe,pe,xe);return xe.delete(p),tt;case M:if(ki)return ki.call(p)==ki.call(P)}return!1}function Ks(p,P,D,N,Pe,pe){var xe=D&o,De=An(p),Fe=De.length,Le=An(P),tt=Le.length;if(Fe!=tt&&!xe)return!1;for(var mt=Fe;mt--;){var Ne=De[mt];if(!(xe?Ne in P:ut.call(P,Ne)))return!1}var nt=pe.get(p);if(nt&&pe.get(P))return nt==P;var Je=!0;pe.set(p,P),pe.set(P,p);for(var Kt=xe;++mt<Fe;){Ne=De[mt];var Wt=p[Ne],bn=P[Ne];if(N)var xa=xe?N(bn,Wt,Ne,P,p,pe):N(Wt,bn,Ne,p,P,pe);if(!(xa===void 0?Wt===bn||Pe(Wt,bn,D,N,pe):xa)){Je=!1;break}Kt||(Kt=Ne=="constructor")}if(Je&&!Kt){var go=p.constructor,vo=P.constructor;go!=vo&&"constructor"in p&&"constructor"in P&&!(typeof go=="function"&&go instanceof go&&typeof vo=="function"&&vo instanceof vo)&&(Je=!1)}return pe.delete(p),pe.delete(P),Je}function An(p){return Di(p,Ti,$s)}function Et(p,P){var D=p.__data__;return tr(P)?D[typeof P=="string"?"string":"hash"]:D.map}function Gt(p,P){var D=vt(p,P);return Us(D)?D:void 0}function Ft(p){var P=ut.call(p,Ct),D=p[Ct];try{p[Ct]=void 0;var N=!0}catch(pe){}var Pe=zn.call(p);return N&&(P?p[Ct]=D:delete p[Ct]),Pe}var $s=Vn?function(p){return p==null?[]:(p=Object(p),se(Vn(p),function(P){return _n.call(p,P)}))}:sr,zt=vn;(Pi&&zt(new Pi(new ArrayBuffer(1)))!=Q||gn&&zt(new gn)!=g||Ci&&zt(Ci.resolve())!=E||Ei&&zt(new Ei)!=C||Ii&&zt(new Ii)!=J)&&(zt=function(p){var P=vn(p),D=P==y?p.constructor:void 0,N=D?lt(D):"";if(N)switch(N){case oo:return Q;case Ht:return g;case Es:return E;case Is:return C;case ks:return J}return P});function er(p,P){return P=P==null?r:P,!!P&&(typeof p=="number"||_e.test(p))&&p>-1&&p%1==0&&p<P}function tr(p){var P=typeof p;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?p!=="__proto__":p===null}function nr(p){return!!Tn&&Tn in p}function ir(p){var P=p&&p.constructor,D=typeof P=="function"&&P.prototype||Lt;return p===D}function co(p){return zn.call(p)}function lt(p){if(p!=null){try{return fn.call(p)}catch(P){}try{return p+""}catch(P){}}return""}function ho(p,P){return p===P||p!==p&&P!==P}var uo=ao(function(){return arguments}())?ao:function(p){return jt(p)&&ut.call(p,"callee")&&!_n.call(p,"callee")},Qn=Array.isArray;function Si(p){return p!=null&&Li(p.length)&&!fo(p)}var Hn=wi||rr;function or(p,P){return lo(p,P)}function fo(p){if(!mo(p))return!1;var P=vn(p);return P==m||P==v||P==c||P==k}function Li(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=r}function mo(p){var P=typeof p;return p!=null&&(P=="object"||P=="function")}function jt(p){return p!=null&&typeof p=="object"}var po=$e?Qt($e):qs;function Ti(p){return Si(p)?Xs(p):Js(p)}function sr(){return[]}function rr(){return!1}i.exports=or})(_y,ts);const Vy=ts,Oy=(i,t)=>Vy(i,t),By=i=>Object.keys(i||{}),Ry=(i,t)=>{const e={};return i.forEach(n=>{e[n]=t[n]}),e},Qy=()=>{const i={},t=(e,n)=>{const{watcherName:o,fn:s}=e,{prop:r,value:a}=n;i[o]||(i[o]={deps:{},fn:s}),i[o].deps[r]=a};return{subscribers:i,subscribe(e,n){e&&t(e,n)},notify(e,n){Object.entries(i).forEach(([o,{deps:s,fn:r}])=>{const a=By(s);if(a.includes(n)){const l=Ry(a,e);Oy(s,l)||(i[o].deps=l,r())}})}}},Hy=()=>{let i=null;return{targetWatcher(t,e){i={watcherName:t,fn:e},i.fn(),i=null},getTarget(){return i}}};function Gy(i,t){const e=To(i,"data",{}),n=To(i,"watch",{}),o=To(i,"methods",{}),s=To(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=Qy(),{targetWatcher:c,getTarget:d}=Hy();let h;const u={},m=()=>({data:h,methods:u});let v=!1;const g=b=>(...y)=>{v=!0;const E=b(...y);return v=!1,E};Object.entries(o).forEach(([b,y])=>{u[b]=g((...E)=>y(m(),...E)),Object.defineProperty(u[b],"name",{value:b})}),h=new Proxy(jy(e),{get(b,y){return d()&&!v&&r(d(),{prop:y,value:b[y]}),Reflect.get(...arguments)},set(b,y,E){return b[y]===E||(Reflect.set(...arguments),d()||(s&&s(y,E),a(h,y))),!0}}),Object.entries(n).forEach(([b,y])=>{c(b,()=>{y(m())})});const A=[h,u];return A._internal={_getSubscribers(){return l}},A}function Fy({pageIndex:i,particlesToShow:t,particlesToScroll:e,particlesCount:n}){const o=i===0?0:t-e,s=i*t-i*o,r=s+Math.max(t,e)-1,a=[];for(let l=s;l<=Math.min(n-1,r);l++)a.push(l);return a}function Wy({infinite:i,pageIndex:t,pagesCount:e,particlesCount:n,particlesToShow:o,particlesToScroll:s}){const r=$n(0,t,e-1);let a=r-1,l=r+1;a=i?a<0?e-1:a:Math.max(0,a),l=i?l>e-1?0:l:Math.min(e-1,l);const c=[...new Set([a,r,l,0,e-1])].sort((h,u)=>h-u),d=c.flatMap(h=>Fy({pageIndex:h,particlesToShow:o,particlesToScroll:s,particlesCount:n}));return{pageIndexes:c,particleIndexes:[...new Set(d)].sort((h,u)=>h-u)}}const Ny=(i,t)=>(i(),setInterval(i,t)),Xy=35,Ic=1;class Yy{constructor({onProgressValueChange:t}){this._onProgressValueChange=t,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(t){this._autoplayDuration=t}start(t){return new Promise(e=>{this.reset();const n=Math.min(Xy,Math.max(this._autoplayDuration,1));let o=-n;this._interval=Ny(()=>Y(this,null,function*(){if(this._paused)return;o+=n;const s=o/this._autoplayDuration;this._onProgressValueChange(s),s>Ic&&(this.reset(),yield t(),e())}),n)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(Ic)}}function Uy(i){const t=new Yy({onProgressValueChange:r=>{i("progressValue",1-r)}}),e=Gy({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=Wy({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=x1({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=Fh({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=V1({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=a,r.clonesCountTail=l,r.clonesCountTotal=a+l},setProgressManagerAutoplayDuration({data:r}){t.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:a}}){r&&(a?t.pause():t.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:a}}){r.autoplay&&a(r.autoplay)},setPagesCount({data:r}){r.pagesCount=M1({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=$n(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=$n(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=Er({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=Er({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},a){r.currentParticleIndex=$n(0,a,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},_applyAutoplayIfNeeded(l){return Y(this,arguments,function*({data:r,methods:a}){if(!r.infinite&&(r.autoplayDirection===cn&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===ai&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>Jr({[cn]:()=>Y(this,null,function*(){return a.showNextPage()}),[ai]:()=>Y(this,null,function*(){return a.showPrevPage()})})(r.autoplayDirection);yield t.start(c)}})},_jumpIfNeeded(l){return Y(this,arguments,function*({data:r,methods:a}){let c=!1;return r.infinite&&(r.currentParticleIndex===0?(yield a.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),c=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(yield a.showParticle(r.clonesCountHead,{animated:!1}),c=!0)),c})},changePage(d,h,u){return Y(this,arguments,function*({data:r,methods:a},l,c){if(t.reset(),r.disabled)return;r.disabled=!0,l(),yield a.offsetPage({animated:Wi(c,"animated",!0)}),r.disabled=!1,!(yield a._jumpIfNeeded())&&a._applyAutoplayIfNeeded()})},showNextPage(c,d){return Y(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._next,l))})},showPrevPage(c,d){return Y(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._prev,l))})},showParticle(c,d,h){return Y(this,arguments,function*({methods:r},a,l){yield r.changePage(()=>r._moveToParticle(a),l)})},_getParticleIndexByPageIndex({data:r},a){return Er({infinite:r.infinite,pageIndex:a,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},showPage(c,d,h){return Y(this,arguments,function*({methods:r},a,l){const u=r._getParticleIndexByPageIndex(a);yield r.showParticle(u,l)})},offsetPage({data:r},a){const l=Wi(a,"animated",!0);return new Promise(c=>{r.durationMs=l?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{c()},r.durationMs)})}}},{onChange:i}),[n,o]=e;return[{data:n,progressManager:t},o,e._internal]}function qy(i){fe(i,"svelte-sme1z4",":root{--sc-color-rgb-light-50p:rgba(93, 93, 93, 0.5);--sc-color-rgb-light:#5d5d5d;--sc-color-hex-dark-50p:rgba(30, 30, 30, 0.5);--sc-color-hex-dark:#1e1e1e}.sc-carousel__carousel-container.svelte-sme1z4{display:flex;width:100%;flex-direction:column;align-items:center}.sc-carousel__content-container.svelte-sme1z4{position:relative;display:flex;width:100%}.sc-carousel__pages-window.svelte-sme1z4{flex:1;display:flex;overflow:hidden;box-sizing:border-box;position:relative}.sc-carousel__pages-container.svelte-sme1z4{width:100%;display:flex;transition-property:transform}.sc-carousel__arrow-container.svelte-sme1z4{padding:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sc-carousel-progress__container.svelte-sme1z4{width:100%;height:5px;background-color:var(--sc-color-rgb-light-50p);position:absolute;bottom:0}.sc-carousel-button{all:unset;cursor:pointer}.sc-carousel-button:focus{outline:5px auto}")}const Jy=i=>({currentPageIndex:i[0]&32,pagesCount:i[0]&1024,loaded:i[0]&64}),kc=i=>({currentPageIndex:i[5],pagesCount:i[10],showPage:i[15],loaded:i[6]}),Zy=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),xc=i=>({showNextPage:i[14].showNextPage,loaded:i[6],currentPageIndex:i[5]}),Ky=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Dc=i=>({loaded:i[6],currentPageIndex:i[5]}),$y=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Mc=i=>({showPrevPage:i[14].showPrevPage,loaded:i[6],currentPageIndex:i[5]});function Sc(i){let t;const e=i[37].prev,n=hi(e,i,i[36],Mc),o=n||ew(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&fi(n,e,s,s[36],t?ui(e,s[36],r,$y):mi(s[36]),Mc):o&&o.p&&(!t||r[0]&36)&&o.p(s,t?r:[-1,-1])},i(s){t||(x(o,s),t=!0)},o(s){L(o,s),t=!1},d(s){o&&o.d(s)}}}function ew(i){let t,e,n;return e=new Hh({props:{direction:"prev",disabled:!i[2]&&i[5]===0}}),e.$on("click",i[23]),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){V(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s[0]&36&&(r.disabled=!o[2]&&o[5]===0),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&_(t),te(e)}}}function Lc(i){let t,e,n;return e=new r1({props:{value:i[7]}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(o,s){V(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s[0]&128&&(r.value=o[7]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&_(t),te(e)}}}function Tc(i){let t;const e=i[37].next,n=hi(e,i,i[36],xc),o=n||tw(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&fi(n,e,s,s[36],t?ui(e,s[36],r,Zy):mi(s[36]),xc):o&&o.p&&(!t||r[0]&1060)&&o.p(s,t?r:[-1,-1])},i(s){t||(x(o,s),t=!0)},o(s){L(o,s),t=!1},d(s){o&&o.d(s)}}}function tw(i){let t,e,n;return e=new Hh({props:{direction:"next",disabled:!i[2]&&i[5]===i[10]-1}}),e.$on("click",i[14].showNextPage),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){V(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s[0]&1060&&(r.disabled=!o[2]&&o[5]===o[10]-1),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&_(t),te(e)}}}function zc(i){let t;const e=i[37].dots,n=hi(e,i,i[36],kc),o=n||nw(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&1120|r[1]&32)&&fi(n,e,s,s[36],t?ui(e,s[36],r,Jy):mi(s[36]),kc):o&&o.p&&(!t||r[0]&1056)&&o.p(s,t?r:[-1,-1])},i(s){t||(x(o,s),t=!0)},o(s){L(o,s),t=!1},d(s){o&&o.d(s)}}}function nw(i){let t,e;return t=new $b({props:{pagesCount:i[10],currentPageIndex:i[5]}}),t.$on("pageChange",i[41]),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o[0]&1024&&(s.pagesCount=n[10]),o[0]&32&&(s.currentPageIndex=n[5]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function iw(i){let t,e,n,o,s,r,a,l,c,d,h,u,m=i[1]&&Sc(i);const v=i[37].default,g=hi(v,i,i[36],Dc);let A=i[3]&&Lc(i),b=i[1]&&Tc(i),y=i[4]&&zc(i);return{c(){t=z("div"),e=z("div"),m&&m.c(),n=ne(),o=z("div"),s=z("div"),g&&g.c(),a=ne(),A&&A.c(),l=ne(),b&&b.c(),c=ne(),y&&y.c(),w(s,"class","sc-carousel__pages-container svelte-sme1z4"),T(s,"transform","translateX("+i[8]+"px)"),T(s,"transition-duration",i[9]+"ms"),T(s,"transition-timing-function",i[0]),w(o,"class","sc-carousel__pages-window svelte-sme1z4"),w(e,"class","sc-carousel__content-container svelte-sme1z4"),w(t,"class","sc-carousel__carousel-container svelte-sme1z4")},m(E,k){V(E,t,k),O(t,e),m&&m.m(e,null),O(e,n),O(e,o),O(o,s),g&&g.m(s,null),i[39](s),O(o,a),A&&A.m(o,null),i[40](o),O(e,l),b&&b.m(e,null),O(t,c),y&&y.m(t,null),d=!0,h||(u=[Ut(r=p1.call(null,s,{thresholdProvider:i[38]})),Ce(s,"swipeStart",i[16]),Ce(s,"swipeMove",i[18]),Ce(s,"swipeEnd",i[19]),Ce(s,"swipeFailed",i[20]),Ce(s,"swipeThresholdReached",i[17]),Ut(b1.call(null,o)),Ce(o,"hovered",i[21]),Ut(E1.call(null,o)),Ce(o,"tapped",i[22])],h=!0)},p(E,k){E[1]?m?(m.p(E,k),k[0]&2&&x(m,1)):(m=Sc(E),m.c(),x(m,1),m.m(e,n)):m&&(de(),L(m,1,1,()=>{m=null}),he()),g&&g.p&&(!d||k[0]&96|k[1]&32)&&fi(g,v,E,E[36],d?ui(v,E[36],k,Ky):mi(E[36]),Dc),(!d||k[0]&256)&&T(s,"transform","translateX("+E[8]+"px)"),(!d||k[0]&512)&&T(s,"transition-duration",E[9]+"ms"),(!d||k[0]&1)&&T(s,"transition-timing-function",E[0]),r&&di(r.update)&&k[0]&2048&&r.update.call(null,{thresholdProvider:E[38]}),E[3]?A?(A.p(E,k),k[0]&8&&x(A,1)):(A=Lc(E),A.c(),x(A,1),A.m(o,null)):A&&(de(),L(A,1,1,()=>{A=null}),he()),E[1]?b?(b.p(E,k),k[0]&2&&x(b,1)):(b=Tc(E),b.c(),x(b,1),b.m(e,null)):b&&(de(),L(b,1,1,()=>{b=null}),he()),E[4]?y?(y.p(E,k),k[0]&16&&x(y,1)):(y=zc(E),y.c(),x(y,1),y.m(t,null)):y&&(de(),L(y,1,1,()=>{y=null}),he())},i(E){d||(x(m),x(g,E),x(A),x(b),x(y),d=!0)},o(E){L(m),L(g,E),L(A),L(b),L(y),d=!1},d(E){E&&_(t),m&&m.d(),g&&g.d(E),i[39](null),A&&A.d(),i[40](null),b&&b.d(),y&&y.d(),h=!1,rt(u)}}}function ow(i,t,e){let{$$slots:n={},$$scope:o}=t,s=[],r,a,l=0,c=0,d=1;const[{data:h,progressManager:u},m,v]=Uy((se,Ie)=>{Jr({currentPageIndex:()=>e(5,r=Ie),progressValue:()=>e(7,a=Ie),offset:()=>e(8,l=Ie),durationMs:()=>e(9,c=Ie),pagesCount:()=>e(10,d=Ie),loaded:()=>e(6,s=Ie)})(se)}),g=cs();let{timingFunction:A="ease-in-out"}=t,{arrows:b=!0}=t,{infinite:y=!0}=t,{initialPageIndex:E=0}=t,{duration:k=500}=t,{autoplay:S=!1}=t,{autoplayDuration:C=3e3}=t,{autoplayDirection:j=cn}=t,{pauseOnFocus:M=!1}=t,{autoplayProgressVisible:X=!1}=t,{dots:J=!0}=t,{swiping:H=!0}=t,{particlesToShow:Q=1}=t,{particlesToScroll:G=1}=t;function B(se,Ie){return Y(this,null,function*(){const Qe=Wi(Ie,"animated",!0);if(typeof se!="number")throw new Error("pageIndex should be a number");yield m.showPage(se,{animated:Qe})})}function W(se){return Y(this,null,function*(){const Ie=Wi(se,"animated",!0);yield m.showPrevPage({animated:Ie})})}function q(se){return Y(this,null,function*(){const Ie=Wi(se,"animated",!0);yield m.showNextPage({animated:Ie})})}let U=0,Z,re;const oe=z1(({width:se})=>{e(11,U=se),h.particleWidth=U/h.particlesToShow,T1({particlesContainerChildren:re.children,particleWidth:h.particleWidth}),m.offsetPage({animated:!1})});function Ae(){const{clonesToAppend:se,clonesToPrepend:Ie}=j1({clonesCountHead:h.clonesCountHead,clonesCountTail:h.clonesCountTail,particlesContainerChildren:re.children});_1({particlesContainer:re,clonesToAppend:se,clonesToPrepend:Ie})}Mt(()=>{Y(this,null,function*(){yield Ba(),re&&Z&&(h.particlesCountWithoutClones=re.children.length,yield Ba(),h.infinite&&Ae(),h.particlesCount=re.children.length,m.showPage(E,{animated:!1}),oe.observe(Z))})}),hn(()=>{oe.disconnect(),u.reset()});function we(se){return Y(this,null,function*(){yield m.showPage(se,{animated:!0})})}function ge(){H&&(h.durationMs=0)}function _e(se){return Y(this,null,function*(){H&&(yield Jr({[cn]:m.showNextPage,[ai]:m.showPrevPage})(se.detail.direction))})}function ve(se){H&&(h.offset+=se.detail.dx)}function Ge(){H&&m.showParticle(h.currentParticleIndex)}function ue(){return Y(this,null,function*(){H&&(yield m.offsetPage({animated:!0}))})}function be(se){h.focused=se.detail.value}function Se(){m.toggleFocused()}function me(){m.showPrevPage()}const Ue=()=>U/3;function at(se){Ke[se?"unshift":"push"](()=>{re=se,e(13,re)})}function ke(se){Ke[se?"unshift":"push"](()=>{Z=se,e(12,Z)})}const $e=se=>we(se.detail);return i.$$set=se=>{"timingFunction"in se&&e(0,A=se.timingFunction),"arrows"in se&&e(1,b=se.arrows),"infinite"in se&&e(2,y=se.infinite),"initialPageIndex"in se&&e(24,E=se.initialPageIndex),"duration"in se&&e(25,k=se.duration),"autoplay"in se&&e(26,S=se.autoplay),"autoplayDuration"in se&&e(27,C=se.autoplayDuration),"autoplayDirection"in se&&e(28,j=se.autoplayDirection),"pauseOnFocus"in se&&e(29,M=se.pauseOnFocus),"autoplayProgressVisible"in se&&e(3,X=se.autoplayProgressVisible),"dots"in se&&e(4,J=se.dots),"swiping"in se&&e(30,H=se.swiping),"particlesToShow"in se&&e(31,Q=se.particlesToShow),"particlesToScroll"in se&&e(32,G=se.particlesToScroll),"$$scope"in se&&e(36,o=se.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&32&&g("pageChange",r),i.$$.dirty[0]&4&&(h.infinite=y),i.$$.dirty[0]&33554432&&(h.durationMsInit=k),i.$$.dirty[0]&67108864&&(h.autoplay=S),i.$$.dirty[0]&134217728&&(h.autoplayDuration=C),i.$$.dirty[0]&268435456&&(h.autoplayDirection=j),i.$$.dirty[0]&536870912&&(h.pauseOnFocus=M),i.$$.dirty[1]&1&&(h.particlesToShowInit=Q),i.$$.dirty[1]&2&&(h.particlesToScrollInit=G)},[A,b,y,X,J,r,s,a,l,c,d,U,Z,re,m,we,ge,_e,ve,Ge,ue,be,Se,me,E,k,S,C,j,M,H,Q,G,B,W,q,o,n,Ue,at,ke,$e]}class sw extends ce{constructor(t){super(),le(this,t,ow,iw,ae,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},qy,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function rw(i){fe(i,"svelte-159ski6",".media-item.svelte-159ski6.svelte-159ski6{position:relative;height:100%}.media-content.svelte-159ski6.svelte-159ski6{position:relative;pointer-events:auto;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.media-content.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none}.video-icon.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-159ski6.svelte-159ski6{display:none;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none;display:block}.video-icon.svelte-159ski6.svelte-159ski6{pointer-events:auto}.video-icon.large.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem}.video-icon.small.svelte-159ski6.svelte-159ski6{width:1.75rem;height:1.75rem}.video-icon.svelte-159ski6 .video-icon-img.svelte-159ski6{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-159ski6 .video-icon-img.canPlay.svelte-159ski6{cursor:pointer}")}function jc(i){let t;function e(s,r){if(s[2].type==="Image")return lw;if(s[2].type==="Video")return aw}let n=e(i),o=n&&n(i);return{c(){t=z("div"),o&&o.c(),w(t,"class","media-item svelte-159ski6"),w(t,"draggable","false")},m(s,r){V(s,t,r),o&&o.m(t,null)},p(s,r){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null)))},d(s){s&&_(t),o&&o.d()}}}function aw(i){let t,e,n,o,s,r;function a(d,h){return d[7]&&d[2].videoCoverUrl?dw:cw}let l=a(i),c=l(i);return{c(){c.c(),t=ne(),e=z("div"),n=z("div"),o=z("div"),w(o,"class","video-icon-img svelte-159ski6"),T(o,"background-image","url("+i[20]()+")"),$(o,"canPlay",i[5]),w(n,"class","video-icon svelte-159ski6"),$(n,"large",i[4]==="large"),$(n,"small",i[4]==="small"),w(e,"class","video-play-button-container svelte-159ski6"),$(e,"showPlayButton",i[10])},m(d,h){c.m(d,h),V(d,t,h),V(d,e,h),O(e,n),O(n,o),s||(r=Ce(o,"click",i[21]),s=!0)},p(d,h){l===(l=a(d))&&c?c.p(d,h):(c.d(1),c=l(d),c&&(c.c(),c.m(t.parentNode,t))),h&8&&T(o,"background-image","url("+d[20]()+")"),h&32&&$(o,"canPlay",d[5]),h&16&&$(n,"large",d[4]==="large"),h&16&&$(n,"small",d[4]==="small"),h&1024&&$(e,"showPlayButton",d[10])},d(d){c.d(d),d&&_(t),d&&_(e),s=!1,r()}}}function lw(i){let t,e,n,o;return{c(){t=z("img"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),wt(t.src,n=i[2].url)||w(t,"src",n),w(t,"alt",o=i[2].name),w(t,"draggable",!1)},m(s,r){V(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&w(t,"style",e),r&4&&!wt(t.src,n=s[2].url)&&w(t,"src",n),r&4&&o!==(o=s[2].name)&&w(t,"alt",o)},d(s){s&&_(t)}}}function cw(i){let t,e,n,o,s,r,a;return{c(){t=z("video"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),wt(t.src,n=i[2].videoCoverUrl?i[2].url:i[2].url+"#t=0.1")||w(t,"src",n),w(t,"poster",o=i[2].videoCoverUrl),w(t,"preload",s=i[2].videoCoverUrl?"none":"auto"),w(t,"disablepictureinpicture",""),t.playsInline=!0,w(t,"paused",""),t.muted=!0,w(t,"draggable",!1),t.loop=!1,w(t,"crossorigin",""),t.controls=!1,$(t,"showPlayButton",i[10])},m(l,c){V(l,t,c),i[19](t),r||(a=[Ce(t,"play",i[14]),Ce(t,"pause",i[15]),Ce(t,"error",i[16]),Ce(t,"ended",i[17]),Ce(t,"click",i[18])],r=!0)},p(l,c){c&64&&e!==(e=`object-fit: ${l[6]};`)&&w(t,"style",e),c&4&&!wt(t.src,n=l[2].videoCoverUrl?l[2].url:l[2].url+"#t=0.1")&&w(t,"src",n),c&4&&o!==(o=l[2].videoCoverUrl)&&w(t,"poster",o),c&4&&s!==(s=l[2].videoCoverUrl?"none":"auto")&&w(t,"preload",s),c&1024&&$(t,"showPlayButton",l[10])},d(l){l&&_(t),i[19](null),r=!1,rt(a)}}}function dw(i){let t,e,n,o;return{c(){t=z("img"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),wt(t.src,n=i[2].videoCoverUrl)||w(t,"src",n),w(t,"alt",o=i[2].name),w(t,"draggable",!1)},m(s,r){V(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&w(t,"style",e),r&4&&!wt(t.src,n=s[2].videoCoverUrl)&&w(t,"src",n),r&4&&o!==(o=s[2].name)&&w(t,"alt",o)},d(s){s&&_(t)}}}function hw(i){let t,e=i[2]&&jc(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),V(n,t,o)},p(n,[o]){n[2]?e?e.p(n,o):(e=jc(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:K,o:K,d(n){e&&e.d(n),n&&_(t)}}}function uw(i,t,e){let n,o,{mediaInstance:s={videoInstance:void 0,paused:!0}}=t,{tag:r}=t,{media:a}=t,{playButtonIfNeed:l="withoutText"}=t,{playButtonSizeIfNeed:c="small"}=t,{canPlay:d=!0}=t,{objectFit:h="fill"}=t,{disableVideoIfHavePoster:u=!1}=t,m=!0,v=!1;function g(){e(8,v=(a==null?void 0:a.type)==="Video"&&!!a.videoCoverUrl)}const A=rn("mediaStore"),b=rn("hooks"),y=()=>{v||n&&(e(9,n.muted=!0,n),n.play(),n.pause(),e(9,n.muted=!1,n),e(8,v=!0))};b.on("loadVideoFirstFrame",y),Mt(()=>{A.subscribe(({currentMediaElement:H})=>{H!==n&&(n==null||n.pause())})});const E=H=>{e(10,m=!1),e(0,s.paused=!1,s),e(8,v=!0),n&&A.set({currentMediaElement:n}),b.emit("playStateChange",{event:H,state:"playing",tag:r,mediaInstance:n})},k=H=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:H,state:"paused",tag:r,mediaInstance:n})},S=H=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:H,state:"paused",tag:r,mediaInstance:n})},C=H=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:H,state:"paused",tag:r,mediaInstance:n})},j=H=>{n&&n.pause()};function M(H){Ke[H?"unshift":"push"](()=>{s.videoInstance=H,e(0,s)})}const X=()=>l==="withText"?Oh:l==="withoutText"?Ur:l,J=H=>{d&&n&&(e(9,n.muted=!1,n),n.play())};return i.$$set=H=>{"mediaInstance"in H&&e(0,s=H.mediaInstance),"tag"in H&&e(1,r=H.tag),"media"in H&&e(2,a=H.media),"playButtonIfNeed"in H&&e(3,l=H.playButtonIfNeed),"playButtonSizeIfNeed"in H&&e(4,c=H.playButtonSizeIfNeed),"canPlay"in H&&e(5,d=H.canPlay),"objectFit"in H&&e(6,h=H.objectFit),"disableVideoIfHavePoster"in H&&e(7,u=H.disableVideoIfHavePoster)},i.$$.update=()=>{if(i.$$.dirty&1&&e(9,n=s.videoInstance),i.$$.dirty&4&&e(13,o=a==null?void 0:a.url),i.$$.dirty&8192&&o&&g(),i.$$.dirty&512&&n&&e(10,m=n.paused),i.$$.dirty&772&&(a==null?void 0:a.type)==="Video"&&!v){const H=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,G=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&H;n&&G&&n.paused&&(document.removeEventListener("WeixinJSBridgeReady",y),document.removeEventListener("touchstart",y),document.removeEventListener("click",y),document.addEventListener("WeixinJSBridgeReady",y),document.addEventListener("touchstart",y),document.addEventListener("click",y))}},[s,r,a,l,c,d,h,u,v,n,m,A,b,o,E,k,S,C,j,M,X,J]}class Kh extends ce{constructor(t){super(),le(this,t,uw,hw,ae,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,objectFit:6,disableVideoIfHavePoster:7},rw)}}function fw(i){fe(i,"svelte-1mrbqlg",".media-list-wrapper.svelte-1mrbqlg.svelte-1mrbqlg{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg{position:relative;pointer-events:auto;height:100%;left:50%;top:50%;transform:translate(-50%, -50%)}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__carousel-container,.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__content-container{height:100%}")}function _c(i,t,e){const n=i.slice();return n[28]=t[e],n[29]=t,n[30]=e,n}function Vc(i){let t,e,n,o,s,r,a;const l=[pw,mw],c=[];function d(h,u){return h[13]&&h[10].length>1?0:1}return n=d(i),o=c[n]=l[n](i),{c(){t=z("div"),e=z("div"),o.c(),w(e,"class","media-list svelte-1mrbqlg"),$(e,"carouselEnabled",i[13]),w(t,"class","media-list-wrapper svelte-1mrbqlg"),$(t,"unfolded",i[5])},m(h,u){V(h,t,u),O(t,e),c[n].m(e,null),a=!0},p(h,u){i=h;let m=n;n=d(i),n===m?c[n].p(i,u):(de(),L(c[m],1,1,()=>{c[m]=null}),he(),o=c[n],o?o.p(i,u):(o=c[n]=l[n](i),o.c()),x(o,1),o.m(e,null)),(!a||u[0]&8192)&&$(e,"carouselEnabled",i[13]),(!a||u[0]&32)&&$(t,"unfolded",i[5])},i(h){a||(x(o),h&&ot(()=>{a&&(r&&r.end(1),s=Dn(t,Ga,i[6]?{y:4,duration:i[4],delay:i[2],easing:sn}:void 0),s.start())}),a=!0)},o(h){L(o),s&&s.invalidate(),h&&(r=gi(t,Ga,i[6]?{y:4,duration:i[4],delay:i[3],easing:sn}:void 0)),a=!1},d(h){h&&_(t),c[n].d(),h&&r&&r.end()}}}function mw(i){let t,e,n;const o=[{media:i[1][0]},i[7],{tag:i[0]}];function s(a){i[20](a)}let r={};for(let a=0;a<o.length;a+=1)r=Ze(r,o[a]);return i[8][0]!==void 0&&(r.mediaInstance=i[8][0]),t=new Kh({props:r}),Ke.push(()=>th(t,"mediaInstance",s)),{c(){ie(t.$$.fragment)},m(a,l){ee(t,a,l),n=!0},p(a,l){const c=l[0]&131?st(o,[l[0]&2&&{media:a[1][0]},l[0]&128&&eh(a[7]),l[0]&1&&{tag:a[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=a[8][0],Jd(()=>e=!1)),t.$set(c)},i(a){n||(x(t.$$.fragment,a),n=!0)},o(a){L(t.$$.fragment,a),n=!1},d(a){te(t,a)}}}function pw(i){let t,e,n={dots:!1,arrows:!1,$$slots:{default:[gw]},$$scope:{ctx:i}};return t=new sw({props:n}),i[18](t),t.$on("pageChange",i[19]),{c(){ie(t.$$.fragment)},m(o,s){ee(t,o,s),e=!0},p(o,s){const r={};s[0]&1409|s[1]&1&&(r.$$scope={dirty:s,ctx:o}),t.$set(r)},i(o){e||(x(t.$$.fragment,o),e=!0)},o(o){L(t.$$.fragment,o),e=!1},d(o){i[18](null),te(t,o)}}}function Oc(i){let t,e,n;const o=[i[7],{media:i[28]},{tag:i[0]}];function s(a){i[17](a,i[30])}let r={};for(let a=0;a<o.length;a+=1)r=Ze(r,o[a]);return i[8][i[30]]!==void 0&&(r.mediaInstance=i[8][i[30]]),t=new Kh({props:r}),Ke.push(()=>th(t,"mediaInstance",s)),{c(){ie(t.$$.fragment)},m(a,l){ee(t,a,l),n=!0},p(a,l){i=a;const c=l[0]&1153?st(o,[l[0]&128&&eh(i[7]),l[0]&1024&&{media:i[28]},l[0]&1&&{tag:i[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=i[8][i[30]],Jd(()=>e=!1)),t.$set(c)},i(a){n||(x(t.$$.fragment,a),n=!0)},o(a){L(t.$$.fragment,a),n=!1},d(a){te(t,a)}}}function gw(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=Oc(_c(i,n,r));const s=r=>L(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=Ee()},m(r,a){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(r,a);V(r,t,a),e=!0},p(r,a){if(a[0]&1409){n=r[10];let l;for(l=0;l<n.length;l+=1){const c=_c(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=Oc(c),o[l].c(),x(o[l],1),o[l].m(t.parentNode,t))}for(de(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)x(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)L(o[a]);e=!1},d(r){qt(o,r),r&&_(t)}}}function vw(i){let t,e,n=i[5]&&Vc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,s){o[5]?n?(n.p(o,s),s[0]&32&&x(n,1)):(n=Vc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function Aw(i,t,e){let n,o,s,r,{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:d=0}=t,{duration:h=0}=t,{unfolded:u=!0}=t,{animation:m=!0}=t,{mediaItemConfig:v}=t,{enableCarousel:g=!0}=t,{autoplayConfig:A={}}=t;const{autoplayVideo:b=!1,autoplayCarousel:y=!0,autoplayVideoInCarousel:E=!1}=A;let k=[],S=0,C,j=null;const M=rn("hooks"),X=rn("mediaStore");function J(){const W=k[S],q=W==null?void 0:W.videoInstance;q&&(q.paused?(q.muted=!1,q.play()):q.pause())}Mt(()=>{M.on("click",W=>{var q,U,Z;(Z=(U=(q=a.tag3DContentSvelte)==null?void 0:q.css3DInstance)==null?void 0:U.css3DObject)!=null&&Z.opacityMesh&&W.tag.id===a.id&&J()}),j=setInterval(()=>{r&&(C==null||C.goToNext())},3e3)}),hn(()=>{clearInterval(j),M.off("click",J)});function H(W,q){i.$$.not_equal(k[q],W)&&(k[q]=W,e(8,k))}function Q(W){Ke[W?"unshift":"push"](()=>{C=W,e(12,C)})}const G=W=>{n||X.set({currentMediaElement:null}),e(11,S=W.detail)};function B(W){i.$$.not_equal(k[0],W)&&(k[0]=W,e(8,k))}return i.$$set=W=>{"tag"in W&&e(0,a=W.tag),"mediaData"in W&&e(1,l=W.mediaData),"inDelay"in W&&e(2,c=W.inDelay),"outDelay"in W&&e(3,d=W.outDelay),"duration"in W&&e(4,h=W.duration),"unfolded"in W&&e(5,u=W.unfolded),"animation"in W&&e(6,m=W.animation),"mediaItemConfig"in W&&e(7,v=W.mediaItemConfig),"enableCarousel"in W&&e(15,g=W.enableCarousel),"autoplayConfig"in W&&e(16,A=W.autoplayConfig)},i.$$.update=()=>{i.$$.dirty[0]&256&&e(9,n=k.every(W=>W.paused)),i.$$.dirty[0]&32770&&e(13,o=g&&(l==null?void 0:l.length)>1),i.$$.dirty[0]&2&&e(10,s=l),i.$$.dirty[0]&1536&&(r=s.length>1&&y&&n)},[a,l,c,d,h,u,m,v,k,n,s,S,C,o,X,g,A,H,Q,G,B]}class $h extends ce{constructor(t){super(),le(this,t,Aw,vw,ae,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:15,autoplayConfig:16},fw,[-1,-1])}}function bw(i){fe(i,"svelte-1f7m1lj",".line.svelte-1f7m1lj{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%)}.text.svelte-1f7m1lj{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;font-weight:600}.media-wrapper.svelte-1f7m1lj{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;font-weight:600}")}function Bc(i){let t,e,n,o,s,r,a,l;t=new Rt({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new Nb({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&Rc(i),d=i[1]&&Qc(i);return{c(){ie(t.$$.fragment),e=ne(),n=z("div"),ie(o.$$.fragment),s=ne(),c&&c.c(),r=ne(),d&&d.c(),a=Ee(),w(n,"class","line svelte-1f7m1lj")},m(h,u){ee(t,h,u),V(h,e,u),V(h,n,u),ee(o,n,null),V(h,s,u),c&&c.m(h,u),V(h,r,u),d&&d.m(h,u),V(h,a,u),l=!0},p(h,u){const m={};u&8&&(m.visible=h[3]),t.$set(m);const v={};u&8&&(v.unfolded=h[3]),o.$set(v),h[2]?c?(c.p(h,u),u&4&&x(c,1)):(c=Rc(h),c.c(),x(c,1),c.m(r.parentNode,r)):c&&(de(),L(c,1,1,()=>{c=null}),he()),h[1]?d?(d.p(h,u),u&2&&x(d,1)):(d=Qc(h),d.c(),x(d,1),d.m(a.parentNode,a)):d&&(de(),L(d,1,1,()=>{d=null}),he())},i(h){l||(x(t.$$.fragment,h),x(o.$$.fragment,h),x(c),x(d),l=!0)},o(h){L(t.$$.fragment,h),L(o.$$.fragment,h),L(c),L(d),l=!1},d(h){te(t,h),h&&_(e),h&&_(n),te(o),h&&_(s),c&&c.d(h),h&&_(r),d&&d.d(h),h&&_(a)}}}function Rc(i){let t,e,n;return e=new Rh({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","text svelte-1f7m1lj")},m(o,s){V(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&4&&(r.content=o[2]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&_(t),te(e)}}}function Qc(i){let t,e,n;return e=new $h({props:{autoplayConfig:{autoplayCarousel:!1},unfolded:i[3],mediaData:i[1],tag:i[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){V(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&2&&(r.mediaData=o[1]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&_(t),te(e)}}}function yw(i){let t,e,n=i[0].state&&Bc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=Bc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function ww(i,t,e){let n,o,s,r,{tag:a}=t;return i.$$set=l=>{"tag"in l&&e(0,a=l.tag)},i.$$.update=()=>{var l,c,d;i.$$.dirty&1&&e(3,n=a.state?a.state.unfolded:!1),i.$$.dirty&1&&e(4,o=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),i.$$.dirty&16&&e(2,s=((d=o.length)!=null?d:0)>7?o.substring(0,6)+"...":o),i.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,s,n,o]}class Pw extends ce{constructor(t){super(),le(this,t,ww,yw,ae,{tag:0},bw)}}function Cw(i){fe(i,"svelte-sezqcq",'@charset "UTF-8";.svelte-sezqcq.svelte-sezqcq{box-sizing:border-box}.marketing.svelte-sezqcq.svelte-sezqcq{transform:translateY(-100%)}.marketing.svelte-sezqcq .line.svelte-sezqcq{position:absolute;height:1.875rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.marketing.svelte-sezqcq .content.svelte-sezqcq{position:relative;min-width:7.5rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.25rem;top:-1.875rem;left:-1rem;padding:0.5rem 0rem 0.5625rem;transition-property:opacity, transform;transition-duration:500ms}.marketing.svelte-sezqcq .content .headerImage.svelte-sezqcq{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.title-wrapper.svelte-sezqcq.svelte-sezqcq{position:relative;width:100%;height:1.125rem}.title-wrapper.svelte-sezqcq .title.svelte-sezqcq{border-radius:0.25rem;width:100%;padding-left:0.625rem;padding-right:0.625rem}.title-wrapper.svelte-sezqcq .title .text.svelte-sezqcq{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem}.footer.svelte-sezqcq.svelte-sezqcq{position:relative;padding:0.5rem 0.625rem 0 0;width:100%;display:flex;align-items:center}.footer.svelte-sezqcq .goto-button.svelte-sezqcq{display:flex;align-self:flex-end;flex-wrap:wrap;align-items:center;overflow:hidden;height:0.875rem}.footer.svelte-sezqcq .goto-button .gap.svelte-sezqcq{height:100%;width:0.625rem}.footer.svelte-sezqcq .goto-button .text.svelte-sezqcq{display:block;height:100%;font-size:0.625rem}.footer.svelte-sezqcq .arrow-wrapper.svelte-sezqcq{height:0.875rem;display:flex;align-self:flex-end;flex-grow:0;flex-shrink:0;align-items:center;margin-left:0.25rem}.footer.svelte-sezqcq .arrow-wrapper svg.arrow.svelte-sezqcq{width:0.375rem;height:0.625rem}.footer.svelte-sezqcq .price.svelte-sezqcq{flex-shrink:0;margin-right:auto;white-space:nowrap;display:flex;align-items:baseline;margin-left:0.625rem}.footer.svelte-sezqcq .price .value.svelte-sezqcq{position:relative;font-size:0.875rem;line-height:1rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.footer.svelte-sezqcq .price .unit.svelte-sezqcq{padding-left:0.125rem;font-size:0.625rem}.tags-wrapper.svelte-sezqcq.svelte-sezqcq{position:relative;overflow:hidden;height:1rem;margin-top:0.25rem}.tags-wrapper.svelte-sezqcq .tags.svelte-sezqcq{position:relative;display:inline-flex;max-width:100%;flex-wrap:wrap;padding-left:0.625rem;padding-right:0.375rem}.tags-wrapper.svelte-sezqcq .tags .tag.svelte-sezqcq{display:flex;align-items:center;justify-content:center;flex-shrink:0;flex-grow:0;font-size:0.625rem;height:1rem;margin-right:0.25rem;margin-bottom:0.625rem;padding:0 0.25rem;border-radius:0.125rem;max-width:100%;text-overflow:ellipsis;overflow:hidden}.marketing.light.svelte-sezqcq .content.svelte-sezqcq{background-color:white}.marketing.light.svelte-sezqcq .content .title-wrapper .title .text.svelte-sezqcq{color:rgba(0, 0, 0, 0.8)}.marketing.light.svelte-sezqcq .content .tags-wrapper .tags .primary-tag.svelte-sezqcq{background:rgba(234, 208, 154, 0.5);color:#946700}.marketing.light.svelte-sezqcq .content .tags-wrapper .tags .secondary-tag.svelte-sezqcq{background:rgba(0, 0, 0, 0.06);color:rgba(0, 0, 0, 0.5)}.marketing.light.svelte-sezqcq .content .footer.svelte-sezqcq{color:#946700;fill:#946700}.marketing.dark.svelte-sezqcq .content.svelte-sezqcq{background-color:rgba(0, 0, 0, 0.5)}.marketing.dark.svelte-sezqcq .content .title-wrapper .title .text.svelte-sezqcq{color:white}.marketing.dark.svelte-sezqcq .content .tags-wrapper .tags .primary-tag.svelte-sezqcq{background:rgba(234, 208, 154, 0.5);color:white}.marketing.dark.svelte-sezqcq .content .tags-wrapper .tags .secondary-tag.svelte-sezqcq{background:rgba(255, 255, 255, 0.15);color:rgba(255, 255, 255, 0.85)}.marketing.dark.svelte-sezqcq .content .footer.svelte-sezqcq{color:#ead09a;fill:#ead09a}.marketing.unfolded.svelte-sezqcq .line.svelte-sezqcq{transform:translateX(-50%) scale(1, 1)}.marketing.folded.svelte-sezqcq .line.svelte-sezqcq{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.marketing.unfolded.svelte-sezqcq .content.svelte-sezqcq{opacity:1}.marketing.folded.svelte-sezqcq .content.svelte-sezqcq{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}')}function Hc(i,t,e){const n=i.slice();return n[0]=t[e],n}function Gc(i,t,e){const n=i.slice();return n[0]=t[e],n}function Fc(i){let t,e;return{c(){t=z("img"),w(t,"class","headerImage svelte-sezqcq"),wt(t.src,e=i[3].headerPictureUrl)||w(t,"src",e),w(t,"alt","")},m(n,o){V(n,t,o)},p(n,o){o&8&&!wt(t.src,e=n[3].headerPictureUrl)&&w(t,"src",e)},d(n){n&&_(t)}}}function Wc(i){let t,e,n,o,s=i[2]||[],r=[];for(let c=0;c<s.length;c+=1)r[c]=Nc(Gc(i,s,c));let a=i[5]||[],l=[];for(let c=0;c<a.length;c+=1)l[c]=Xc(Hc(i,a,c));return{c(){t=z("div"),e=z("div");for(let c=0;c<r.length;c+=1)r[c].c();n=ne();for(let c=0;c<l.length;c+=1)l[c].c();w(e,"class","tags svelte-sezqcq"),ot(()=>i[11].call(e)),w(t,"class","tags-wrapper svelte-sezqcq")},m(c,d){V(c,t,d),O(t,e);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(e,null);O(e,n);for(let h=0;h<l.length;h+=1)l[h]&&l[h].m(e,null);o=ls(e,i[11].bind(e))},p(c,d){if(d&4){s=c[2]||[];let h;for(h=0;h<s.length;h+=1){const u=Gc(c,s,h);r[h]?r[h].p(u,d):(r[h]=Nc(u),r[h].c(),r[h].m(e,n))}for(;h<r.length;h+=1)r[h].d(1);r.length=s.length}if(d&32){a=c[5]||[];let h;for(h=0;h<a.length;h+=1){const u=Hc(c,a,h);l[h]?l[h].p(u,d):(l[h]=Xc(u),l[h].c(),l[h].m(e,null))}for(;h<l.length;h+=1)l[h].d(1);l.length=a.length}},d(c){c&&_(t),qt(r,c),qt(l,c),o()}}}function Nc(i){let t,e=i[0]+"",n;return{c(){t=z("div"),n=je(e),w(t,"class","tag primary-tag svelte-sezqcq"),T(t,"min-width",Ea)},m(o,s){V(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Oe(n,e)},d(o){o&&_(t)}}}function Xc(i){let t,e=i[0]+"",n;return{c(){t=z("div"),n=je(e),w(t,"class","tag secondary-tag svelte-sezqcq"),T(t,"min-width",Ea)},m(o,s){V(o,t,s),O(t,n)},p(o,s){s&32&&e!==(e=o[0]+"")&&Oe(n,e)},d(o){o&&_(t)}}}function Yc(i){let t,e,n=i[7]&&Uc(i),o=i[3].highlightText&&Jc(i);return{c(){t=z("div"),n&&n.c(),e=ne(),o&&o.c(),w(t,"class","footer svelte-sezqcq")},m(s,r){V(s,t,r),n&&n.m(t,null),O(t,e),o&&o.m(t,null)},p(s,r){s[7]?n?n.p(s,r):(n=Uc(s),n.c(),n.m(t,e)):n&&(n.d(1),n=null),s[3].highlightText?o?o.p(s,r):(o=Jc(s),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(s){s&&_(t),n&&n.d(),o&&o.d()}}}function Uc(i){let t,e,n=i[3].price.value+"",o,s,r=i[3].price.unit&&qc(i);return{c(){t=z("div"),e=z("span"),o=je(n),s=ne(),r&&r.c(),w(e,"class","value svelte-sezqcq"),w(t,"class","price svelte-sezqcq")},m(a,l){V(a,t,l),O(t,e),O(e,o),O(t,s),r&&r.m(t,null)},p(a,l){l&8&&n!==(n=a[3].price.value+"")&&Oe(o,n),a[3].price.unit?r?r.p(a,l):(r=qc(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&_(t),r&&r.d()}}}function qc(i){let t,e=i[3].price.unit+"",n;return{c(){t=z("span"),n=je(e),w(t,"class","unit svelte-sezqcq")},m(o,s){V(o,t,s),O(t,n)},p(o,s){s&8&&e!==(e=o[3].price.unit+"")&&Oe(n,e)},d(o){o&&_(t)}}}function Jc(i){let t,e,n,o,s=i[3].highlightText+"",r,a,l;return{c(){t=z("div"),e=z("div"),n=ne(),o=z("span"),r=je(s),a=ne(),l=z("div"),l.innerHTML='<svg class="arrow svelte-sezqcq" viewBox="0 0 6 9"><g transform="translate(-3, -2)" fill-rule="nonzero" class="svelte-sezqcq"><path d="M4.43868724,2.12056563 C4.28121824,1.95989074 4.02582143,1.95979988 3.86824251,2.1203627 C3.72498894,2.26632889 3.71189225,2.49481723 3.82900374,2.65587166 L6.57092402,5.92894326 C6.72651763,6.11470411 6.72651763,6.38529589 6.57092402,6.57105674 L3.86804348,9.79798499 C3.72488984,9.94405307 3.71194952,10.1725507 3.8291712,10.3335217 L3.86824251,10.3796373 C4.01149607,10.5256035 4.23559087,10.5387981 4.39346025,10.4192733 L4.43868724,10.3794344 L8.1144599,6.5985342 C8.30312347,6.40447482 8.30312347,6.09552518 8.1144599,5.9014658 L4.43868724,2.12056563 Z" class="svelte-sezqcq"></path></g></svg>',w(e,"class","gap svelte-sezqcq"),w(o,"class","text svelte-sezqcq"),w(t,"class","goto-button goto-icon svelte-sezqcq"),w(l,"class","arrow-wrapper svelte-sezqcq")},m(c,d){V(c,t,d),O(t,e),O(t,n),O(t,o),O(o,r),V(c,a,d),V(c,l,d)},p(c,d){d&8&&s!==(s=c[3].highlightText+"")&&Oe(r,s)},d(c){c&&_(t),c&&_(a),c&&_(l)}}}function Ew(i){var k,S;let t,e,n,o,s,r,a,l,c,d,h=i[3].title+"",u,m,v,g,A;e=new Rt({props:{visible:i[4],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let b=i[3].headerPictureUrl&&Fc(i),y=((k=i[2].length)!=null?k:0)+((S=i[5].length)!=null?S:0)>0&&Wc(i),E=(i[7]||i[3].highlightText)&&Yc(i);return{c(){t=z("div"),ie(e.$$.fragment),n=ne(),o=z("div"),s=ne(),r=z("div"),b&&b.c(),a=ne(),l=z("div"),c=z("div"),d=z("div"),u=je(h),m=ne(),y&&y.c(),v=ne(),E&&E.c(),w(o,"class","line svelte-sezqcq"),T(o,"transition-delay",i[4]?zo+"ms":jo+Kc-Zc-40+"ms"),w(d,"class","text svelte-sezqcq"),w(c,"class","title svelte-sezqcq"),w(l,"class","title-wrapper svelte-sezqcq"),w(r,"class","content svelte-sezqcq"),T(r,"max-width",Ot(i[9])),T(r,"transition-delay",i[4]?zo+jo+"ms":"0ms"),w(t,"class",g=Be(`marketing ${i[6]}`)+" svelte-sezqcq"),$(t,"unfolded",i[4]),$(t,"folded",i[8])},m(C,j){V(C,t,j),ee(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),b&&b.m(r,null),O(r,a),O(r,l),O(l,c),O(c,d),O(d,u),O(r,m),y&&y.m(r,null),O(r,v),E&&E.m(r,null),A=!0},p(C,[j]){var X,J;const M={};j&16&&(M.visible=C[4]),e.$set(M),j&16&&T(o,"transition-delay",C[4]?zo+"ms":jo+Kc-Zc-40+"ms"),C[3].headerPictureUrl?b?b.p(C,j):(b=Fc(C),b.c(),b.m(r,a)):b&&(b.d(1),b=null),(!A||j&8)&&h!==(h=C[3].title+"")&&Oe(u,h),((X=C[2].length)!=null?X:0)+((J=C[5].length)!=null?J:0)>0?y?y.p(C,j):(y=Wc(C),y.c(),y.m(r,v)):y&&(y.d(1),y=null),C[7]||C[3].highlightText?E?E.p(C,j):(E=Yc(C),E.c(),E.m(r,null)):E&&(E.d(1),E=null),j&16&&T(r,"transition-delay",C[4]?zo+jo+"ms":"0ms"),(!A||j&64&&g!==(g=Be(`marketing ${C[6]}`)+" svelte-sezqcq"))&&w(t,"class",g),(!A||j&80)&&$(t,"unfolded",C[4]),(!A||j&320)&&$(t,"folded",C[8])},i(C){A||(x(e.$$.fragment,C),A=!0)},o(C){L(e.$$.fragment,C),A=!1},d(C){C&&_(t),te(e),b&&b.d(),y&&y.d(),E&&E.d()}}}const Ea=40,zo=400,Zc=500,jo=180,Kc=500;function Iw(i,t,e){let n,o,s,r,a,l,c,d,{tag:h}=t,u,m=(()=>{var A;const g=(A=h.data.limitWidth)!=null?A:!0;if(typeof g=="number")return g;if(g===!0)return 172})();function v(){u=this.offsetHeight,e(1,u)}return i.$$set=g=>{"tag"in g&&e(0,h=g.tag)},i.$$.update=()=>{var g,A,b,y,E,k;i.$$.dirty&1&&e(4,n=(A=(g=h.state)==null?void 0:g.unfolded)!=null?A:!1),i.$$.dirty&16&&e(8,o=!n),i.$$.dirty&1&&e(3,s=h.data),i.$$.dirty&8&&e(7,r=ci((b=s.price)==null?void 0:b.value)&&((y=s.price)==null?void 0:y.value)!==""),i.$$.dirty&1&&e(6,a=h.data.theme||"light"),i.$$.dirty&1026&&u>40&&e(10,l=l-1),i.$$.dirty&1032&&e(2,c=((E=s.brandTags)==null?void 0:E.slice(0,l).filter(Boolean))||[]),i.$$.dirty&1036&&e(5,d=((k=s.tags)==null?void 0:k.slice(0,l-c.length).filter(Boolean))||[])},e(10,l=(m-20)/Ea),[h,u,c,s,n,d,a,r,o,m,l,v]}class kw extends ce{constructor(t){super(),le(this,t,Iw,Ew,ae,{tag:0},Cw)}}class xw extends Audio{constructor(e){super();f(this,"sharedAudioSrc");f(this,"sharedAudioPaused",!0);f(this,"sharedAudioCurrentTime",0);f(this,"tryplaying",!1);f(this,"audioInstance");f(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return Y(this,null,function*(){var n,o,s;if(this.tryplaying)return;this.tryplaying=!0,(!this.audioInstance||((n=this.audioInstance)==null?void 0:n.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=GA(this.sharedAudioSrc,{namespace:ga.PlayAudio})),(o=this.eventListenerDisposer)==null||o.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.currentTime=(s=this.currentTime)!=null?s:0;const e=this.audioInstance.currentTime!==this.currentTime;this.audioInstance.play().then(()=>{var r;this.audioInstance.muted=!1,e&&(this.audioInstance.currentTime=(r=this.currentTime)!=null?r:0),this.sharedAudioPaused=!1}).catch(r=>{var a;r.message==="The operation is not supported."?console.error("Error: 音频文件可能损坏或修改过文件后缀",r):console.error("Error: error playing media in Safari",r),this.endedHandler(),(a=this.onerror)==null||a.call(this,r)}).finally(()=>{this.tryplaying=!1})})}pause(e){var n;if(this.audioInstance&&!this.paused){if(this.sharedAudioPaused=!0,(n=this.eventListenerDisposer)==null||n.call(this),this.audioInstance.ended){this.endedHandler();return}this.audioInstance.paused||this.audioInstance.pause(),this.onpause(e!=null?e:new Event("pause")),this.clear()}}dispose(){var e;(e=this.eventListenerDisposer)==null||e.call(this),this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}endedHandler(e){var n,o;(n=this.onended)==null||n.call(this,e!=null?e:new Event("ended")),(o=this.eventListenerDisposer)==null||o.call(this),this.sharedAudioPaused=!0,this.sharedAudioCurrentTime=0,this.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const n=u=>{var m;this.sharedAudioCurrentTime=e.currentTime,(m=this.ontimeupdate)==null||m.call(this,u)},o=u=>{var m;e.isBlankAudio||(this.sharedAudioPaused=!1,(m=this.onplay)==null||m.call(this,u))},s=u=>{this.pause(u)},r=u=>{this.endedHandler(u)},a=u=>{var m;this.sharedAudioPaused=!0,(m=this.onerror)==null||m.call(this,u)},l=u=>{var m;return(m=this.oncanplay)==null?void 0:m.call(this,u)},c=u=>{var m;return(m=this.oncanplaythrough)==null?void 0:m.call(this,u)},d=u=>{var m;return(m=this.onloadeddata)==null?void 0:m.call(this,u)},h=u=>{var m;return(m=this.onloadedmetadata)==null?void 0:m.call(this,u)};return e.addEventListener("timeupdate",n),e.addEventListener("play",o),e.addEventListener("pause",s),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",d),e.addEventListener("loadedmetadata",h),()=>{e.removeEventListener("timeupdate",n),e.removeEventListener("play",o),e.removeEventListener("pause",s),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",d),e.removeEventListener("loadedmetadata",h)}}}function Dw(i){fe(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function Mw(i){let t,e,n,o;const s=i[8].default,r=hi(s,i,i[7],null);return{c(){t=z("div"),r&&r.c(),w(t,"class","audio svelte-13e7hxv"),w(t,"style",i[0])},m(a,l){V(a,t,l),r&&r.m(t,null),e=!0,n||(o=Ce(t,"click",Fd(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&fi(r,s,a,a[7],e?ui(s,a[7],l,null):mi(a[7]),null),(!e||l&1)&&w(t,"style",a[0])},i(a){e||(x(r,a),e=!0)},o(a){L(r,a),e=!1},d(a){a&&_(t),r&&r.d(a),n=!1,o()}}}function Sw(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=cs(),d=rn("hooks"),h=rn("mediaStore");let u,m=!0;function v(){e(5,u.onplay=A=>{d.emit("playStateChange",F({event:A,state:"playing",mediaInstance:u},l)),c("play"),e(6,m=!1)},u),e(5,u.onpause=A=>{d.emit("playStateChange",F({event:A,state:"paused",mediaInstance:u},l)),c("pause"),e(6,m=!0)},u),e(5,u.onended=A=>{d.emit("playStateChange",F({event:A,state:"paused",mediaInstance:u},l)),c("pause"),e(6,m=!0)},u),e(5,u.onloadedmetadata=A=>{typeof u.duration=="number"&&!Number.isNaN(u.duration)&&c("duration",u.duration)},u),e(5,u.onerror=A=>{c("pause"),e(6,m=!0)},u),e(5,u.ontimeupdate=A=>{c("timeupdate",u.currentTime)},u)}h.subscribe(({currentMediaElement:A})=>{A!==u&&(m||u==null||u.pause())});function g(A){u&&(d.emit("click",F({event:A,target:"AudioTagPlayIcon",audioInstance:u},l)),h.set({currentMediaElement:u}),d.emit("playStateChange",F({event:A,state:u.paused?"playing":"paused",mediaInstance:u},l)),u.paused?u.play():u.pause())}return i.$$set=A=>{"url"in A&&e(2,s=A.url),"enable"in A&&e(3,r=A.enable),"style"in A&&e(0,a=A.style),"hooksInfo"in A&&e(4,l=A.hooksInfo),"$$scope"in A&&e(7,o=A.$$scope)},i.$$.update=()=>{i.$$.dirty&4&&(s||c("duration",0)),i.$$.dirty&36&&(u==null||u.dispose(),e(5,u=new xw(s)),c("audioRef",u),setTimeout(()=>c("audioRef",u),200),v()),i.$$.dirty&40&&(r||u==null||u.pause()),i.$$.dirty&72&&c(r&&!m?"play":"pause")},[a,g,s,r,l,u,m,o,n]}let eu=class extends ce{constructor(t){super(),le(this,t,Sw,Mw,ae,{url:2,enable:3,style:0,hooksInfo:4},Dw)}};function Lw(i){fe(i,"svelte-srt2pi",".audio-icon__wrapper.svelte-srt2pi.svelte-srt2pi{display:inline-block}.audio-icon.svelte-srt2pi.svelte-srt2pi{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%;background-color:rgba(255, 255, 255, 0.8)}.audio-icon.svelte-srt2pi .sound-wave__container.svelte-srt2pi{position:absolute;pointer-events:none;width:60%;height:60%}.sound-wave.svelte-srt2pi.svelte-srt2pi{animation-duration:2s;animation-iteration-count:infinite;animation-play-state:paused;transition:opacity 0}.playing.svelte-srt2pi .sound-wave.svelte-srt2pi{animation-play-state:running}.playing.svelte-srt2pi .sound-wave-1.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_1_animation}.playing.svelte-srt2pi .sound-wave-2.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_2_animation}.playing.svelte-srt2pi .sound-wave-3.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_3_animation}@keyframes svelte-srt2pi-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function $c(i){let t,e;return t=new Rt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Tw(i){let t,e,n,o,s,r=i[1]&&$c();return{c(){t=z("div"),r&&r.c(),e=ne(),n=z("div"),o=z("div"),o.innerHTML='<svg width="100%" height="100%" viewBox="0 0 128 128"><g transform="rotate(-45 12 64) translate(12 64)" fill="black" stroke="black" fill-opacity="0.6" stroke-opacity="0.6"><path stroke="none" class="sound-wave sound-wave-1 svelte-srt2pi" d="M0,23 A23,23 0 0,0 23,0 L0,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-2 svelte-srt2pi" d="M0,46 A46,46 0 0,0 46,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-3 svelte-srt2pi" d="M0,80 A80,80 0 0,0 80,0"></path></g></svg>',w(o,"class","sound-wave__container svelte-srt2pi"),w(n,"class","audio-icon svelte-srt2pi"),$(n,"playing",i[0]),w(t,"class","audio-icon__wrapper svelte-srt2pi"),w(t,"style",i[2]),T(t,"width",i[5]),T(t,"height",i[5])},m(a,l){V(a,t,l),r&&r.m(t,null),O(t,e),O(t,n),O(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&x(r,1):(r=$c(),r.c(),x(r,1),r.m(t,e)):r&&(de(),L(r,1,1,()=>{r=null}),he()),(!s||l&1)&&$(n,"playing",a[0]),(!s||l&4)&&w(t,"style",a[2]);const c=l&4;(c||l&36)&&T(t,"width",a[5]),(c||l&36)&&T(t,"height",a[5])},i(a){s||(x(r),s=!0)},o(a){L(r),s=!1},d(a){a&&_(t),r&&r.d(),i[7](null),i[8](null)}}}function zw(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function d(u){Ke[u?"unshift":"push"](()=>{c=u,e(4,c)})}function h(u){Ke[u?"unshift":"push"](()=>{l=u,e(3,l)})}return i.$$set=u=>{"playing"in u&&e(0,o=u.playing),"shadow"in u&&e(1,s=u.shadow),"style"in u&&e(2,r=u.style),"width"in u&&e(6,a=u.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?Ot(a):a)},[o,s,r,l,c,n,a,d,h]}class tu extends ce{constructor(t){super(),le(this,t,zw,Tw,ae,{playing:0,shadow:1,style:2,width:6},Lw)}}function jw(i){fe(i,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function ed(i){var A,b;let t,e,n,o,s,r,a,l,c,d,h,u,m,v;e=new Rt({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&td(i);return c=new Qh({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),h=new va({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((b=(A=i[5])==null?void 0:A.length)!=null?b:10,15),useLinearColor:!0}}),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),o=z("div"),s=z("div"),r=z("div"),g&&g.c(),a=ne(),l=z("div"),ie(c.$$.fragment),d=ne(),ie(h.$$.fragment),w(r,"class","audio-icon svelte-1s6gk4a"),T(l,"display","inline-block"),w(s,"class","wrapper svelte-1s6gk4a"),w(o,"class","content svelte-1s6gk4a"),w(t,"class","audio-tag svelte-1s6gk4a"),$(t,"unfolded",i[6])},m(y,E){V(y,t,E),ee(e,t,null),O(t,n),O(t,o),O(o,s),O(s,r),g&&g.m(r,null),O(s,a),O(s,l),ee(c,l,null),O(t,d),ee(h,t,null),u=!0,m||(v=[Ce(l,"click",i[7]),Ut(vi.call(null,l)),Ce(l,"clientWidth",i[12])],m=!0)},p(y,E){var j,M;const k={};E&64&&(k.visible=y[6]),E&8&&(k.left=y[3]/2+"px"),e.$set(k),y[6]?g?(g.p(y,E),E&64&&x(g,1)):(g=td(y),g.c(),x(g,1),g.m(r,null)):g&&(de(),L(g,1,1,()=>{g=null}),he());const S={};E&64&&(S.visible=y[6]),E&2&&(S.textUnfolded=y[1]),E&32&&(S.content=y[5]),c.$set(S);const C={};E&64&&(C.unfolded=y[6]),E&8&&(C.length=y[3]),E&48&&(C.outDelay=y[4]+20*Math.min((M=(j=y[5])==null?void 0:j.length)!=null?M:10,15)),h.$set(C),(!u||E&64)&&$(t,"unfolded",y[6])},i(y){u||(x(e.$$.fragment,y),x(g),x(c.$$.fragment,y),x(h.$$.fragment,y),u=!0)},o(y){L(e.$$.fragment,y),L(g),L(c.$$.fragment,y),L(h.$$.fragment,y),u=!1},d(y){y&&_(t),te(e),g&&g.d(),te(c),te(h),m=!1,rt(v)}}}function td(i){let t,e,n,o,s,r,a;return e=new Rt({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new eu({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[_w]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("error",i[10]),o.$on("audioRef",i[11]),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),ie(o.$$.fragment),w(t,"class","audio svelte-1s6gk4a")},m(l,c){V(l,t,c),ee(e,t,null),O(t,n),ee(o,t,null),a=!0},p(l,c){i=l;const d={};c&64&&(d.enable=i[6]),c&1&&(d.url=i[0].data.audioUrl),c&1&&(d.hooksInfo={tag:i[0]}),c&8196&&(d.$$scope={dirty:c,ctx:i}),o.$set(d)},i(l){a||(x(e.$$.fragment,l),x(o.$$.fragment,l),l&&ot(()=>{a&&(r&&r.end(1),s=Dn(t,In,{duration:1e3,delay:0,easing:oi}),s.start())}),a=!0)},o(l){var c,d;L(e.$$.fragment,l),L(o.$$.fragment,l),s&&s.invalidate(),l&&(r=gi(t,In,{duration:1e3,delay:20*Math.min((d=(c=i[5])==null?void 0:c.length)!=null?d:10,15),easing:oi})),a=!1},d(l){l&&_(t),te(e),te(o),l&&r&&r.end()}}}function _w(i){let t,e,n;return e=new tu({props:{playing:i[2]}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){V(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s&4&&(r.playing=o[2]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&_(t),te(e)}}}function Vw(i){let t,e,n=i[0].state&&ed(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=ed(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function Ow(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function d(){e(1,a=!a)}const h=()=>{e(2,l=!0)},u=()=>{e(2,l=!1)},m=()=>{e(2,l=!1)};function v(A){pi.call(this,i,A)}const g=A=>{e(3,c=A.detail)};return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,b,y;i.$$.dirty&1&&e(6,n=!!((A=r.state)!=null&&A.unfolded)),i.$$.dirty&1&&e(5,o=(y=(b=r.data.title)!=null?b:r.data.text)!=null?y:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,d,h,u,m,v,g]}class Bw extends ce{constructor(t){super(),le(this,t,Ow,Vw,ae,{tag:0},jw)}}function Rw(i){fe(i,"svelte-58hfjf",".audio-tag__wrapper.svelte-58hfjf{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-58hfjf{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.1875rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.03125rem solid rgba(255, 255, 255, 0.2)}.audio__inner.svelte-58hfjf{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-58hfjf{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-58hfjf{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function nd(i){let t,e,n,o;return n=new eu({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[Hw]},$$scope:{ctx:i}}}),n.$on("play",i[6]),n.$on("pause",i[7]),n.$on("error",i[8]),n.$on("timeupdate",i[9]),n.$on("duration",i[10]),n.$on("audioRef",i[11]),{c(){t=z("div"),e=z("div"),ie(n.$$.fragment),w(e,"class","audio-tag svelte-58hfjf"),T(e,"background-color",i[4].bgColor),T(e,"color",i[4].fontColor),w(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){V(s,t,r),O(t,e),ee(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.enable=s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&8232&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&16&&T(e,"background-color",s[4].bgColor),r&16&&T(e,"color",s[4].fontColor)},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){L(n.$$.fragment,s),o=!1},d(s){s&&_(t),te(n)}}}function Qw(i){let t;return{c(){t=je(i[5])},m(e,n){V(e,t,n)},p(e,n){n&32&&Oe(t,e[5])},d(e){e&&_(t)}}}function Hw(i){let t,e,n,o,s,r,a;return n=new tu({props:{playing:i[3]}}),r=new Aa({props:{maxWidth:72,$$slots:{default:[Qw]},$$scope:{ctx:i}}}),{c(){t=z("div"),e=z("div"),ie(n.$$.fragment),o=ne(),s=z("div"),ie(r.$$.fragment),w(e,"class","audio-icon__wrapper svelte-58hfjf"),w(s,"class","text svelte-58hfjf"),w(t,"class","audio__inner svelte-58hfjf")},m(l,c){V(l,t,c),O(t,e),ee(n,e,null),O(t,o),O(t,s),ee(r,s,null),a=!0},p(l,c){const d={};c&8&&(d.playing=l[3]),n.$set(d);const h={};c&8224&&(h.$$scope={dirty:c,ctx:l}),r.$set(h)},i(l){a||(x(n.$$.fragment,l),x(r.$$.fragment,l),a=!0)},o(l){L(n.$$.fragment,l),L(r.$$.fragment,l),a=!1},d(l){l&&_(t),te(n),te(r)}}}function Gw(i){let t,e,n=i[0].state&&nd(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=nd(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function Fw(i,t,e){let n,o,{tag:s}=t;const r={light:{bgColor:"rgba(255, 255, 255, 0.3)",fontColor:"rgba(0, 0, 0, 0.6)"},dark:{bgColor:"rgba(0, 0, 0, 0.3)",fontColor:"white"}};let a=0,l=0,c=!1;const d=()=>{e(3,c=!0)},h=()=>{e(3,c=!1)},u=()=>{e(3,c=!1)},m=A=>{e(1,a=A.detail)},v=A=>{e(2,l=A.detail)};function g(A){pi.call(this,i,A)}return i.$$set=A=>{"tag"in A&&e(0,s=A.tag)},i.$$.update=()=>{var A,b,y;i.$$.dirty&1&&e(5,n=(b=(A=s.data.title)!=null?A:s.data.text)!=null?b:""),i.$$.dirty&1&&e(4,o=(y=r[s.data.theme||"light"])!=null?y:r.light)},[s,a,l,c,o,n,d,h,u,m,v,g]}class Ww extends ce{constructor(t){super(),le(this,t,Fw,Gw,ae,{tag:0},Rw)}}function Nw(i){let t,e;return t=new Ww({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Xw(i){let t,e;return t=new Bw({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Yw(i){let t,e,n,o;const s=[Xw,Nw],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=Ee()},m(l,c){~t&&r[t].m(l,c),V(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(de(),L(r[d],1,1,()=>{r[d]=null}),he()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(x(e),o=!0)},o(l){L(e),o=!1},d(l){~t&&r[t].d(l),l&&_(n)}}}function Uw(i,t,e){let n,{tag:o}=t,s;function r(a){s=a.detail}return o.play=()=>s.play(),o.pause=()=>s.pause(),i.$$set=a=>{"tag"in a&&e(0,o=a.tag)},i.$$.update=()=>{var a;i.$$.dirty&1&&e(1,n=(a=o.data.appearance)!=null?a:"line")},[o,n,r]}class qw extends ce{constructor(t){super(),le(this,t,Uw,Yw,ae,{tag:0})}}function Jw(i){fe(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function id(i){var o;let t,e,n;return e=new $h({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(o=i[4])!=null?o:"withText",disableVideoIfHavePoster:!1,objectFit:i[2]},unfolded:i[6],mediaData:i[5],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],inDelay:500,duration:500}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","media-wrapper svelte-10cw0el")},m(s,r){V(s,t,r),ee(e,t,null),n=!0},p(s,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=s[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:s[2]}),r&64&&(a.unfolded=s[6]),r&32&&(a.mediaData=s[5]),r&2&&(a.enableCarousel=s[1]),r&8&&(a.autoplayConfig=s[3]),r&1&&(a.tag=s[0]),e.$set(a)},i(s){n||(x(e.$$.fragment,s),n=!0)},o(s){L(e.$$.fragment,s),n=!1},d(s){s&&_(t),te(e)}}}function Zw(i){let t,e,n=i[0].state&&i[5]&&id(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&x(n,1)):(n=id(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function Kw(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=d=>{"tag"in d&&e(0,c=d.tag)},i.$$.update=()=>{var d,h;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(d=c.data.autoplayConfig)!=null?d:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(h=c.data.objectFit)!=null?h:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class $w extends ce{constructor(t){super(),le(this,t,Kw,Zw,ae,{tag:0},Jw)}}function nu(i){return Y(this,null,function*(){return new Promise((t,e)=>{if(!i){e(Error("url is empty"));return}const n=new Image;n.src=i,n.onload=()=>t({width:n.width,height:n.height}),n.onerror=e})})}function eP(i){return Y(this,null,function*(){const{url:t,ratio:e=3}=i;i.ratio||console.warn("Tag icon ratio is not set, default is 3");const{width:n,height:o}=yield nu(t);return ye(F({},i),{width:n/e,height:o/e})})}function tP(i){return Y(this,null,function*(){const{steps:t,url:e,ratio:n=3,fps:o=24}=i;if(!t)throw new Error("KeyframeIcon requires steps");const{width:s,height:r}=yield nu(e),a=s/n,l=r/n,c=a/t,d=l,h=1/o*t+"s";return ye(F({},i),{width:c,height:d,duration:h})})}function nP(i){fe(i,"svelte-316sq3","@keyframes svelte-316sq3-sprites-animation{0%{background-position:0 0}100%{background-position:100% 0}}.icon-image.svelte-316sq3{display:block;width:auto}.icon-keyframe.svelte-316sq3{background-repeat:no-repeat;background-size:auto 100%;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-316sq3-sprites-animation;animation-delay:0}")}function od(i){i[1]=i[19].width}function sd(i){i[1]=i[19].width,i[16]=i[19].height,i[17]=i[19].steps,i[18]=i[19].duration}function rd(i){let t,e,n,o=i[0]&&ad();function s(l,c){return l[8]?oP:iP}let r=s(i),a=r(i);return{c(){t=z("div"),o&&o.c(),e=ne(),a.c(),w(t,"class","icon"),T(t,"width",i[1])},m(l,c){V(l,t,c),o&&o.m(t,null),O(t,e),a.m(t,null),n=!0},p(l,c){l[0]?o?c&1&&x(o,1):(o=ad(),o.c(),x(o,1),o.m(t,e)):o&&(de(),L(o,1,1,()=>{o=null}),he()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&2&&T(t,"width",l[1])},i(l){n||(x(o),n=!0)},o(l){L(o),n=!1},d(l){l&&_(t),o&&o.d(),a.d()}}}function ad(i){let t,e;return t=new Rt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function iP(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:aP,then:rP,catch:sP,value:19};return Xo(e=i[11](He({url:i[7],ratio:i[5]})),n),{c(){t=Ee(),n.block.c()},m(o,s){V(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&160&&e!==(e=i[11](He({url:i[7],ratio:i[5]})))&&Xo(e,n)||$d(n,i,s)},d(o){o&&_(t),n.block.d(o),n.token=null,n=null}}}function oP(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:dP,then:cP,catch:lP,value:19};return Xo(e=i[10](He({url:i[7],steps:i[2],fps:i[6],ratio:i[5]})),n),{c(){t=Ee(),n.block.c()},m(o,s){V(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&228&&e!==(e=i[10](He({url:i[7],steps:i[2],fps:i[6],ratio:i[5]})))&&Xo(e,n)||$d(n,i,s)},d(o){o&&_(t),n.block.d(o),n.token=null,n=null}}}function sP(i){return{c:K,m:K,p:K,d:K}}function rP(i){od(i);let t,e;return{c(){t=z("img"),w(t,"alt","tag-icon"),w(t,"class","icon-image svelte-316sq3"),wt(t.src,e=i[7])||w(t,"src",e),T(t,"width",Ot(Jn({originWidth:i[1],scale:i[4],wantedWidth:i[3]}).width))},m(n,o){V(n,t,o)},p(n,o){od(n),o&128&&!wt(t.src,e=n[7])&&w(t,"src",e),o&184&&T(t,"width",Ot(Jn({originWidth:n[1],scale:n[4],wantedWidth:n[3]}).width))},d(n){n&&_(t)}}}function aP(i){return{c:K,m:K,p:K,d:K}}function lP(i){return{c:K,m:K,p:K,d:K}}function cP(i){sd(i);let t,e=`url(${i[7]})`,n=`steps(${i[17]}, jump-none)`;return{c(){t=z("div"),w(t,"class","icon-keyframe svelte-316sq3"),T(t,"width",Ot(Jn({originWidth:i[1],originHeight:i[16],scale:i[4],wantedWidth:i[3]}).width)),T(t,"height",Ot(Jn({originWidth:i[1],originHeight:i[16],scale:i[4],wantedWidth:i[3]}).height)),T(t,"background-image",e),T(t,"animation-duration",i[18]),T(t,"animation-timing-function",n)},m(o,s){V(o,t,s)},p(o,s){sd(o),s&252&&T(t,"width",Ot(Jn({originWidth:o[1],originHeight:o[16],scale:o[4],wantedWidth:o[3]}).width)),s&252&&T(t,"height",Ot(Jn({originWidth:o[1],originHeight:o[16],scale:o[4],wantedWidth:o[3]}).height)),s&128&&e!==(e=`url(${o[7]})`)&&T(t,"background-image",e),s&228&&T(t,"animation-duration",o[18]),s&228&&n!==(n=`steps(${o[17]}, jump-none)`)&&T(t,"animation-timing-function",n)},d(o){o&&_(t)}}}function dP(i){return{c:K,m:K,p:K,d:K}}function hP(i){let t,e,n=i[9]&&rd(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[9]?n?(n.p(o,s),s&512&&x(n,1)):(n=rd(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function Jn(i){const{originWidth:t,originHeight:e,scale:n=1,wantedWidth:o}=i,s=(o!=null?o:t)*n,r=typeof e=="number"?s*(e/t):void 0;return ye(F({},i),{width:s,height:r})}function uP(i,t,e){let n,o,s,r,a,l,c,d,h,{width:u=null}=t,{icon:m=null}=t,{shadow:v=!1}=t;const g=cs();function A(E){return Y(this,null,function*(){const k=yield tP(E);return g("iconLoaded",k),k})}function b(E){return Y(this,null,function*(){if(typeof h=="number")return ye(F({},E),{width:h});const k=yield eP(E);return g("iconLoaded",k),k})}function y(){d||g("iconLoaded")}return Mt(()=>{y()}),i.$$set=E=>{"width"in E&&e(1,u=E.width),"icon"in E&&e(12,m=E.icon),"shadow"in E&&e(0,v=E.shadow)},i.$$.update=()=>{var E,k;i.$$.dirty&4096&&e(7,n=m==null?void 0:m.url),i.$$.dirty&4096&&e(2,o=(E=m==null?void 0:m.steps)!=null?E:1),i.$$.dirty&4096&&e(6,s=m==null?void 0:m.fps),i.$$.dirty&4096&&e(5,r=m==null?void 0:m.ratio),i.$$.dirty&4096&&e(4,a=(k=m==null?void 0:m.scale)!=null?k:1),i.$$.dirty&4096&&e(3,l=m==null?void 0:m.width),i.$$.dirty&252&&e(9,c=He({url:n,steps:o,fps:s,ratio:r,scale:a,width:l})),i.$$.dirty&4&&e(8,d=o>1),i.$$.dirty&2&&(h=u)},y(),[v,u,o,l,a,r,s,n,d,c,A,b,m]}class iu extends ce{constructor(t){super(),le(this,t,uP,hP,ae,{width:1,icon:12,shadow:0},nP)}}function fP(i){fe(i,"svelte-e58ijk",".wrapper.svelte-e58ijk{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}.text-wrapper.svelte-e58ijk{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-e58ijk{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function ld(i){let t,e,n,o,s,r;return e=new Rt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),o=z("div"),s=je(i[1]),w(o,"class","text svelte-e58ijk"),w(t,"class","text-wrapper svelte-e58ijk")},m(a,l){V(a,t,l),ee(e,t,null),O(t,n),O(t,o),O(o,s),r=!0},p(a,l){(!r||l&2)&&Oe(s,a[1])},i(a){r||(x(e.$$.fragment,a),r=!0)},o(a){L(e.$$.fragment,a),r=!1},d(a){a&&_(t),te(e)}}}function mP(i){let t,e,n,o;e=new iu({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[4]);let s=i[1]&&i[2]&&ld(i);return{c(){t=z("div"),ie(e.$$.fragment),n=ne(),s&&s.c(),w(t,"class","wrapper svelte-e58ijk")},m(r,a){V(r,t,a),ee(e,t,null),O(t,n),s&&s.m(t,null),o=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[1]&&r[2]?s?(s.p(r,a),a&6&&x(s,1)):(s=ld(r),s.c(),x(s,1),s.m(t,null)):s&&(de(),L(s,1,1,()=>{s=null}),he())},i(r){o||(x(e.$$.fragment,r),x(s),o=!0)},o(r){L(e.$$.fragment,r),L(s),o=!1},d(r){r&&_(t),te(e),s&&s.d()}}}function pP(i,t,e){let n,o,s,{tag:r}=t;const a=()=>{e(2,n=!0)};return i.$$set=l=>{"tag"in l&&e(3,r=l.tag)},i.$$.update=()=>{var l,c,d;i.$$.dirty&8&&e(1,o=(l=r.data.title)!=null?l:r.data.text),i.$$.dirty&8&&e(0,s=(d=r.data.icon)!=null?d:(c=r.style)==null?void 0:c.point)},e(2,n=!1),[s,o,n,r,a]}class gP extends ce{constructor(t){super(),le(this,t,pP,mP,ae,{tag:3},fP)}}function vP(i){fe(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function AP(i){let t,e;return{c(){t=new Go(!1),e=Ee(),t.a=e},m(n,o){t.m(i[2],n,o),V(n,e,o)},p:K,d(n){n&&_(e),n&&t.d()}}}function bP(i){let t,e=typeof i[2]=="string"&&AP(i);return{c(){t=z("div"),e&&e.c(),w(t,"class","customElement__container svelte-kzl2aj"),$(t,"unfolded",i[1])},m(n,o){V(n,t,o),e&&e.m(t,null),i[5](t)},p(n,[o]){typeof n[2]=="string"&&e.p(n,o),o&2&&$(t,"unfolded",n[1])},i:K,o:K,d(n){n&&_(t),e&&e.d(),i[5](null)}}}function yP(i,t,e){var d,h;let n,{tag:o}=t,{renderMap:s=new Map}=t,r,a=(h=o.element)!=null?h:(d=s.get(o.contentType))==null?void 0:d.renderer,l;Mt(()=>{r&&(a instanceof Element?(r.appendChild(a),l=()=>{a instanceof Element&&a.remove()}):typeof a=="function"&&(l=a(r,o)))}),hn(()=>{l==null||l()});function c(u){Ke[u?"unshift":"push"](()=>{r=u,e(0,r)})}return i.$$set=u=>{"tag"in u&&e(3,o=u.tag),"renderMap"in u&&e(4,s=u.renderMap)},i.$$.update=()=>{i.$$.dirty&8&&e(1,n=o.state.unfolded)},[r,n,a,o,s,c]}class wP extends ce{constructor(t){super(),le(this,t,yP,bP,ae,{tag:3,renderMap:4},vP)}}function PP(i){fe(i,"svelte-1r4fqvg",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJG1heHAASVAAAAAArAAAAAZuYW1lqczkZQAAApQAAAJecG9zdP+4ADIAAAZwAAAAIAAAUAAASQAAAAEAAAABAADkeHeyXw889QADA+gAAAAA2NoRKwAAAADY2hErACn/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlg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YETlu7yMe8vcfHvVlPT1laTx8OmIr5UQG/+B8D93iKFfsIBvdo+OYF+6T2+B8oBg6iifL3bPX3QPEStvNB8vc/8jXxE/L4EvgHFRPss7Cnu78arYOreqgexWpNr0YbaWyDem4fUmlmTUcaXqBftGAeE/JWYmROSxpklWieax5Ksc9i2BuxrpWerB/LsbTP2BrHaMVath4T7PsN93QVu7FjXFtlZltcZbC7urGzuh8T8oX8ghVPW7zHx7q6yMa9W1BPWVpQHw6i96Tz92/0AbTz93DzA/hp+HkVsIGveKwezmNFtUAbZGeBeGofSmNiRT8aZJVnnmseSrHPYtoboAb7EvukBfcHBvdL+CEFmaySqaQa+9gWxry+yJ6dhoGcHq12oWZmGk5YW1BMXLnKHg4gCiEK+11L91IlCvdiyhWtb6hpJgoeJAoOIQogCqz3pe/3b/UBufX3bfQD+G74dxWyga94rB7NZEW0PhtlaIF4ah9KY2FFPxo7tkTPZh6MjIqKjB+TiJCIjYoIjgaCoKGHoRuanY6QoB+IgfsB+6QF9wcG9y/4IgWYppGnqhr7a/sCFVBbvMjHu7zGyLxbTk5aWk4fDvtd+AojCoz7jBUmCh8kCq1vqGkeDvtdi/cS94wjCvwKBCIKDiD3ru8BvPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-1r4fqvg{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-1r4fqvg{transition:opacity 0.3s linear}.content__container.unClickable.svelte-1r4fqvg{pointer-events:none !important}.content__container.unClickable.svelte-1r4fqvg *{pointer-events:none !important}.content__wrapper.svelte-1r4fqvg{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-1r4fqvg{opacity:0;pointer-events:none}.content__container.hide.svelte-1r4fqvg *{pointer-events:none !important}.content__container.disable.svelte-1r4fqvg{display:none}.content.svelte-1r4fqvg{position:relative;width:100%;height:100%;font-size:0.75rem;color:#fff}.content.svelte-1r4fqvg:not(.unfolded){pointer-events:none}.content.svelte-1r4fqvg:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-1r4fqvg{pointer-events:auto}')}function CP(i){let t,e;return{c(){t=z("div"),w(t,"data-info","tag content is keep folded"),w(t,"data-id",e=i[1].id)},m(n,o){V(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&w(t,"data-id",e)},i:K,o:K,d(n){n&&_(t)}}}function EP(i){let t,e,n,o,s,r,a,l,c,d;const h=[LP,SP,MP,DP,xP,kP],u=[];function m(v,g){return v[1].contentType==="Text"?0:v[1].contentType==="ImageText"||v[1].contentType==="Image"||v[1].contentType==="Video"?1:v[1].contentType==="Audio"?2:v[1].contentType==="Marketing"?3:v[1].contentType==="Link"||v[1].contentType==="VRLink"||v[1].contentType==="PanoLink"||v[1].contentType==="Sticker"?4:v[1].contentType==="MediaPlane"||v[1].contentType==="MediaModel"?5:-1}return~(o=m(i))&&(s=u[o]=h[o](i)),{c(){var v;t=z("div"),e=z("div"),n=z("div"),s&&s.c(),w(n,"class","content svelte-1r4fqvg"),$(n,"unfolded",(v=i[1].state)==null?void 0:v.unfolded),w(e,"class","content__wrapper svelte-1r4fqvg"),w(t,"class",r=Be(it("content__container",i[1].className))+" svelte-1r4fqvg"),w(t,"data-id",a=i[1].id),$(t,"disable",i[1].enabled===!1),$(t,"hide",i[5]),$(t,"withAnimation",i[0]),$(t,"unClickable",i[1].config.clickable===!1),T(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),T(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(v,g){V(v,t,g),O(t,e),O(e,n),~o&&u[o].m(n,null),l=!0,c||(d=Ce(t,"click",Fd(i[15])),c=!0)},p(v,g){var b;let A=o;o=m(v),o===A?~o&&u[o].p(v,g):(s&&(de(),L(u[A],1,1,()=>{u[A]=null}),he()),~o?(s=u[o],s?s.p(v,g):(s=u[o]=h[o](v),s.c()),x(s,1),s.m(n,null)):s=null),(!l||g&2)&&$(n,"unfolded",(b=v[1].state)==null?void 0:b.unfolded),(!l||g&2&&r!==(r=Be(it("content__container",v[1].className))+" svelte-1r4fqvg"))&&w(t,"class",r),(!l||g&2&&a!==(a=v[1].id))&&w(t,"data-id",a),(!l||g&2)&&$(t,"disable",v[1].enabled===!1),(!l||g&34)&&$(t,"hide",v[5]),(!l||g&3)&&$(t,"withAnimation",v[0]),(!l||g&2)&&$(t,"unClickable",v[1].config.clickable===!1),g&2&&T(t,"width",v[1].stickType==="Plane"||v[1].contentType==="MediaModel"?"100%":0),g&2&&T(t,"height",v[1].stickType==="Plane"||v[1].contentType==="MediaModel"?"100%":0)},i(v){l||(x(s),l=!0)},o(v){L(s),l=!1},d(v){v&&_(t),~o&&u[o].d(),c=!1,d()}}}function IP(i){let t,e,n,o,s,r,a;return e=new wP({props:{tag:He(i[1]),renderMap:i[3]}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class",n=Be(it("content__container",i[1].className))+" svelte-1r4fqvg"),w(t,"data-id",o=i[1].id),$(t,"custom-tag-disable",i[1].enabled===!1),$(t,"custom-tag-hide",i[5])},m(l,c){V(l,t,c),ee(e,t,null),s=!0,r||(a=Ce(t,"click",i[14]),r=!0)},p(l,c){const d={};c&2&&(d.tag=He(l[1])),c&8&&(d.renderMap=l[3]),e.$set(d),(!s||c&2&&n!==(n=Be(it("content__container",l[1].className))+" svelte-1r4fqvg"))&&w(t,"class",n),(!s||c&2&&o!==(o=l[1].id))&&w(t,"data-id",o),(!s||c&2)&&$(t,"custom-tag-disable",l[1].enabled===!1),(!s||c&34)&&$(t,"custom-tag-hide",l[5])},i(l){s||(x(e.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),s=!1},d(l){l&&_(t),te(e),r=!1,a()}}}function kP(i){let t,e;return t=new $w({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function xP(i){let t,e;return t=new gP({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function DP(i){let t,e;return t=new kw({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function MP(i){let t,e;return t=new qw({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function SP(i){let t,e;return t=new Pw({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function LP(i){let t,e;return t=new Hb({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function TP(i){let t,e,n,o,s;const r=[IP,EP,CP],a=[];function l(c,d){return d&10&&(t=null),t==null&&(t=!!(c[1].element||c[3].has(c[1].contentType))),t?0:c[4]?1:2}return e=l(i,-1),n=a[e]=r[e](i),{c(){n.c(),o=Ee()},m(c,d){a[e].m(c,d),V(c,o,d),s=!0},p(c,[d]){let h=e;e=l(c,d),e===h?a[e].p(c,d):(de(),L(a[h],1,1,()=>{a[h]=null}),he(),n=a[e],n?n.p(c,d):(n=a[e]=r[e](c),n.c()),x(n,1),n.m(o.parentNode,o))},i(c){s||(x(n),s=!0)},o(c){L(n),s=!1},d(c){a[e].d(c),c&&_(o)}}}function zP(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:d}=t,{hooks:h}=t,{renderMap:u=new Map}=t,{state:m}=t,{mediaStore:v}=t,{temporaryState:g}=t;Vr("hooks",h),Vr("mediaStore",v);let A,b;function y(C){C?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}function E(C,j,M){var X,J;return!(!j.visible||!j.enabled||!M.visible||!((X=C.state)!=null&&X.visible)||((J=C.temporaryState)==null?void 0:J.visible)===!1||pt(C)&&!C.mediaVisible)}const k=C=>h.emit("click",{event:C,target:"TagContent",tag:d}),S=C=>h.emit("click",{event:C,target:"TagContent",tag:d});return i.$$set=C=>{"withAnimation"in C&&e(0,c=C.withAnimation),"tag"in C&&e(1,d=C.tag),"hooks"in C&&e(2,h=C.hooks),"renderMap"in C&&e(3,u=C.renderMap),"state"in C&&e(6,m=C.state),"mediaStore"in C&&e(7,v=C.mediaStore),"temporaryState"in C&&e(8,g=C.temporaryState)},i.$$.update=()=>{var C,j,M,X,J,H,Q,G,B,W,q;i.$$.dirty&2&&e(12,n=(C=d.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(11,o=(j=d.state)==null?void 0:j.visible),i.$$.dirty&322&&e(13,s=m.visible&&g.visible&&((M=d.state)==null?void 0:M.visible)),i.$$.dirty&2&&(r=d.id),i.$$.dirty&322&&e(5,a=!E(d,m,g)),i.$$.dirty&8192&&y(s),i.$$.dirty&7682&&d.hooks&&(n!==void 0&&n!==b&&(e(10,b=n),n?(J=(X=d.hooks).emit)==null||J.call(X,"unfolded"):(Q=d==null?void 0:(H=d.hooks).emit)==null||Q.call(H,"folded")),o!==void 0&&o!==A&&(e(9,A=o),o?(B=(G=d.hooks).emit)==null||B.call(G,"show"):(q=(W=d.hooks).emit)==null||q.call(W,"hide"))),i.$$.dirty&2&&e(4,l=(()=>!(typeof d.config.unfoldedConfig=="object"&&d.config.unfoldedConfig.keep==="folded"))())},[c,d,h,u,l,a,m,v,g,A,b,o,n,s,k,S]}let ou=class extends ce{constructor(t){super(),le(this,t,zP,TP,ae,{withAnimation:0,tag:1,hooks:2,renderMap:3,state:6,mediaStore:7,temporaryState:8},PP)}};function jP(i){fe(i,"svelte-7aiuwz",'@charset "UTF-8";.tag-point-click-helper.svelte-7aiuwz.svelte-7aiuwz{position:absolute;pointer-events:auto;cursor:pointer;width:calc(100% + 0.75rem);height:calc(100% + 0.75rem);left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-7aiuwz.svelte-7aiuwz{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-folded-point.svelte-7aiuwz.svelte-7aiuwz,.tag-unfolded-point.svelte-7aiuwz.svelte-7aiuwz{transition:all 0.5s}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-7aiuwz .tag-folded-point.svelte-7aiuwz{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-7aiuwz .tag-folded-point.svelte-7aiuwz{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{opacity:1;scale:1}')}function _P(i){let t,e,n,o,s,r,a,l,c,d,h,u;return o=new Rt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new iu({props:{icon:i[2],width:i[1]}}),c.$on("iconLoaded",i[7]),{c(){t=z("div"),e=z("div"),n=ne(),ie(o.$$.fragment),s=ne(),r=z("div"),a=ne(),l=z("div"),ie(c.$$.fragment),w(e,"class","tag-point-click-helper svelte-7aiuwz"),w(r,"class","tag-unfolded-point svelte-7aiuwz"),T(r,"transition-delay",(i[3]?i[5]:0)+"ms"),w(l,"class","tag-folded-point svelte-7aiuwz"),T(l,"transition-delay",(i[3]?i[5]:0)+"ms"),w(t,"class","tag-point-wrapper svelte-7aiuwz"),$(t,"unfolded",i[0]),$(t,"folded",i[3])},m(m,v){V(m,t,v),O(t,e),O(t,n),ee(o,t,null),O(t,s),O(t,r),O(t,a),O(t,l),ee(c,l,null),d=!0,h||(u=Ce(e,"click",i[4]),h=!0)},p(m,[v]){v&8&&T(r,"transition-delay",(m[3]?m[5]:0)+"ms");const g={};v&4&&(g.icon=m[2]),v&2&&(g.width=m[1]),c.$set(g),v&8&&T(l,"transition-delay",(m[3]?m[5]:0)+"ms"),(!d||v&1)&&$(t,"unfolded",m[0]),(!d||v&8)&&$(t,"folded",m[3])},i(m){d||(x(o.$$.fragment,m),x(c.$$.fragment,m),d=!0)},o(m){L(o.$$.fragment,m),L(c.$$.fragment,m),d=!1},d(m){m&&_(t),te(o),te(c),h=!1,u()}}}function VP(i,t,e){let n,o,s,r;const a=rn("hooks");let{tag:l}=t,c,d=!1;const h=()=>{c!==void 0&&clearTimeout(c),d=!0,c=setTimeout(()=>{d=!1},800)},u=g=>{d||a.emit("click",{event:g,target:"TagPoint",tag:l})},m=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();function v(g){pi.call(this,i,g)}return i.$$set=g=>{"tag"in g&&e(6,l=g.tag)},i.$$.update=()=>{var g,A,b,y;i.$$.dirty&64&&e(0,n=(g=l.state)==null?void 0:g.unfolded),i.$$.dirty&1&&e(3,o=!n),i.$$.dirty&64&&e(2,s=(b=(A=l.style)==null?void 0:A.point)!=null&&b.url?(y=l.style)==null?void 0:y.point:{url:ZA}),i.$$.dirty&64&&e(1,r=(()=>{var S,C,j,M;const E=(C=(S=l.style)==null?void 0:S.point)==null?void 0:C.width;if(typeof E=="number")return E;const k=(M=(j=l.style)==null?void 0:j.point)==null?void 0:M.size;if(typeof k=="number")return k;if(k==="S")return 18;if(k==="M")return 20;if(k==="L")return 24;if(k==="XL")return 28})())},h(),[n,r,s,o,u,m,l,v]}class OP extends ce{constructor(t){super(),le(this,t,VP,_P,ae,{tag:6},jP)}}function BP(i){fe(i,"svelte-pzwdws",".tag.withAnimation.svelte-pzwdws{transition:opacity 0.3s linear}.tag.hide.svelte-pzwdws{opacity:0;pointer-events:none}.tag.hide.svelte-pzwdws *{pointer-events:none !important}.tag.unClickable.svelte-pzwdws{pointer-events:none !important}.tag.unClickable.svelte-pzwdws *{pointer-events:none !important}.tag.disable.svelte-pzwdws{display:none}.wrapper.svelte-pzwdws{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function RP(i){let t;return{c(){t=z("div"),w(t,"data-info","tag point is disable")},m(e,n){V(e,t,n)},p:K,i:K,o:K,d(e){e&&_(t)}}}function QP(i){let t,e;return t=new OP({props:{tag:i[1]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function HP(i){let t;return{c(){t=z("div"),w(t,"data-info","tag content is disable")},m(e,n){V(e,t,n)},p:K,i:K,o:K,d(e){e&&_(t)}}}function GP(i){let t,e;return t=new ou({props:{mediaStore:i[2],withAnimation:i[0],tag:He(i[1]),hooks:i[15],state:i[4],temporaryState:i[5],renderMap:i[3]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&4&&(s.mediaStore=n[2]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=He(n[1])),o&16&&(s.state=n[4]),o&32&&(s.temporaryState=n[5]),o&8&&(s.renderMap=n[3]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function FP(i){let t,e,n,o,s,r,a,l,c,d;const h=[QP,RP],u=[];function m(b,y){return b[14]?0:1}n=m(i),o=u[n]=h[n](i);const v=[GP,HP],g=[];function A(b,y){return b[13]?0:1}return r=A(i),a=g[r]=v[r](i),{c(){t=z("div"),e=z("div"),o.c(),s=ne(),a.c(),w(e,"class",l=Be(it("wrapper",i[1].className?`${i[1].className}__wrapper`:void 0))+" svelte-pzwdws"),w(e,"data-tag-unfolded",i[6]),w(e,"data-tag-id",i[12]),w(e,"data-content-type",c=i[1].contentType),T(e,"left",i[9]),T(e,"top",i[8]),w(t,"class","tag svelte-pzwdws"),w(t,"data-tag-id",i[12]),$(t,"unClickable",i[1].config.clickable===!1),$(t,"disable",i[11]),$(t,"hide",i[10]),$(t,"withAnimation",i[0]),T(t,"z-index",i[7])},m(b,y){V(b,t,y),O(t,e),u[n].m(e,null),O(e,s),g[r].m(e,null),d=!0},p(b,[y]){let E=n;n=m(b),n===E?u[n].p(b,y):(de(),L(u[E],1,1,()=>{u[E]=null}),he(),o=u[n],o?o.p(b,y):(o=u[n]=h[n](b),o.c()),x(o,1),o.m(e,s));let k=r;r=A(b),r===k?g[r].p(b,y):(de(),L(g[k],1,1,()=>{g[k]=null}),he(),a=g[r],a?a.p(b,y):(a=g[r]=v[r](b),a.c()),x(a,1),a.m(e,null)),(!d||y&2&&l!==(l=Be(it("wrapper",b[1].className?`${b[1].className}__wrapper`:void 0))+" svelte-pzwdws"))&&w(e,"class",l),(!d||y&64)&&w(e,"data-tag-unfolded",b[6]),(!d||y&4096)&&w(e,"data-tag-id",b[12]),(!d||y&2&&c!==(c=b[1].contentType))&&w(e,"data-content-type",c),y&512&&T(e,"left",b[9]),y&256&&T(e,"top",b[8]),(!d||y&4096)&&w(t,"data-tag-id",b[12]),(!d||y&2)&&$(t,"unClickable",b[1].config.clickable===!1),(!d||y&2048)&&$(t,"disable",b[11]),(!d||y&1024)&&$(t,"hide",b[10]),(!d||y&1)&&$(t,"withAnimation",b[0]),y&128&&T(t,"z-index",b[7])},i(b){d||(x(o),x(a),d=!0)},o(b){L(o),L(a),d=!1},d(b){b&&_(t),u[n].d(),g[r].d()}}}function WP(i,t,e){let n,o,s,r,a,l,c,d,h,{withAnimation:u=!1}=t,{tag:m}=t,{mediaStore:v}=t,{renderMap:g=new Map}=t,{state:A}=t,{temporaryState:b}=t;const y=rn("hooks");return i.$$set=E=>{"withAnimation"in E&&e(0,u=E.withAnimation),"tag"in E&&e(1,m=E.tag),"mediaStore"in E&&e(2,v=E.mediaStore),"renderMap"in E&&e(3,g=E.renderMap),"state"in E&&e(4,A=E.state),"temporaryState"in E&&e(5,b=E.temporaryState)},i.$$.update=()=>{var E,k,S,C,j,M,X,J;i.$$.dirty&2&&e(14,n=(()=>{var H,Q;return!(((Q=(H=m.style)==null?void 0:H.point)==null?void 0:Q.enabled)===!1||m.contentType==="Sticker"||m.contentType==="Link"||m.contentType==="VRLink"||m.contentType==="PanoLink"||m.contentType==="Audio"&&m.data.appearance==="plane")})()),i.$$.dirty&2&&e(13,o=(()=>m.stickType==="2DPoint")()),i.$$.dirty&2&&e(12,s=m.id),i.$$.dirty&2&&e(11,r=!((E=m.screenPosition)!=null&&E.leftPercent)||!((k=m.screenPosition)!=null&&k.topPercent)||m.enabled===!1||!m.state),i.$$.dirty&2&&e(10,a=!((S=m.state)!=null&&S.visible)||((C=m.temporaryState)==null?void 0:C.visible)===!1),i.$$.dirty&2&&e(6,l=(j=m.state)==null?void 0:j.unfolded),i.$$.dirty&2&&e(9,c=((M=m.screenPosition)==null?void 0:M.leftPercent)+"%"),i.$$.dirty&2&&e(8,d=((X=m.screenPosition)==null?void 0:X.topPercent)+"%"),i.$$.dirty&66&&e(7,h=((J=m.zIndex)!=null?J:0)+(l?1e4:0))},[u,m,v,g,A,b,l,h,d,c,a,r,s,o,n,y]}class NP extends ce{constructor(t){super(),le(this,t,WP,FP,ae,{withAnimation:0,tag:1,mediaStore:2,renderMap:3,state:4,temporaryState:5},BP)}}function XP(i){fe(i,"svelte-uq11d5",".tag--container.svelte-uq11d5{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:translate3d(0, 0, 0)}.withAnimation.svelte-uq11d5{transition:opacity 0.3s linear}.tag--container.hide.svelte-uq11d5{opacity:0;pointer-events:none}.tag--container.hide.svelte-uq11d5 *{pointer-events:none !important}")}function cd(i,t,e){const n=i.slice();return n[7]=t[e],n}function dd(i){let t,e=[],n=new Map,o,s=i[1];const r=a=>a[7].id;for(let a=0;a<s.length;a+=1){let l=cd(i,s,a),c=r(l);n.set(c,e[a]=hd(c,l))}return{c(){t=z("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","tag--container svelte-uq11d5"),$(t,"hide",!i[4].visible||!i[5].visible),$(t,"withAnimation",i[0])},m(a,l){V(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);o=!0},p(a,l){l&63&&(s=a[1],de(),e=St(e,l,r,1,a,s,n,t,un,hd,null,cd),he()),(!o||l&48)&&$(t,"hide",!a[4].visible||!a[5].visible),(!o||l&1)&&$(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)x(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)L(e[l]);o=!1},d(a){a&&_(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function hd(i,t){let e,n,o;return n=new NP({props:{state:t[4],temporaryState:t[5],withAnimation:t[0],tag:t[7],mediaStore:t[2],renderMap:t[3]}}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(s,r){V(s,e,r),ee(n,s,r),o=!0},p(s,r){t=s;const a={};r&16&&(a.state=t[4]),r&32&&(a.temporaryState=t[5]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[7]),r&4&&(a.mediaStore=t[2]),r&8&&(a.renderMap=t[3]),n.$set(a)},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){L(n.$$.fragment,s),o=!1},d(s){s&&_(e),te(n,s)}}}function YP(i){let t,e,n=i[4].enabled&&dd(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),V(o,t,s),e=!0},p(o,[s]){o[4].enabled?n?(n.p(o,s),s&16&&x(n,1)):(n=dd(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&_(t)}}}function UP(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{renderMap:a}=t,{state:l}=t,{temporaryState:c}=t;return Vr("hooks",s),i.$$set=d=>{"withAnimation"in d&&e(0,n=d.withAnimation),"tags"in d&&e(1,o=d.tags),"hooks"in d&&e(6,s=d.hooks),"mediaStore"in d&&e(2,r=d.mediaStore),"renderMap"in d&&e(3,a=d.renderMap),"state"in d&&e(4,l=d.state),"temporaryState"in d&&e(5,c=d.temporaryState)},[n,o,r,a,l,c,s]}class qP extends ce{constructor(t){super(),le(this,t,UP,YP,ae,{withAnimation:0,tags:1,hooks:6,mediaStore:2,renderMap:3,state:4,temporaryState:5},XP)}}const JP=new Cu.GLTFLoader;function ZP(i){return new Promise((t,e)=>{function n(s){t(s)}function o(s){e(s)}JP.load(i,n,void 0,o)})}const KP=new Map,$P=new Map;class eC extends nb{constructor(e){super(e);f(this,"group",new R.Group);f(this,"renderMap",new Map);f(this,"imagePlaneGroup",new R.Group);f(this,"gltfObjectGroup",new R.Group);f(this,"enabledModelTagSet",new Set);f(this,"temporaryState",{visible:!0});f(this,"TagContainerSvelte");f(this,"loadModel",e=>Y(this,null,function*(){var a;const n=e.data.modelUrl;if(!n)return;const o=ZP(n).then(l=>{var h,u,m,v,g;const c=Object.assign(l.scene,{customID:e.id,isTagModel:!0,removeEventListener:this.addObjectClickHandler(e,l.scene,A=>{this.hooks.emit("click",{target:"TagModel",tag:e,event:A})})});return c.visible=this.getCurrentVisibleState(e),new R.Matrix4().fromArray(e.matrix).decompose(c.position,c.quaternion,c.scale),c.updateWorldMatrix(!0,!0),c.visible=this.getVisibleByFiveMode(e),(m=(u=(h=this.config)==null?void 0:h.globalConfig)==null?void 0:u.modelConfig)!=null&&m.autoLookAtEnabled&&((g=(v=e.config)==null?void 0:v.modelConfig)!=null&&g.autoLookAtEnabled)&&c.lookAt(this.five.camera.position.clone().setY(c.position.y)),c});e.model={promise:o};const s=yield o;if(((a=e.model)==null?void 0:a.promise)!==o||!this.tags.includes(e))return;e.model.object=s;const r=this.gltfObjectGroup.children.find(l=>l.customID===e.id);if(r&&(this.gltfObjectGroup.remove(r),r.removeEventListener()),this.updateRender3DDomTag(),pt(e)){if(this.getRenderType(e)==="Mesh"&&!e.mediaPlane){const l=e.data.mediaPosition.map(xt);e.mediaPlane=new $l(e.data.mediaData[0].url,e.data.mediaPosition.map(xt),{objectFit:e.data.objectFit});const c=new R.Vector3().addVectors(l[0],l[2]).divideScalar(2);e.mediaPlane.position.copy(c),s.add(e.mediaPlane)}this.getRenderType(e)!=="Mesh"&&(s.updateTagCss3DObjectMatrix=()=>this.updateTagCss3DObjectMatrix(e,s),s.updateTagCss3DObjectMatrix())}return this.gltfObjectGroup.add(s),s}));this.group.name="PanoTagPluginModelGroup",this.gltfObjectGroup.name="PanoTagPluginGLTFObjectGroup",this.imagePlaneGroup.name="ImagePlaneGroup",this.group.add(this.gltfObjectGroup),this.group.add(this.imagePlaneGroup)}registerRenderer(e,n){this.renderMap.set(e,{renderer:n})}clearTags(){this.tags.forEach(e=>{var n,o;(o=(n=e.mediaPlane)==null?void 0:n.parent)==null||o.remove(e.mediaPlane)}),this.tags=[],this.enabledModelTagSet.clear(),this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}updateRenderAllTags(){this.enabledModelTagSet.clear(),this.tags.forEach(e=>e.stickType==="Model"&&this.enabledModelTagSet.add(e.id)),this.updateRenderPointTag(),this.updateRender3DDomTag(),this.updateRenderModelTag(),this.updateRenderImagePlane()}updateRenderImagePlane(){this.sort(this.filterImagePlane).forEach(n=>{var l,c,d,h,u;const o=n.data.mediaData[0];if(!o)return;const{url:s,type:r}=o;if(!s||(n.mediaPlane&&(n.mediaPlane.visible=(c=(l=n.state)==null?void 0:l.visible)!=null?c:!0,n.mediaPlane.visible||n.mediaPlane instanceof qr&&((d=n.data.autoplayConfig)!=null&&d.autoplayVideo||n.mediaPlane.pause())),((h=n.mediaPlane)==null?void 0:h.src)===s))return;const a=n.position.map(xt);if(n.mediaPlane&&n.mediaPlane.removeFromParent(),r==="Image")n.mediaPlane=new $l(s,a,{objectFit:n.data.objectFit}),n.config.clickable!==!1&&this.domEvents.addAutoBindEventListener(n.mediaPlane,"click",m=>{this.hooks.emit("click",{tag:n,target:"TagContent",event:m.origDomEvent})});else if(r==="Video"){const m=new qr(s,a,{videoCoverSrc:o.videoCoverUrl,playButton:n.data.playIcon,paused:!((u=n.data.autoplayConfig)!=null&&u.autoplayVideo),objectFit:n.data.objectFit,videoTextureMap:KP,ImageTextureMap:$P});m.onVideoReady=g=>{g.addEventListener("play",()=>this.mediaStore.set({currentMediaElement:m.videoInstance}))},m.initialDomEvents(this.domEvents);const v=g=>(this.five.on("renderFrame",g),()=>this.five.off("renderFrame",g));m.initialRenderHooks(v),n.mediaPlane=m}this.imagePlaneGroup.add(n.mediaPlane)})}updateRender3DDomTag(){this.sort([...this.filterCSS3DTag]).forEach(n=>{var o,s,r,a;if(n.tag3DContentSvelte){const{svelteApp:l,css3DInstance:c,initialNormal:d,currentNormal:h}=n.tag3DContentSvelte;if(l.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!d.equals(h)){const u=new R.Quaternion().setFromUnitVectors(d,h);c.css3DObject.setRotationFromQuaternion(u)}return}else{if(pt(n)&&!((o=n.model)!=null&&o.object)||((s=n.state)==null?void 0:s.visible)===!1||!this.state.visible||!this.state.enabled)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=ia(this.five)),n.stickType==="3DPoint"&&!n.normal)return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");const l=this.getPositions(n);if(!l)return;const c=this.getTagNormal(n);if(!c)return;const h=(r=this.getTagConfig(n).tag3DConfig)!=null?r:{};if(this.getRenderType(n)==="BehindDom"){h.mode="behind",h.container=document.createElement("div");const v="black";h.container.style.backgroundColor=v,h.container.style.border=`3px solid ${v}`,this.css3DRenderPlugin.hooks.on("render",()=>{var g;if(u.css3DObject.opacityMesh){const A=this.addObjectClickHandler(n,u.css3DObject.opacityMesh,b=>{this.hooks.emit("click",{event:b,target:"TagContent",tag:n})});(g=this.store.css3DRenderDisposer.get(n.id))==null||g.push(A)}})}const u=this.css3DRenderPlugin.create3DDomContainer(l,h);if(!u)return;this.store.css3DRenderDisposer.set(n.id,[u.dispose]);const m=new ou({target:u.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}});n.tag3DContentSvelte={svelteApp:m,domContainer:u,css3DInstance:u,initialNormal:c,currentNormal:c,dispose:()=>{m.$destroy(),u.dispose()}},pt(n)&&((a=n.model)!=null&&a.object)&&this.updateTagCss3DObjectMatrix(n,n.model.object)}}),this.clearUnusedPanelTag()}updateRenderModelTag(){const e=s=>!this.enabledModelTagSet.has(s.customID),n=this.gltfObjectGroup.children.filter(e);n.forEach(s=>s.removeEventListener()),this.gltfObjectGroup.remove(...n),this.tags.filter(s=>s.stickType==="Model").forEach(s=>{var r;(r=s.model)==null||r.promise.then(a=>{a.visible=this.getCurrentVisibleState(s)})}),this.five.needsRender=!0}updateTagModelVisible(){this.tags.forEach(e=>{var n;e.mediaPlane&&(e.mediaPlane.visible=this.getCurrentVisibleState(e)),(n=e.model)!=null&&n.object&&(e.model.object.visible=this.getCurrentVisibleState(e))})}updateTagCss3DObjectMatrix(e,n){var g,A,b;const o=(A=(g=e.config.tag3DConfig)==null?void 0:g.ratio)!=null?A:.00216,s=(b=e.tag3DContentSvelte)==null?void 0:b.css3DInstance.css3DObject;if(!s)return;const r=pt(e)?e.data.mediaPosition:e.position;if(!r||r.length!==4||!Array.isArray(r[0])||!Array.isArray(r[2]))return;n.updateWorldMatrix(!1,!1);const a=n.matrixWorld,l=new R.Vector3().fromArray(r[0]),c=new R.Vector3().fromArray(r[2]),d=xn(l,c).add(new R.Vector3(0,0,5e-4)),h=new R.Matrix4().setPosition(d),u=new R.Matrix4().makeScale(o,o,o),m=new R.Matrix4().multiply(a).multiply(h).multiply(u);m.decompose(s.position,s.quaternion,s.scale);const v=s.opacityMesh;v&&m.decompose(v.position,v.quaternion,v.scale)}addMediaModelTag(e){return Y(this,null,function*(){const n=e.filter(_A).map(o=>this.loadModel(o));yield Promise.all(n),this.setModelMedialVisible(),this.updateRenderAllTags()})}updateRenderPointTag(){var n;const e=this.filterPointTag;if(this.setTagZIndex(e),this.setPointTagPosition(),this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:e,state:this.state,temporaryState:this.temporaryState});else{const o=(n=this.five.getElement())==null?void 0:n.parentElement;if(!o)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new qP({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore,renderMap:this.renderMap}})}}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filterCSS3DTag.forEach(n=>{var o,s,r,a,l;(a=(s=(o=n.tag3DContentSvelte)==null?void 0:o.css3DInstance)==null?void 0:s.css3DObject)==null||a.setVisible((this.state.visible&&((r=n.state)==null?void 0:r.visible))!==!1),(l=n.tag3DContentSvelte)==null||l.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}disposeAllCSS3DContainer(){for(const[,e]of this.store.css3DRenderDisposer)e==null||e.forEach(n=>n==null?void 0:n());this.store.css3DRenderDisposer=new Map}clearUnusedPanelTag(){this.filter2DPointTag.forEach(e=>{var n;(n=e.tag3DContentSvelte)==null||n.css3DInstance.dispose(),e.tag3DContentSvelte=void 0});for(const[e,n]of this.store.css3DRenderDisposer){const o=this.getTagById(e);(!o||o.stickType==="2DPoint")&&(n==null||n.forEach(s=>s==null?void 0:s()),this.store.css3DRenderDisposer.delete(e))}}}const su="Dnalogel-PanoTagPlugin",tC=i=>`${su}--${i}`;class ns extends eC{constructor(e,n){super(e);f(this,"state",{enabled:!0,visible:!0});f(this,"params");f(this,"debug");f(this,"changeTagModel",(e,n)=>Y(this,null,function*(){e.data=Ye({},e.data,n),yield this.loadModel(e),this.updateRenderAllTags()}));f(this,"handleFiveInitAnimationEnded",()=>{const e=this.five.getCurrentState().mode;this.tags.forEach(n=>{pt(n)&&e==="Panorama"&&this.changeTagMode(n,"front"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags()});f(this,"handleFiveModelShownFloorChange",()=>{this.tags.forEach(e=>{var o,s;const n=this.getTagConfig(e).visibleConfig;typeof n=="object"&&((o=n.visibleFiveMode)!=null&&o.includes("Floorplan")||(s=n.visibleFiveMode)!=null&&s.includes("Mapview"))&&(e.state.visible=this.getVisibleByFiveMode(e))}),this.updateRenderAllTags()});this.params=Ye({},{debug:!1,config:this.config},F({},n)),this.debug=this.params.debug,this.config=this.params.config,FA(1,{namespace:ga.PlayAudio});try{const o=window;Array.isArray(o.__PANOTAGPLUGIN_DEBUG_LIST__)||(o.__PANOTAGPLUGIN_DEBUG_LIST__=[]),o.__PANOTAGPLUGIN_DEBUG_LIST__.push(this),o.__PANOTAGPLUGIN_DEBUG__=this}catch(o){}}load(e,n){return Y(this,null,function*(){var s,r;this.clearTags(),console.debug(su," load:",{data:JSON.parse(JSON.stringify(e))}),this.config=Ye({},this.config,{globalConfig:(s=e.globalConfig)!=null?s:{},contentTypeConfig:(r=e.contentTypeConfig)!=null?r:{}});const o=yield this.addTag(e.tagList,n);if(this.debug)try{SA(this.five,this.tags)}catch(a){console.error(a)}return o})}addTag(e,n){return Y(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{var d,h;const a=this.getTagConfig(r),l=JSON.parse(JSON.stringify(r.data));return ye(F({},r),{enabled:(d=r.enabled)!=null?d:!0,id:(h=r.id)!=null?h:dt(),data:Ye(r.data,a.initialData,l),state:F({visible:void 0,unfolded:!this.can("fold",r)},a.initialState),hooks:new ze.Subscribe,initialConfig:r.config,config:a,unfold:()=>this.changeUnfoldedById(r.id,!0),fold:()=>this.changeUnfoldedById(r.id,!1),enable:()=>this.changeEnabledById(r.id,!0),disable:()=>this.changeEnabledById(r.id,!1),destroy:()=>this.destroyTagById(r.id),changeData:u=>this.changeDataById(r.id,u)})}).filter(r=>r.position);return s.forEach(HA),this.tags.push(...s),OA(this.five).then(()=>Y(this,null,function*(){var r,a,l;this.store.eventListenerDisposer&&((a=(r=this.store).eventListenerDisposer)==null||a.call(r)),this.state.enabled&&this.handleEnable(),this.addResizeListener(),this.clearUnusedPanelTag(),this.setVisibleAndUnfolded({withAnimation:(l=n==null?void 0:n.withAnimation)!=null?l:!0}).then(()=>this.updateRenderAllTags()),this.updateRenderAllTags(),yield this.addMediaModelTag(s)}))})}changeConfig(e,n=!0){n?this.config=Ye({},this.config,e):this.config=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=Ye({},this.config.globalConfig,e):this.config.globalConfig=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=Ye({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}show(e){return Y(this,null,function*(){if(this.checkDisposed())return;const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};this.setState({visible:!0},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("show",{userAction:n,withAnimation:o})})}hide(e){return Y(this,null,function*(){if(this.checkDisposed())return;const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};this.setState({visible:!1},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("hide",{userAction:n,withAnimation:o})})}enable(e){if(this.checkDisposed())return;const{userAction:n=!0}=e!=null?e:{};this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n})}disable(e){if(this.checkDisposed())return;const{userAction:n=!0}=e!=null?e:{};this.setState({enabled:!1},{userAction:n}),this.hooks.emit("disable",{userAction:n})}setState(e,n){if(this.checkDisposed())return;const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=F({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=s,r.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),r.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:r,userAction:o})}dispose(){var e,n,o,s,r,a;this.pauseCurrentMedia(),this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filterCSS3DTag.forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags=[],(n=this.store.disposers)==null||n.forEach(l=>l==null?void 0:l()),this.store.disposers=[],(s=(o=this.store).eventListenerDisposer)==null||s.call(o),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.five.scene.remove(this.group),this.group.remove(...this.group.children),this.gltfObjectGroup.remove(...this.gltfObjectGroup.children),this.imagePlaneGroup.remove(...this.imagePlaneGroup.children),this.clearCache(),this.five.needsRender=!0,this.store.disposed=!0,this.hooks.emit("dispose")}changeUnfoldedById(e,n){var a;const o=this.getTagById(e);if(!o)return;const s=this.can("fold",o),r=this.can("unfold",o);if(s&&r){o.state.unfolded=n;const l=this.filterPointTag;(a=this.TagContainerSvelte)==null||a.$set({tags:l})}else console.warn(`tag ${e} cannot be ${n?"unfolded":"folded"}`)}changeEnabledById(e,n){const o=this.getTagById(e);o&&(o.enabled=n,this.updateRenderAllTags())}changeTagNormalById(e,n){const o=this.getTagById(e);o&&o.tag3DContentSvelte&&(o.tag3DContentSvelte.currentNormal=xt(n))}changeDataById(e,n,o=!0){const s=this.getTagById(e);let r=!1;s&&(s.data&&(r=!0),o?s.data=Ye(s.data,n):s.data=F(F({},s.data),n),this.clearUnusedPanelTag(),this.updateRenderAllTags(),r&&s.hooks.emit("dataChanged",s.data))}changeStickTypeById(e,n,o=!0){this.changeTagById(e,n,o)}changeTagById(e,n,o=!0){const s=this.getTagById(e);let r=!1;n&&(n.data&&(r=!0),o?Ye(s,n):Object.assign(s,n),s!=null&&s.tag3DContentSvelte&&(n!=null&&n.normal)&&(s.tag3DContentSvelte.currentNormal=xt(n.normal)),this.updateRenderAllTags(),this.clearUnusedPanelTag(),r&&s.hooks.emit("dataChanged",s.data))}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(o=>{const s=this.tags.findIndex(r=>r.id===o);s!==-1&&this.tags.splice(s,1)}),this.updateRenderAllTags()}setVisibleAndUnfolded(){return Y(this,arguments,function*({withAnimation:e}={withAnimation:!1}){if(this.isPanorama)return this.setVisible(),e?new Promise(n=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),n()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.group.visible=!0,this.updateTagContainerVisible(),this.updateTagModelVisible(),this.five.needsRender=!0}handleHide(){this.pauseCurrentMedia(),this.state.visible=!1,this.group.visible=!1,this.updateTagContainerVisible(),this.updateTagModelVisible(),this.five.needsRender=!0}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.five.scene.children.includes(this.group)||this.five.scene.add(this.group),this.group.traverse(e=>{var n;(n=e==null?void 0:e.updateTagCss3DObjectMatrix)==null||n.call(e)}),this.updateRenderAllTags(),this.five.needsRender=!0}handleDisable(){var e,n,o;this.pauseCurrentMedia(),this.state.enabled=!1,(n=(e=this.store).eventListenerDisposer)==null||n.call(e),this.five.scene.remove(this.group),(o=this.TagContainerSvelte)==null||o.$set({tags:[]}),this.filterCSS3DTag.forEach(s=>{var r;(r=s.tag3DContentSvelte)==null||r.dispose(),s.tag3DContentSvelte=void 0}),this.five.needsRender=!0}addEventListener(){const{five:e,hooks:n}=this,o=this.handleFiveWantsMoveToPano.bind(this),s=this.handleFiveModeChange.bind(this),r=this.handleFiveCameraUpdate.bind(this),a=this.handleFiveCameraUpdateDebounce(),l=this.handleFivePanoArrived.bind(this),c=this.loadVideoFirstFrame.bind(this),d=this.clickhandler.bind(this),h=this.five.currentMode;return h&&this.handleFiveModeChange(h),this.handleFivePanoArrived(),e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("initAnimationEnded",this.handleFiveInitAnimationEnded),e.on("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),e.on("panoArrived",c),n.on("click",d),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("initAnimationEnded",this.handleFiveInitAnimationEnded),e.off("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),e.off("panoArrived",c),n.off("click",d),this.store.eventListenerDisposer=void 0}}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),n=()=>{this.state.enabled&&(this.show(),this.updateRenderAllTags())},o=()=>{this.state.enabled&&this.hide()},{observe:s,unobserve:r}=Kl(RA(()=>{this.store.resizeObserverDisposer&&o()},500),e),{observe:a,unobserve:l}=Kl(Zl(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){this.setModelMedialVisible(),this.tags.forEach(n=>{pt(n)&&e!=="Panorama"&&this.changeTagMode(n,"behind"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=ye(F({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=ye(F({},e.temporaryState),{visible:!!n.visibleConfig.alwaysShowWhenMovePano}))}),this.updateTagContainerVisible()}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.can("fold",e.tag),o=this.can("unfold",e.tag);n&&o&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(s=>{s.id!==e.tag.id&&s.state&&this.can("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}handleFiveCameraUpdateDebounce(){return Zl(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return Y(this,null,function*(){var e,n,o;this.setModelMedialVisible(),yield this.setVisibleAndUnfolded(),this.tags.forEach(s=>{s.temporaryState=ye(F({},s.temporaryState),{visible:!0})}),(o=(n=(e=this.config)==null?void 0:e.globalConfig)==null?void 0:n.modelConfig)!=null&&o.autoLookAtEnabled&&this.tags.filter(jA).filter(s=>{var r,a;return(a=(r=s.config)==null?void 0:r.modelConfig)==null?void 0:a.autoLookAtEnabled}).forEach(s=>{var u;const r=new I.Mesh(new I.BoxGeometry,new I.MeshBasicMaterial),a=(u=s.model)==null?void 0:u.object;if(!a)return;r.position.copy(a.position),r.quaternion.copy(a.quaternion);const l=this.five.camera.position;r.lookAt(l.clone().setY(r.position.y));const c=a.quaternion.clone(),d=r.quaternion.clone(),h=ss();h.onUpdate(({progress:m})=>{a.quaternion.copy(c.clone().slerp(d,m))}),h.play()}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible(),this.updateRenderAllTags()})}setUnfoldedByCamera(){let e=!1;this.tags.forEach(n=>{const o=this.getUnfoldedByCamera(n);n.state&&o!==void 0&&(o===!0&&(e=!0),n.state.unfolded=o)}),e&&this.tags.forEach(n=>{const o=this.getTagConfig(n).unfoldedConfig;typeof o=="object"&&(o.autoUnfold||o.keep)||n.state&&(n.state.unfolded=!1)})}changeTagMode(e,n){var o,s,r,a,l,c;((o=this.getTagConfig(e))==null?void 0:o.renderType)!=="Mesh"&&((a=(r=(s=e.tag3DContentSvelte)==null?void 0:s.css3DInstance)==null?void 0:r.css3DObject)==null?void 0:a.mode)!==n&&((l=e.config)!=null&&l.tag3DConfig?e.config.tag3DConfig.mode=n:e.config?e.config.tag3DConfig={mode:n}:e.config={tag3DConfig:{mode:n}},(c=this.store.css3DRenderDisposer.get(e.id))==null||c.forEach(d=>d==null?void 0:d()),e.tag3DContentSvelte=void 0)}}var ru=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(ru||{}),au=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Image="Image",i.Video="Video",i.Link="Link",i.Sticker="Sticker",i.VRLink="VRLink",i.PanoLink="PanoLink",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.MediaModel="MediaModel",i.Model="Model",i.Custom="Custom",i.Unknown="Unknown",i))(au||{}),lu=(i=>(i.Two="2D",i.Three="3D",i))(lu||{});const nC=(i,t)=>new ns(i,t);function iC(i){fe(i,"svelte-1jku181",".guide-line__tag.svelte-1jku181.svelte-1jku181{position:relative}.text-with-distance.svelte-1jku181.svelte-1jku181{display:flex;flex-direction:column;position:relative;padding:0.125rem 0.25rem;border-radius:0.125rem;background:linear-gradient(to top, rgba(147, 147, 147, 0.3), rgba(74, 74, 74, 0.3));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.2)}.text-with-distance.svelte-1jku181 .border.svelte-1jku181{position:absolute;top:0;right:0;bottom:0;left:0;padding:0.0625rem;border-radius:0.125rem;background:linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask-composite:exclude;-webkit-mask-composite:xor}.distance-and-name.svelte-1jku181.svelte-1jku181{display:flex;gap:0.1875rem}.distance.svelte-1jku181.svelte-1jku181{white-space:nowrap;font-size:0.625rem;line-height:0.875rem;color:#66afff}.name.svelte-1jku181.svelte-1jku181{opacity:0.6;font-size:0.625rem;line-height:0.875rem;white-space:nowrap;color:#ffffff}.line-name.svelte-1jku181.svelte-1jku181{color:#fff;white-space:nowrap;font-size:0.625rem;line-height:0.875rem}.guide-line__tag-point.svelte-1jku181.svelte-1jku181{position:absolute;left:50%;bottom:0.0625rem;width:0.4375rem;height:0.125rem;transform:translateX(-50%);background:#fff;border-radius:50%;opacity:0.5}.guide-line__tag-line.svelte-1jku181.svelte-1jku181{position:absolute;left:50%;bottom:0.0625rem;width:0.0625rem;height:1.875rem;transform:translateX(-50%);background:linear-gradient(to top, #fff, rgba(255, 255, 255, 0))}.guide-line__tag-content.svelte-1jku181.svelte-1jku181{position:absolute;left:-0.9375rem;bottom:1.9375rem;display:flex}.guide-line__tag-icon.svelte-1jku181.svelte-1jku181{width:1.875rem;height:1.875rem;background-size:100%}.guide-line__tag-text.svelte-1jku181.svelte-1jku181{box-sizing:content-box;height:0.875rem;width:-moz-max-content;width:max-content;margin-top:0.3125rem;transform:translateX(-0.1875rem);white-space:nowrap;font-size:0.625rem;line-height:0.875rem;border:solid transparent;border-width:0.125rem 0.5rem 0.125rem 0.375rem;border-image-source:url('https://vrlab-static.ljcdn.com/release/web/jsl/test2.2ea9ddee.png');border-image-slice:6 25 6 18 fill;color:#fff}")}function ud(i){let t,e;return{c(){t=z("div"),e=je(i[0]),w(t,"class","guide-line__tag-text svelte-1jku181"),T(t,"border-image-source",`url(${i[6]})`)},m(n,o){V(n,t,o),O(t,e)},p(n,o){o&1&&Oe(e,n[0])},d(n){n&&_(t)}}}function fd(i){let t,e,n,o,s=i[5]("全程")+"",r,a,l=i[5]("米")+"",c,d,h,u,m,v,g=i[4]&&md(i);return{c(){t=z("div"),g&&g.c(),e=ne(),n=z("div"),o=z("span"),r=je(s),a=je(i[2]),c=je(l),d=ne(),h=z("span"),u=je(i[0]),m=ne(),v=z("div"),w(o,"class","distance svelte-1jku181"),w(h,"class","name svelte-1jku181"),w(n,"class","distance-and-name svelte-1jku181"),w(v,"class","border svelte-1jku181"),w(t,"class","text-with-distance svelte-1jku181")},m(A,b){V(A,t,b),g&&g.m(t,null),O(t,e),O(t,n),O(n,o),O(o,r),O(o,a),O(o,c),O(n,d),O(n,h),O(h,u),O(t,m),O(t,v)},p(A,b){A[4]?g?g.p(A,b):(g=md(A),g.c(),g.m(t,e)):g&&(g.d(1),g=null),b&32&&s!==(s=A[5]("全程")+"")&&Oe(r,s),b&4&&Oe(a,A[2]),b&32&&l!==(l=A[5]("米")+"")&&Oe(c,l),b&1&&Oe(u,A[0])},d(A){A&&_(t),g&&g.d()}}}function md(i){let t,e;return{c(){t=z("span"),e=je(i[4]),w(t,"class","line-name svelte-1jku181")},m(n,o){V(n,t,o),O(t,e)},p(n,o){o&16&&Oe(e,n[4])},d(n){n&&_(t)}}}function oC(i){let t,e,n,o,s,r,a,l,c,d=i[0]&&!i[2]&&ud(i),h=i[2]&&fd(i);return{c(){t=z("div"),e=z("div"),n=ne(),o=z("div"),s=ne(),r=z("div"),a=z("div"),l=ne(),d&&d.c(),c=ne(),h&&h.c(),w(e,"class","guide-line__tag-point svelte-1jku181"),w(o,"class","guide-line__tag-line svelte-1jku181"),w(a,"class","guide-line__tag-icon svelte-1jku181"),T(a,"background-image",`url(${i[1]})`),w(r,"class","guide-line__tag-content svelte-1jku181"),w(t,"class","guide-line__tag svelte-1jku181"),T(t,"opacity",i[3])},m(u,m){V(u,t,m),O(t,e),O(t,n),O(t,o),O(t,s),O(t,r),O(r,a),O(r,l),d&&d.m(r,null),O(r,c),h&&h.m(r,null)},p(u,[m]){m&2&&T(a,"background-image",`url(${u[1]})`),u[0]&&!u[2]?d?d.p(u,m):(d=ud(u),d.c(),d.m(r,c)):d&&(d.d(1),d=null),u[2]?h?h.p(u,m):(h=fd(u),h.c(),h.m(r,null)):h&&(h.d(1),h=null),m&8&&T(t,"opacity",u[3])},i:K,o:K,d(u){u&&_(t),d&&d.d(),h&&h.d()}}}function sC(i,t,e){let{text:n=""}=t,{icon_url:o=""}=t,{distance:s=0}=t,{opacity:r=1}=t,{name:a=""}=t,{i18n:l=d=>d}=t;const c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHUAAAA2CAMAAADOFiZMAAACEFBMVEUAAACIiIheXl5oaGh6enps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+uf9RTTU9cbo7SbRPmKQBnzaKMI2igthD8jVAvIuM/rXytjfyz4MFqBDgLWPGuA05/sqRQobaOzsBMbFQsRhaAWco/A6Z92FAuU446wWL+aHJWcHJtMOzEDwWrU+PyvHEcFRlkutELInT4NFiCRGqA6yQDWfH5jWdFegXLL8V3qDIsNIySHoRsWIGMN/wBY8/mXRosFxrrDCE20EwJzCGQ9XP7crBN46AdHbthmkPvluICccLzgchnDjBD/eqaxKOOtIKGyiEzDqSFOCt7D4X/dlHFDkNCWPu3fjTHGQBgpbI06TkeIpuQ37bbltAlSKstM/g6EdYcEr0jJv2rLfrZXkFKcPhVjMsWY0GGSrTn00H7TakbD11sChd7qa+gCSKdJVitpyvWLlab6uifsieKtLk1N7QZWtvpYXl4aGxsrAtIJBQVNWVlZOTkZGRm2z7bHW0q2lJRkZ2c3NOTn19fV19fn5zfAsmQL8Nhmg66cHOhvKigoSC/Iysk+vH9//jd2n8g6TG7yjbXZYCAMq6s7fBiah4aGLl0aGLhw4f758zuBmpq+vurq6h07dnR1dXTcrqqq2uejqup2R0dXF8jV1X19NTU1O3feu3f+/oWBgUtD++uePHtbLAThNzRClbi+VnseAAAAAElFTkSuQmCC";return i.$$set=d=>{"text"in d&&e(0,n=d.text),"icon_url"in d&&e(1,o=d.icon_url),"distance"in d&&e(2,s=d.distance),"opacity"in d&&e(3,r=d.opacity),"name"in d&&e(4,a=d.name),"i18n"in d&&e(5,l=d.i18n)},[n,o,s,r,a,l,c]}class rC extends ce{constructor(t){super(),le(this,t,sC,oC,ae,{text:0,icon_url:1,distance:2,opacity:3,name:4,i18n:5},iC)}}function aC(i){return i.length===0?[]:i.filter((t,e)=>t!==i[e-1])}const lC=`
581
+ width var(--sc-dot-size-animation-time) ease;cursor:pointer;-webkit-tap-highlight-color:transparent;height:var(--sc-dot-size);width:var(--sc-dot-size)}.sc-carousel-dot__dot.svelte-1mgyhhn:hover{opacity:0.9}.sc-carousel-dot__dot_active.svelte-1mgyhhn{opacity:0.7;height:var(--sc-active-dot-size);width:var(--sc-active-dot-size)}`)}function Yb(i){let t,e,n;return{c(){t=z("button"),w(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),$(t,"sc-carousel-dot__dot_active",i[0])},m(o,s){j(o,t,s),e||(n=Ce(t,"click",i[1]),e=!0)},p(o,[s]){s&1&&$(t,"sc-carousel-dot__dot_active",o[0])},i:K,o:K,d(o){o&&V(t),e=!1,n()}}}function Ub(i,t,e){let{active:n=!1}=t;function o(s){pi.call(this,i,s)}return i.$$set=s=>{"active"in s&&e(0,n=s.active)},[n,o]}class qb extends ce{constructor(t){super(),le(this,t,Ub,Yb,ae,{active:0},Xb)}}function Jb(i){fe(i,"svelte-670fde",".sc-carousel-dots__container.svelte-670fde{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;padding:0 30px}.sc-carousel-dots__dot-container.svelte-670fde{height:calc(var(--sc-dot-size) + 14px);width:calc(var(--sc-dot-size) + 10px);display:flex;align-items:center;justify-content:center}")}function mc(i,t,e){const n=i.slice();return n[5]=t[e],n[7]=e,n}function pc(i,t){let e,n,o,s;function r(){return t[3](t[7])}return n=new qb({props:{active:t[1]===t[7]}}),n.$on("click",r),{key:i,first:null,c(){e=z("div"),ie(n.$$.fragment),o=ne(),w(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){j(a,e,l),ee(n,e,null),O(e,o),s=!0},p(a,l){t=a;const c={};l&3&&(c.active=t[1]===t[7]),n.$set(c)},i(a){s||(x(n.$$.fragment,a),s=!0)},o(a){L(n.$$.fragment,a),s=!1},d(a){a&&V(e),te(n)}}}function Zb(i){let t,e=[],n=new Map,o,s=Array(i[0]);const r=a=>a[7];for(let a=0;a<s.length;a+=1){let l=mc(i,s,a),c=r(l);n.set(c,e[a]=pc(c,l))}return{c(){t=z("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","sc-carousel-dots__container svelte-670fde")},m(a,l){j(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);o=!0},p(a,[l]){l&7&&(s=Array(a[0]),de(),e=St(e,l,r,1,a,s,n,t,un,pc,null,mc),he())},i(a){if(!o){for(let l=0;l<s.length;l+=1)x(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)L(e[l]);o=!1},d(a){a&&V(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Kb(i,t,e){const n=cs();let{pagesCount:o=1}=t,{currentPageIndex:s=0}=t;function r(l){n("pageChange",l)}const a=l=>r(l);return i.$$set=l=>{"pagesCount"in l&&e(0,o=l.pagesCount),"currentPageIndex"in l&&e(1,s=l.currentPageIndex)},[o,s,r,a]}class $b extends ce{constructor(t){super(),le(this,t,Kb,Zb,ae,{pagesCount:0,currentPageIndex:1},Jb)}}const ai="prev",cn="next";function e1(i){fe(i,"svelte-1bftafx",":root{--sc-arrow-size:2px}.sc-carousel-arrow__circle.svelte-1bftafx{width:20px;height:20px;border-radius:50%;background-color:var(--sc-color-rgb-light-50p);display:flex;align-items:center;justify-content:center;transition:opacity 100ms ease;cursor:pointer;-webkit-tap-highlight-color:transparent}.sc-carousel-arrow__circle.svelte-1bftafx:hover{opacity:0.9}.sc-carousel-arrow__arrow.svelte-1bftafx{border:solid var(--sc-color-hex-dark);border-width:0 var(--sc-arrow-size) var(--sc-arrow-size) 0;padding:var(--sc-arrow-size);position:relative}.sc-carousel-arrow__arrow-next.svelte-1bftafx{transform:rotate(-45deg);left:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__arrow-prev.svelte-1bftafx{transform:rotate(135deg);right:calc(var(--sc-arrow-size) / -2)}.sc-carousel-arrow__circle_disabled.svelte-1bftafx,.sc-carousel-arrow__circle_disabled.svelte-1bftafx:hover{opacity:0.5}")}function t1(i){let t,e,n,o;return{c(){t=z("button"),e=z("i"),w(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),$(e,"sc-carousel-arrow__arrow-next",i[0]===cn),$(e,"sc-carousel-arrow__arrow-prev",i[0]===ai),w(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),$(t,"sc-carousel-arrow__circle_disabled",i[1])},m(s,r){j(s,t,r),O(t,e),n||(o=Ce(t,"click",i[2]),n=!0)},p(s,[r]){r&1&&$(e,"sc-carousel-arrow__arrow-next",s[0]===cn),r&1&&$(e,"sc-carousel-arrow__arrow-prev",s[0]===ai),r&2&&$(t,"sc-carousel-arrow__circle_disabled",s[1])},i:K,o:K,d(s){s&&V(t),n=!1,o()}}}function n1(i,t,e){let{direction:n=cn}=t,{disabled:o=!1}=t;function s(r){pi.call(this,i,r)}return i.$$set=r=>{"direction"in r&&e(0,n=r.direction),"disabled"in r&&e(1,o=r.disabled)},[n,o,s]}class Hh extends ce{constructor(t){super(),le(this,t,n1,t1,ae,{direction:0,disabled:1},e1)}}function i1(i){fe(i,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function o1(i){let t;return{c(){t=z("div"),w(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),T(t,"width",i[0]+"%")},m(e,n){j(e,t,n)},p(e,[n]){n&1&&T(t,"width",e[0]+"%")},i:K,o:K,d(e){e&&V(t)}}}const gc=100;function s1(i,t,e){let n,{value:o=0}=t;return i.$$set=s=>{"value"in s&&e(1,o=s.value)},i.$$.update=()=>{i.$$.dirty&2&&e(0,n=Math.min(Math.max(o*gc,0),gc))},[n,o]}class r1 extends ce{constructor(t){super(),le(this,t,s1,o1,ae,{value:1},i1)}}function a1(i,t){i.addEventListener("mousedown",t),i.addEventListener("touchstart",t,{passive:!0})}function l1(i,t){i.removeEventListener("mousedown",t),i.removeEventListener("touchstart",t)}function c1(i,t){i.addEventListener("mouseup",t),i.addEventListener("touchend",t)}function vc(i,t){i.removeEventListener("mouseup",t),i.removeEventListener("touchend",t)}function d1(i,t){i.addEventListener("mousemove",t),i.addEventListener("touchmove",t)}function Ac(i,t){i.removeEventListener("mousemove",t),i.removeEventListener("touchmove",t)}function ba(i){return function(t,e){i.dispatchEvent(new CustomEvent(t,{detail:e}))}}const h1=110,u1=9,f1=111,m1=20;function Cr(i){if("TouchEvent"in window&&i instanceof TouchEvent){const t=i.touches[0];return{x:t?t.clientX:0,y:t?t.clientY:0}}return{x:i.clientX,y:i.clientY}}function p1(i,{thresholdProvider:t}){const e=ba(i);let n,o,s=0,r,a=!1;function l(){return Date.now()-r>=f1&&Math.abs(s)>=m1}function c(u){r=Date.now(),s=0,a=!0;const m=Cr(u);n=m.x,o=m.y,e("swipeStart",{x:n,y:o}),d1(window,d),c1(window,h)}function d(u){if(!a)return;const m=Cr(u),v=m.x-n,g=m.y-o;n=m.x,o=m.y,e("swipeMove",{x:n,y:o,dx:v,dy:g}),v!==0&&Math.sign(v)!==Math.sign(s)&&(s=0),s+=v,Math.abs(s)>t()&&(e("swipeThresholdReached",{direction:s>0?ai:cn}),vc(window,h),Ac(window,d))}function h(u){if(vc(window,h),Ac(window,d),a=!1,!l()){e("swipeFailed");return}const m=Cr(u);e("swipeEnd",{x:m.x,y:m.y})}return a1(i,c),{destroy(){l1(i,c)}}}function g1(i,t){i.addEventListener("mouseenter",t)}function v1(i,t){i.removeEventListener("mouseenter",t)}function A1(i,t){i.addEventListener("mouseleave",t)}function bc(i,t){i.removeEventListener("mouseleave",t)}function b1(i){const t=ba(i);function e(){A1(i,n),t("hovered",{value:!0})}function n(){t("hovered",{value:!1}),bc(i,n)}return g1(i,e),{destroy(){v1(i,e),bc(i,n)}}}const y1=(i,t)=>{const e=t.x-i.x,n=t.y-i.y;return Math.sqrt(e*e+n*n)};function $n(i,t,e){return Math.max(i,Math.min(t,e))}function w1(i,t){i.addEventListener("touchstart",t,{passive:!0})}function P1(i,t){i.removeEventListener("touchstart",t)}function C1(i,t){i.addEventListener("touchend",t)}function yc(i,t){i.removeEventListener("touchend",t)}function E1(i){const t=ba(i);let e=0,n={x:0,y:0};function o({tapEndedAt:a,tapEndedPos:l}){const c=a-e,d=y1(n,l);return c<=h1&&d<=u1}function s(a){e=Date.now();const l=a.touches[0];n={x:l.clientX,y:l.clientY},C1(i,r)}function r(a){yc(i,r);const l=a.changedTouches[0];o({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return w1(i,s),{destroy(){P1(i,s),yc(i,r)}}}function I1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:o}){return i===t-e?0:i===0?Gh({particlesCountWithoutClones:t-n,particlesToScroll:o})-1:Math.floor((i-e)/o)}function k1({currentParticleIndex:i,particlesToScroll:t}){return Math.ceil(i/t)}function x1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,infinite:o,particlesToScroll:s}){return o?I1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:s}):k1({currentParticleIndex:i,particlesToScroll:s})}function Gh({particlesCountWithoutClones:i,particlesToScroll:t}){return Math.ceil(i/t)}function D1({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e}){const n=Fh({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e});return Math.ceil(i/t)-n}function M1({infinite:i,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n}){return i?Gh({particlesCountWithoutClones:t,particlesToScroll:e}):D1({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n})}function S1({pageIndex:i,clonesCountHead:t,clonesCountTail:e,particlesToScroll:n,particlesCount:o}){return $n(0,Math.min(t+i*n,o-e),o-1)}function L1({pageIndex:i,particlesToScroll:t,particlesCount:e,particlesToShow:n}){return $n(0,Math.min(i*t,e-n),e-1)}function Er({infinite:i,pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s,particlesToShow:r}){return i?S1({pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s}):L1({pageIndex:t,particlesToScroll:o,particlesCount:s,particlesToShow:r})}function T1({particlesContainerChildren:i,particleWidth:t}){for(let e=0;e<i.length;e++)i[e].style.minWidth=`${t}px`,i[e].style.maxWidth=`${t}px`}function Fh({particlesToScroll:i,particlesToShow:t,particlesCountWithoutClones:e}){const n=i-t;let o=t;for(;;){const s=e-o-n;if(s<t)return Math.max(s,0);o+=t+n}}function z1(i){return new ResizeObserver(t=>{i({width:t[0].contentRect.width})})}function _1({clonesCountHead:i,clonesCountTail:t,particlesContainerChildren:e}){const n=[];for(let r=0;r<t;r++)n.push(e[r].cloneNode(!0));const o=[],s=e.length;for(let r=s-1;r>s-1-i;r--)o.push(e[r].cloneNode(!0));return{clonesToAppend:n,clonesToPrepend:o}}function V1({particlesContainer:i,clonesToAppend:t,clonesToPrepend:e}){for(let n=0;n<t.length;n++)i.append(t[n]);for(let n=0;n<e.length;n++)i.prepend(e[n])}function j1({infinite:i,particlesToShow:t,partialPageSize:e}){const n=i?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return ye(F({},n),{total:n.head+n.tail})}const Wi=(i,t,e)=>{if(i&&i.hasOwnProperty(t))return i[t];if(e===void 0)throw new Error(`Required arg "${t}" was not provided`);return e},Jr=i=>t=>{i[t]&&i[t]()};var O1="Expected a function",Wh="__lodash_hash_undefined__",Nh=1/0,B1="[object Function]",R1="[object GeneratorFunction]",Q1="[object Symbol]",H1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G1=/^\w*$/,F1=/^\./,W1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,N1=/[\\^$.*+?()[\]{}|]/g,X1=/\\(\\)?/g,Y1=/^\[object .+?Constructor\]$/,U1=typeof yt=="object"&&yt&&yt.Object===Object&&yt,q1=typeof self=="object"&&self&&self.Object===Object&&self,ya=U1||q1||Function("return this")();function J1(i,t){return i==null?void 0:i[t]}function Z1(i){var t=!1;if(i!=null&&typeof i.toString!="function")try{t=!!(i+"")}catch(e){}return t}var K1=Array.prototype,$1=Function.prototype,Xh=Object.prototype,Ir=ya["__core-js_shared__"],wc=function(){var i=/[^.]+$/.exec(Ir&&Ir.keys&&Ir.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Yh=$1.toString,wa=Xh.hasOwnProperty,Uh=Xh.toString,ey=RegExp("^"+Yh.call(wa).replace(N1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pc=ya.Symbol,ty=K1.splice,ny=qh(ya,"Map"),Zi=qh(Object,"create"),Cc=Pc?Pc.prototype:void 0,Ec=Cc?Cc.toString:void 0;function kn(i){var t=-1,e=i?i.length:0;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}function iy(){this.__data__=Zi?Zi(null):{}}function oy(i){return this.has(i)&&delete this.__data__[i]}function sy(i){var t=this.__data__;if(Zi){var e=t[i];return e===Wh?void 0:e}return wa.call(t,i)?t[i]:void 0}function ry(i){var t=this.__data__;return Zi?t[i]!==void 0:wa.call(t,i)}function ay(i,t){var e=this.__data__;return e[i]=Zi&&t===void 0?Wh:t,this}kn.prototype.clear=iy;kn.prototype.delete=oy;kn.prototype.get=sy;kn.prototype.has=ry;kn.prototype.set=ay;function Ai(i){var t=-1,e=i?i.length:0;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}function ly(){this.__data__=[]}function cy(i){var t=this.__data__,e=As(t,i);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():ty.call(t,e,1),!0}function dy(i){var t=this.__data__,e=As(t,i);return e<0?void 0:t[e][1]}function hy(i){return As(this.__data__,i)>-1}function uy(i,t){var e=this.__data__,n=As(e,i);return n<0?e.push([i,t]):e[n][1]=t,this}Ai.prototype.clear=ly;Ai.prototype.delete=cy;Ai.prototype.get=dy;Ai.prototype.has=hy;Ai.prototype.set=uy;function Ln(i){var t=-1,e=i?i.length:0;for(this.clear();++t<e;){var n=i[t];this.set(n[0],n[1])}}function fy(){this.__data__={hash:new kn,map:new(ny||Ai),string:new kn}}function my(i){return bs(this,i).delete(i)}function py(i){return bs(this,i).get(i)}function gy(i){return bs(this,i).has(i)}function vy(i,t){return bs(this,i).set(i,t),this}Ln.prototype.clear=fy;Ln.prototype.delete=my;Ln.prototype.get=py;Ln.prototype.has=gy;Ln.prototype.set=vy;function As(i,t){for(var e=i.length;e--;)if(Dy(i[e][0],t))return e;return-1}function Ay(i,t){t=Py(t,i)?[t]:wy(t);for(var e=0,n=t.length;i!=null&&e<n;)i=i[ky(t[e++])];return e&&e==n?i:void 0}function by(i){if(!Zh(i)||Ey(i))return!1;var t=My(i)||Z1(i)?ey:Y1;return t.test(xy(i))}function yy(i){if(typeof i=="string")return i;if(Ca(i))return Ec?Ec.call(i):"";var t=i+"";return t=="0"&&1/i==-Nh?"-0":t}function wy(i){return Jh(i)?i:Iy(i)}function bs(i,t){var e=i.__data__;return Cy(t)?e[typeof t=="string"?"string":"hash"]:e.map}function qh(i,t){var e=J1(i,t);return by(e)?e:void 0}function Py(i,t){if(Jh(i))return!1;var e=typeof i;return e=="number"||e=="symbol"||e=="boolean"||i==null||Ca(i)?!0:G1.test(i)||!H1.test(i)||t!=null&&i in Object(t)}function Cy(i){var t=typeof i;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?i!=="__proto__":i===null}function Ey(i){return!!wc&&wc in i}var Iy=Pa(function(i){i=Ly(i);var t=[];return F1.test(i)&&t.push(""),i.replace(W1,function(e,n,o,s){t.push(o?s.replace(X1,"$1"):n||e)}),t});function ky(i){if(typeof i=="string"||Ca(i))return i;var t=i+"";return t=="0"&&1/i==-Nh?"-0":t}function xy(i){if(i!=null){try{return Yh.call(i)}catch(t){}try{return i+""}catch(t){}}return""}function Pa(i,t){if(typeof i!="function"||t&&typeof t!="function")throw new TypeError(O1);var e=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=e.cache;if(s.has(o))return s.get(o);var r=i.apply(this,n);return e.cache=s.set(o,r),r};return e.cache=new(Pa.Cache||Ln),e}Pa.Cache=Ln;function Dy(i,t){return i===t||i!==i&&t!==t}var Jh=Array.isArray;function My(i){var t=Zh(i)?Uh.call(i):"";return t==B1||t==R1}function Zh(i){var t=typeof i;return!!i&&(t=="object"||t=="function")}function Sy(i){return!!i&&typeof i=="object"}function Ca(i){return typeof i=="symbol"||Sy(i)&&Uh.call(i)==Q1}function Ly(i){return i==null?"":yy(i)}function Ty(i,t,e){var n=i==null?void 0:Ay(i,t);return n===void 0?e:n}var To=Ty,es={},zy={get exports(){return es},set exports(i){es=i}};(function(i,t){var e=200,n="__lodash_hash_undefined__",o=9007199254740991,s="[object Arguments]",r="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",h="[object GeneratorFunction]",u="[object Map]",m="[object Number]",v="[object Object]",g="[object Promise]",A="[object RegExp]",b="[object Set]",y="[object String]",E="[object Symbol]",k="[object WeakMap]",S="[object ArrayBuffer]",C="[object DataView]",_="[object Float32Array]",M="[object Float64Array]",X="[object Int8Array]",J="[object Int16Array]",H="[object Int32Array]",Q="[object Uint8Array]",G="[object Uint8ClampedArray]",B="[object Uint16Array]",W="[object Uint32Array]",q=/[\\^$.*+?()[\]{}|]/g,U=/\w*$/,Z=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,oe={};oe[s]=oe[r]=oe[S]=oe[C]=oe[a]=oe[l]=oe[_]=oe[M]=oe[X]=oe[J]=oe[H]=oe[u]=oe[m]=oe[v]=oe[A]=oe[b]=oe[y]=oe[E]=oe[Q]=oe[G]=oe[B]=oe[W]=!0,oe[c]=oe[d]=oe[k]=!1;var Ae=typeof yt=="object"&&yt&&yt.Object===Object&&yt,we=typeof self=="object"&&self&&self.Object===Object&&self,ge=Ae||we||Function("return this")(),Ve=t&&!t.nodeType&&t,ve=Ve&&!0&&i&&!i.nodeType&&i,Ge=ve&&ve.exports===Ve;function ue(p,P){return p.set(P[0],P[1]),p}function be(p,P){return p.add(P),p}function Se(p,P){for(var D=-1,N=p?p.length:0;++D<N&&P(p[D],D,p)!==!1;);return p}function me(p,P){for(var D=-1,N=P.length,Pe=p.length;++D<N;)p[Pe+D]=P[D];return p}function Ue(p,P,D,N){var Pe=-1,pe=p?p.length:0;for(N&&pe&&(D=p[++Pe]);++Pe<pe;)D=P(D,p[Pe],Pe,p);return D}function at(p,P){for(var D=-1,N=Array(p);++D<p;)N[D]=P(D);return N}function ke(p,P){return p==null?void 0:p[P]}function $e(p){var P=!1;if(p!=null&&typeof p.toString!="function")try{P=!!(p+"")}catch(D){}return P}function se(p){var P=-1,D=Array(p.size);return p.forEach(function(N,Pe){D[++P]=[Pe,N]}),D}function Ie(p,P){return function(D){return p(P(D))}}function Qe(p){var P=-1,D=Array(p.size);return p.forEach(function(N){D[++P]=N}),D}var ht=Array.prototype,Qt=Function.prototype,gt=Object.prototype,vt=ge["__core-js_shared__"],je=function(){var p=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),Re=Qt.toString,Xe=gt.hasOwnProperty,Pt=gt.toString,bi=RegExp("^"+Re.call(Xe).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=Ge?ge.Buffer:void 0,Jt=ge.Symbol,fn=ge.Uint8Array,ut=Ie(Object.getPrototypeOf,Object),Tn=Object.create,zn=gt.propertyIsEnumerable,Cs=ht.splice,yi=Object.getOwnPropertySymbols,_n=Lt?Lt.isBuffer:void 0,io=Ie(Object.keys,Object),Vn=Et(ge,"DataView"),mn=Et(ge,"Map"),Ct=Et(ge,"Promise"),jn=Et(ge,"Set"),wi=Et(ge,"WeakMap"),pn=Et(Object,"create"),Pi=lt(Vn),gn=lt(mn),Ci=lt(Ct),Ei=lt(jn),Ii=lt(wi),Zt=Jt?Jt.prototype:void 0,oo=Zt?Zt.valueOf:void 0;function Ht(p){var P=-1,D=p?p.length:0;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function Es(){this.__data__=pn?pn(null):{}}function Is(p){return this.has(p)&&delete this.__data__[p]}function ks(p){var P=this.__data__;if(pn){var D=P[p];return D===n?void 0:D}return Xe.call(P,p)?P[p]:void 0}function so(p){var P=this.__data__;return pn?P[p]!==void 0:Xe.call(P,p)}function ki(p,P){var D=this.__data__;return D[p]=pn&&P===void 0?n:P,this}Ht.prototype.clear=Es,Ht.prototype.delete=Is,Ht.prototype.get=ks,Ht.prototype.has=so,Ht.prototype.set=ki;function qe(p){var P=-1,D=p?p.length:0;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function xs(){this.__data__=[]}function Ds(p){var P=this.__data__,D=Bn(P,p);if(D<0)return!1;var N=P.length-1;return D==N?P.pop():Cs.call(P,D,1),!0}function Ms(p){var P=this.__data__,D=Bn(P,p);return D<0?void 0:P[D][1]}function Ss(p){return Bn(this.__data__,p)>-1}function Ls(p,P){var D=this.__data__,N=Bn(D,p);return N<0?D.push([p,P]):D[N][1]=P,this}qe.prototype.clear=xs,qe.prototype.delete=Ds,qe.prototype.get=Ms,qe.prototype.has=Ss,qe.prototype.set=Ls;function et(p){var P=-1,D=p?p.length:0;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function Ts(){this.__data__={hash:new Ht,map:new(mn||qe),string:new Ht}}function zs(p){return An(this,p).delete(p)}function _s(p){return An(this,p).get(p)}function Vs(p){return An(this,p).has(p)}function js(p,P){return An(this,p).set(p,P),this}et.prototype.clear=Ts,et.prototype.delete=zs,et.prototype.get=_s,et.prototype.has=Vs,et.prototype.set=js;function ft(p){this.__data__=new qe(p)}function Os(){this.__data__=new qe}function Bs(p){return this.__data__.delete(p)}function Rs(p){return this.__data__.get(p)}function Qs(p){return this.__data__.has(p)}function Hs(p,P){var D=this.__data__;if(D instanceof qe){var N=D.__data__;if(!mn||N.length<e-1)return N.push([p,P]),this;D=this.__data__=new et(N)}return D.set(p,P),this}ft.prototype.clear=Os,ft.prototype.delete=Bs,ft.prototype.get=Rs,ft.prototype.has=Qs,ft.prototype.set=Hs;function On(p,P){var D=Si(p)||Qn(p)?at(p.length,String):[],N=D.length,Pe=!!N;for(var pe in p)(P||Xe.call(p,pe))&&!(Pe&&(pe=="length"||tr(pe,N)))&&D.push(pe);return D}function ro(p,P,D){var N=p[P];(!(Xe.call(p,P)&&uo(N,D))||D===void 0&&!(P in p))&&(p[P]=D)}function Bn(p,P){for(var D=p.length;D--;)if(uo(p[D][0],P))return D;return-1}function Tt(p,P){return p&&Mi(P,Ti(P),p)}function xi(p,P,D,N,Pe,pe,xe){var De;if(N&&(De=pe?N(p,Pe,pe,xe):N(p)),De!==void 0)return De;if(!_t(p))return p;var Fe=Si(p);if(Fe){if(De=$s(p),!P)return Js(p,De)}else{var Le=Ft(p),tt=Le==d||Le==h;if(fo(p))return Rn(p,P);if(Le==v||Le==s||tt&&!pe){if($e(p))return pe?p:{};if(De=zt(tt?{}:p),!P)return Zs(p,Tt(De,p))}else{if(!oe[Le])return pe?p:{};De=er(p,Le,xi,P)}}xe||(xe=new ft);var mt=xe.get(p);if(mt)return mt;if(xe.set(p,De),!Fe)var Ne=D?Ks(p):Ti(p);return Se(Ne||p,function(nt,Je){Ne&&(Je=nt,nt=p[Je]),ro(De,Je,xi(nt,P,D,N,Je,p,xe))}),De}function Gs(p){return _t(p)?Tn(p):{}}function Fs(p,P,D){var N=P(p);return Si(p)?N:me(N,D(p))}function Ws(p){return Pt.call(p)}function Ns(p){if(!_t(p)||ir(p))return!1;var P=Li(p)||$e(p)?bi:Z;return P.test(lt(p))}function Xs(p){if(!co(p))return io(p);var P=[];for(var D in Object(p))Xe.call(p,D)&&D!="constructor"&&P.push(D);return P}function Rn(p,P){if(P)return p.slice();var D=new p.constructor(p.length);return p.copy(D),D}function Di(p){var P=new p.constructor(p.byteLength);return new fn(P).set(new fn(p)),P}function vn(p,P){var D=P?Di(p.buffer):p.buffer;return new p.constructor(D,p.byteOffset,p.byteLength)}function ao(p,P,D){var N=P?D(se(p),!0):se(p);return Ue(N,ue,new p.constructor)}function lo(p){var P=new p.constructor(p.source,U.exec(p));return P.lastIndex=p.lastIndex,P}function Ys(p,P,D){var N=P?D(Qe(p),!0):Qe(p);return Ue(N,be,new p.constructor)}function Us(p){return oo?Object(oo.call(p)):{}}function qs(p,P){var D=P?Di(p.buffer):p.buffer;return new p.constructor(D,p.byteOffset,p.length)}function Js(p,P){var D=-1,N=p.length;for(P||(P=Array(N));++D<N;)P[D]=p[D];return P}function Mi(p,P,D,N){D||(D={});for(var Pe=-1,pe=P.length;++Pe<pe;){var xe=P[Pe],De=N?N(D[xe],p[xe],xe,D,p):void 0;ro(D,xe,De===void 0?p[xe]:De)}return D}function Zs(p,P){return Mi(p,Gt(p),P)}function Ks(p){return Fs(p,Ti,Gt)}function An(p,P){var D=p.__data__;return nr(P)?D[typeof P=="string"?"string":"hash"]:D.map}function Et(p,P){var D=ke(p,P);return Ns(D)?D:void 0}var Gt=yi?Ie(yi,Object):sr,Ft=Ws;(Vn&&Ft(new Vn(new ArrayBuffer(1)))!=C||mn&&Ft(new mn)!=u||Ct&&Ft(Ct.resolve())!=g||jn&&Ft(new jn)!=b||wi&&Ft(new wi)!=k)&&(Ft=function(p){var P=Pt.call(p),D=P==v?p.constructor:void 0,N=D?lt(D):void 0;if(N)switch(N){case Pi:return C;case gn:return u;case Ci:return g;case Ei:return b;case Ii:return k}return P});function $s(p){var P=p.length,D=p.constructor(P);return P&&typeof p[0]=="string"&&Xe.call(p,"index")&&(D.index=p.index,D.input=p.input),D}function zt(p){return typeof p.constructor=="function"&&!co(p)?Gs(ut(p)):{}}function er(p,P,D,N){var Pe=p.constructor;switch(P){case S:return Di(p);case a:case l:return new Pe(+p);case C:return vn(p,N);case _:case M:case X:case J:case H:case Q:case G:case B:case W:return qs(p,N);case u:return ao(p,N,D);case m:case y:return new Pe(p);case A:return lo(p);case b:return Ys(p,N,D);case E:return Us(p)}}function tr(p,P){return P=P==null?o:P,!!P&&(typeof p=="number"||re.test(p))&&p>-1&&p%1==0&&p<P}function nr(p){var P=typeof p;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?p!=="__proto__":p===null}function ir(p){return!!je&&je in p}function co(p){var P=p&&p.constructor,D=typeof P=="function"&&P.prototype||gt;return p===D}function lt(p){if(p!=null){try{return Re.call(p)}catch(P){}try{return p+""}catch(P){}}return""}function ho(p){return xi(p,!0,!0)}function uo(p,P){return p===P||p!==p&&P!==P}function Qn(p){return or(p)&&Xe.call(p,"callee")&&(!zn.call(p,"callee")||Pt.call(p)==s)}var Si=Array.isArray;function Hn(p){return p!=null&&mo(p.length)&&!Li(p)}function or(p){return po(p)&&Hn(p)}var fo=_n||rr;function Li(p){var P=_t(p)?Pt.call(p):"";return P==d||P==h}function mo(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=o}function _t(p){var P=typeof p;return!!p&&(P=="object"||P=="function")}function po(p){return!!p&&typeof p=="object"}function Ti(p){return Hn(p)?On(p):Xs(p)}function sr(){return[]}function rr(){return!1}i.exports=ho})(zy,es);const _y=es;var ts={},Vy={get exports(){return ts},set exports(i){ts=i}};(function(i,t){var e=200,n="__lodash_hash_undefined__",o=1,s=2,r=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",d="[object Boolean]",h="[object Date]",u="[object Error]",m="[object Function]",v="[object GeneratorFunction]",g="[object Map]",A="[object Number]",b="[object Null]",y="[object Object]",E="[object Promise]",k="[object Proxy]",S="[object RegExp]",C="[object Set]",_="[object String]",M="[object Symbol]",X="[object Undefined]",J="[object WeakMap]",H="[object ArrayBuffer]",Q="[object DataView]",G="[object Float32Array]",B="[object Float64Array]",W="[object Int8Array]",q="[object Int16Array]",U="[object Int32Array]",Z="[object Uint8Array]",re="[object Uint8ClampedArray]",oe="[object Uint16Array]",Ae="[object Uint32Array]",we=/[\\^$.*+?()[\]{}|]/g,ge=/^\[object .+?Constructor\]$/,Ve=/^(?:0|[1-9]\d*)$/,ve={};ve[G]=ve[B]=ve[W]=ve[q]=ve[U]=ve[Z]=ve[re]=ve[oe]=ve[Ae]=!0,ve[a]=ve[l]=ve[H]=ve[d]=ve[Q]=ve[h]=ve[u]=ve[m]=ve[g]=ve[A]=ve[y]=ve[S]=ve[C]=ve[_]=ve[J]=!1;var Ge=typeof yt=="object"&&yt&&yt.Object===Object&&yt,ue=typeof self=="object"&&self&&self.Object===Object&&self,be=Ge||ue||Function("return this")(),Se=t&&!t.nodeType&&t,me=Se&&!0&&i&&!i.nodeType&&i,Ue=me&&me.exports===Se,at=Ue&&Ge.process,ke=function(){try{return at&&at.binding&&at.binding("util")}catch(p){}}(),$e=ke&&ke.isTypedArray;function se(p,P){for(var D=-1,N=p==null?0:p.length,Pe=0,pe=[];++D<N;){var xe=p[D];P(xe,D,p)&&(pe[Pe++]=xe)}return pe}function Ie(p,P){for(var D=-1,N=P.length,Pe=p.length;++D<N;)p[Pe+D]=P[D];return p}function Qe(p,P){for(var D=-1,N=p==null?0:p.length;++D<N;)if(P(p[D],D,p))return!0;return!1}function ht(p,P){for(var D=-1,N=Array(p);++D<p;)N[D]=P(D);return N}function Qt(p){return function(P){return p(P)}}function gt(p,P){return p.has(P)}function vt(p,P){return p==null?void 0:p[P]}function je(p){var P=-1,D=Array(p.size);return p.forEach(function(N,Pe){D[++P]=[Pe,N]}),D}function Re(p,P){return function(D){return p(P(D))}}function Xe(p){var P=-1,D=Array(p.size);return p.forEach(function(N){D[++P]=N}),D}var Pt=Array.prototype,bi=Function.prototype,Lt=Object.prototype,Jt=be["__core-js_shared__"],fn=bi.toString,ut=Lt.hasOwnProperty,Tn=function(){var p=/[^.]+$/.exec(Jt&&Jt.keys&&Jt.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),zn=Lt.toString,Cs=RegExp("^"+fn.call(ut).replace(we,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),yi=Ue?be.Buffer:void 0,_n=be.Symbol,io=be.Uint8Array,Vn=Lt.propertyIsEnumerable,mn=Pt.splice,Ct=_n?_n.toStringTag:void 0,jn=Object.getOwnPropertySymbols,wi=yi?yi.isBuffer:void 0,pn=Re(Object.keys,Object),Pi=Gt(be,"DataView"),gn=Gt(be,"Map"),Ci=Gt(be,"Promise"),Ei=Gt(be,"Set"),Ii=Gt(be,"WeakMap"),Zt=Gt(Object,"create"),oo=lt(Pi),Ht=lt(gn),Es=lt(Ci),Is=lt(Ei),ks=lt(Ii),so=_n?_n.prototype:void 0,ki=so?so.valueOf:void 0;function qe(p){var P=-1,D=p==null?0:p.length;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function xs(){this.__data__=Zt?Zt(null):{},this.size=0}function Ds(p){var P=this.has(p)&&delete this.__data__[p];return this.size-=P?1:0,P}function Ms(p){var P=this.__data__;if(Zt){var D=P[p];return D===n?void 0:D}return ut.call(P,p)?P[p]:void 0}function Ss(p){var P=this.__data__;return Zt?P[p]!==void 0:ut.call(P,p)}function Ls(p,P){var D=this.__data__;return this.size+=this.has(p)?0:1,D[p]=Zt&&P===void 0?n:P,this}qe.prototype.clear=xs,qe.prototype.delete=Ds,qe.prototype.get=Ms,qe.prototype.has=Ss,qe.prototype.set=Ls;function et(p){var P=-1,D=p==null?0:p.length;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function Ts(){this.__data__=[],this.size=0}function zs(p){var P=this.__data__,D=Rn(P,p);if(D<0)return!1;var N=P.length-1;return D==N?P.pop():mn.call(P,D,1),--this.size,!0}function _s(p){var P=this.__data__,D=Rn(P,p);return D<0?void 0:P[D][1]}function Vs(p){return Rn(this.__data__,p)>-1}function js(p,P){var D=this.__data__,N=Rn(D,p);return N<0?(++this.size,D.push([p,P])):D[N][1]=P,this}et.prototype.clear=Ts,et.prototype.delete=zs,et.prototype.get=_s,et.prototype.has=Vs,et.prototype.set=js;function ft(p){var P=-1,D=p==null?0:p.length;for(this.clear();++P<D;){var N=p[P];this.set(N[0],N[1])}}function Os(){this.size=0,this.__data__={hash:new qe,map:new(gn||et),string:new qe}}function Bs(p){var P=Et(this,p).delete(p);return this.size-=P?1:0,P}function Rs(p){return Et(this,p).get(p)}function Qs(p){return Et(this,p).has(p)}function Hs(p,P){var D=Et(this,p),N=D.size;return D.set(p,P),this.size+=D.size==N?0:1,this}ft.prototype.clear=Os,ft.prototype.delete=Bs,ft.prototype.get=Rs,ft.prototype.has=Qs,ft.prototype.set=Hs;function On(p){var P=-1,D=p==null?0:p.length;for(this.__data__=new ft;++P<D;)this.add(p[P])}function ro(p){return this.__data__.set(p,n),this}function Bn(p){return this.__data__.has(p)}On.prototype.add=On.prototype.push=ro,On.prototype.has=Bn;function Tt(p){var P=this.__data__=new et(p);this.size=P.size}function xi(){this.__data__=new et,this.size=0}function Gs(p){var P=this.__data__,D=P.delete(p);return this.size=P.size,D}function Fs(p){return this.__data__.get(p)}function Ws(p){return this.__data__.has(p)}function Ns(p,P){var D=this.__data__;if(D instanceof et){var N=D.__data__;if(!gn||N.length<e-1)return N.push([p,P]),this.size=++D.size,this;D=this.__data__=new ft(N)}return D.set(p,P),this.size=D.size,this}Tt.prototype.clear=xi,Tt.prototype.delete=Gs,Tt.prototype.get=Fs,Tt.prototype.has=Ws,Tt.prototype.set=Ns;function Xs(p,P){var D=Qn(p),N=!D&&uo(p),Pe=!D&&!N&&Hn(p),pe=!D&&!N&&!Pe&&po(p),xe=D||N||Pe||pe,De=xe?ht(p.length,String):[],Fe=De.length;for(var Le in p)(P||ut.call(p,Le))&&!(xe&&(Le=="length"||Pe&&(Le=="offset"||Le=="parent")||pe&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||er(Le,Fe)))&&De.push(Le);return De}function Rn(p,P){for(var D=p.length;D--;)if(ho(p[D][0],P))return D;return-1}function Di(p,P,D){var N=P(p);return Qn(p)?N:Ie(N,D(p))}function vn(p){return p==null?p===void 0?X:b:Ct&&Ct in Object(p)?Ft(p):co(p)}function ao(p){return _t(p)&&vn(p)==a}function lo(p,P,D,N,Pe){return p===P?!0:p==null||P==null||!_t(p)&&!_t(P)?p!==p&&P!==P:Ys(p,P,D,N,lo,Pe)}function Ys(p,P,D,N,Pe,pe){var xe=Qn(p),De=Qn(P),Fe=xe?l:zt(p),Le=De?l:zt(P);Fe=Fe==a?y:Fe,Le=Le==a?y:Le;var tt=Fe==y,mt=Le==y,Ne=Fe==Le;if(Ne&&Hn(p)){if(!Hn(P))return!1;xe=!0,tt=!1}if(Ne&&!tt)return pe||(pe=new Tt),xe||po(p)?Mi(p,P,D,N,Pe,pe):Zs(p,P,Fe,D,N,Pe,pe);if(!(D&o)){var nt=tt&&ut.call(p,"__wrapped__"),Je=mt&&ut.call(P,"__wrapped__");if(nt||Je){var Kt=nt?p.value():p,Wt=Je?P.value():P;return pe||(pe=new Tt),Pe(Kt,Wt,D,N,pe)}}return Ne?(pe||(pe=new Tt),Ks(p,P,D,N,Pe,pe)):!1}function Us(p){if(!mo(p)||nr(p))return!1;var P=fo(p)?Cs:ge;return P.test(lt(p))}function qs(p){return _t(p)&&Li(p.length)&&!!ve[vn(p)]}function Js(p){if(!ir(p))return pn(p);var P=[];for(var D in Object(p))ut.call(p,D)&&D!="constructor"&&P.push(D);return P}function Mi(p,P,D,N,Pe,pe){var xe=D&o,De=p.length,Fe=P.length;if(De!=Fe&&!(xe&&Fe>De))return!1;var Le=pe.get(p);if(Le&&pe.get(P))return Le==P;var tt=-1,mt=!0,Ne=D&s?new On:void 0;for(pe.set(p,P),pe.set(P,p);++tt<De;){var nt=p[tt],Je=P[tt];if(N)var Kt=xe?N(Je,nt,tt,P,p,pe):N(nt,Je,tt,p,P,pe);if(Kt!==void 0){if(Kt)continue;mt=!1;break}if(Ne){if(!Qe(P,function(Wt,bn){if(!gt(Ne,bn)&&(nt===Wt||Pe(nt,Wt,D,N,pe)))return Ne.push(bn)})){mt=!1;break}}else if(!(nt===Je||Pe(nt,Je,D,N,pe))){mt=!1;break}}return pe.delete(p),pe.delete(P),mt}function Zs(p,P,D,N,Pe,pe,xe){switch(D){case Q:if(p.byteLength!=P.byteLength||p.byteOffset!=P.byteOffset)return!1;p=p.buffer,P=P.buffer;case H:return!(p.byteLength!=P.byteLength||!pe(new io(p),new io(P)));case d:case h:case A:return ho(+p,+P);case u:return p.name==P.name&&p.message==P.message;case S:case _:return p==P+"";case g:var De=je;case C:var Fe=N&o;if(De||(De=Xe),p.size!=P.size&&!Fe)return!1;var Le=xe.get(p);if(Le)return Le==P;N|=s,xe.set(p,P);var tt=Mi(De(p),De(P),N,Pe,pe,xe);return xe.delete(p),tt;case M:if(ki)return ki.call(p)==ki.call(P)}return!1}function Ks(p,P,D,N,Pe,pe){var xe=D&o,De=An(p),Fe=De.length,Le=An(P),tt=Le.length;if(Fe!=tt&&!xe)return!1;for(var mt=Fe;mt--;){var Ne=De[mt];if(!(xe?Ne in P:ut.call(P,Ne)))return!1}var nt=pe.get(p);if(nt&&pe.get(P))return nt==P;var Je=!0;pe.set(p,P),pe.set(P,p);for(var Kt=xe;++mt<Fe;){Ne=De[mt];var Wt=p[Ne],bn=P[Ne];if(N)var xa=xe?N(bn,Wt,Ne,P,p,pe):N(Wt,bn,Ne,p,P,pe);if(!(xa===void 0?Wt===bn||Pe(Wt,bn,D,N,pe):xa)){Je=!1;break}Kt||(Kt=Ne=="constructor")}if(Je&&!Kt){var go=p.constructor,vo=P.constructor;go!=vo&&"constructor"in p&&"constructor"in P&&!(typeof go=="function"&&go instanceof go&&typeof vo=="function"&&vo instanceof vo)&&(Je=!1)}return pe.delete(p),pe.delete(P),Je}function An(p){return Di(p,Ti,$s)}function Et(p,P){var D=p.__data__;return tr(P)?D[typeof P=="string"?"string":"hash"]:D.map}function Gt(p,P){var D=vt(p,P);return Us(D)?D:void 0}function Ft(p){var P=ut.call(p,Ct),D=p[Ct];try{p[Ct]=void 0;var N=!0}catch(pe){}var Pe=zn.call(p);return N&&(P?p[Ct]=D:delete p[Ct]),Pe}var $s=jn?function(p){return p==null?[]:(p=Object(p),se(jn(p),function(P){return Vn.call(p,P)}))}:sr,zt=vn;(Pi&&zt(new Pi(new ArrayBuffer(1)))!=Q||gn&&zt(new gn)!=g||Ci&&zt(Ci.resolve())!=E||Ei&&zt(new Ei)!=C||Ii&&zt(new Ii)!=J)&&(zt=function(p){var P=vn(p),D=P==y?p.constructor:void 0,N=D?lt(D):"";if(N)switch(N){case oo:return Q;case Ht:return g;case Es:return E;case Is:return C;case ks:return J}return P});function er(p,P){return P=P==null?r:P,!!P&&(typeof p=="number"||Ve.test(p))&&p>-1&&p%1==0&&p<P}function tr(p){var P=typeof p;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?p!=="__proto__":p===null}function nr(p){return!!Tn&&Tn in p}function ir(p){var P=p&&p.constructor,D=typeof P=="function"&&P.prototype||Lt;return p===D}function co(p){return zn.call(p)}function lt(p){if(p!=null){try{return fn.call(p)}catch(P){}try{return p+""}catch(P){}}return""}function ho(p,P){return p===P||p!==p&&P!==P}var uo=ao(function(){return arguments}())?ao:function(p){return _t(p)&&ut.call(p,"callee")&&!Vn.call(p,"callee")},Qn=Array.isArray;function Si(p){return p!=null&&Li(p.length)&&!fo(p)}var Hn=wi||rr;function or(p,P){return lo(p,P)}function fo(p){if(!mo(p))return!1;var P=vn(p);return P==m||P==v||P==c||P==k}function Li(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=r}function mo(p){var P=typeof p;return p!=null&&(P=="object"||P=="function")}function _t(p){return p!=null&&typeof p=="object"}var po=$e?Qt($e):qs;function Ti(p){return Si(p)?Xs(p):Js(p)}function sr(){return[]}function rr(){return!1}i.exports=or})(Vy,ts);const jy=ts,Oy=(i,t)=>jy(i,t),By=i=>Object.keys(i||{}),Ry=(i,t)=>{const e={};return i.forEach(n=>{e[n]=t[n]}),e},Qy=()=>{const i={},t=(e,n)=>{const{watcherName:o,fn:s}=e,{prop:r,value:a}=n;i[o]||(i[o]={deps:{},fn:s}),i[o].deps[r]=a};return{subscribers:i,subscribe(e,n){e&&t(e,n)},notify(e,n){Object.entries(i).forEach(([o,{deps:s,fn:r}])=>{const a=By(s);if(a.includes(n)){const l=Ry(a,e);Oy(s,l)||(i[o].deps=l,r())}})}}},Hy=()=>{let i=null;return{targetWatcher(t,e){i={watcherName:t,fn:e},i.fn(),i=null},getTarget(){return i}}};function Gy(i,t){const e=To(i,"data",{}),n=To(i,"watch",{}),o=To(i,"methods",{}),s=To(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=Qy(),{targetWatcher:c,getTarget:d}=Hy();let h;const u={},m=()=>({data:h,methods:u});let v=!1;const g=b=>(...y)=>{v=!0;const E=b(...y);return v=!1,E};Object.entries(o).forEach(([b,y])=>{u[b]=g((...E)=>y(m(),...E)),Object.defineProperty(u[b],"name",{value:b})}),h=new Proxy(_y(e),{get(b,y){return d()&&!v&&r(d(),{prop:y,value:b[y]}),Reflect.get(...arguments)},set(b,y,E){return b[y]===E||(Reflect.set(...arguments),d()||(s&&s(y,E),a(h,y))),!0}}),Object.entries(n).forEach(([b,y])=>{c(b,()=>{y(m())})});const A=[h,u];return A._internal={_getSubscribers(){return l}},A}function Fy({pageIndex:i,particlesToShow:t,particlesToScroll:e,particlesCount:n}){const o=i===0?0:t-e,s=i*t-i*o,r=s+Math.max(t,e)-1,a=[];for(let l=s;l<=Math.min(n-1,r);l++)a.push(l);return a}function Wy({infinite:i,pageIndex:t,pagesCount:e,particlesCount:n,particlesToShow:o,particlesToScroll:s}){const r=$n(0,t,e-1);let a=r-1,l=r+1;a=i?a<0?e-1:a:Math.max(0,a),l=i?l>e-1?0:l:Math.min(e-1,l);const c=[...new Set([a,r,l,0,e-1])].sort((h,u)=>h-u),d=c.flatMap(h=>Fy({pageIndex:h,particlesToShow:o,particlesToScroll:s,particlesCount:n}));return{pageIndexes:c,particleIndexes:[...new Set(d)].sort((h,u)=>h-u)}}const Ny=(i,t)=>(i(),setInterval(i,t)),Xy=35,Ic=1;class Yy{constructor({onProgressValueChange:t}){this._onProgressValueChange=t,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(t){this._autoplayDuration=t}start(t){return new Promise(e=>{this.reset();const n=Math.min(Xy,Math.max(this._autoplayDuration,1));let o=-n;this._interval=Ny(()=>Y(this,null,function*(){if(this._paused)return;o+=n;const s=o/this._autoplayDuration;this._onProgressValueChange(s),s>Ic&&(this.reset(),yield t(),e())}),n)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(Ic)}}function Uy(i){const t=new Yy({onProgressValueChange:r=>{i("progressValue",1-r)}}),e=Gy({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=Wy({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=x1({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=Fh({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=j1({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=a,r.clonesCountTail=l,r.clonesCountTotal=a+l},setProgressManagerAutoplayDuration({data:r}){t.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:a}}){r&&(a?t.pause():t.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:a}}){r.autoplay&&a(r.autoplay)},setPagesCount({data:r}){r.pagesCount=M1({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=$n(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=$n(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=Er({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=Er({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},a){r.currentParticleIndex=$n(0,a,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},_applyAutoplayIfNeeded(l){return Y(this,arguments,function*({data:r,methods:a}){if(!r.infinite&&(r.autoplayDirection===cn&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===ai&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>Jr({[cn]:()=>Y(this,null,function*(){return a.showNextPage()}),[ai]:()=>Y(this,null,function*(){return a.showPrevPage()})})(r.autoplayDirection);yield t.start(c)}})},_jumpIfNeeded(l){return Y(this,arguments,function*({data:r,methods:a}){let c=!1;return r.infinite&&(r.currentParticleIndex===0?(yield a.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),c=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(yield a.showParticle(r.clonesCountHead,{animated:!1}),c=!0)),c})},changePage(d,h,u){return Y(this,arguments,function*({data:r,methods:a},l,c){if(t.reset(),r.disabled)return;r.disabled=!0,l(),yield a.offsetPage({animated:Wi(c,"animated",!0)}),r.disabled=!1,!(yield a._jumpIfNeeded())&&a._applyAutoplayIfNeeded()})},showNextPage(c,d){return Y(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._next,l))})},showPrevPage(c,d){return Y(this,arguments,function*({data:r,methods:a},l){r.disabled||(yield a.changePage(a._prev,l))})},showParticle(c,d,h){return Y(this,arguments,function*({methods:r},a,l){yield r.changePage(()=>r._moveToParticle(a),l)})},_getParticleIndexByPageIndex({data:r},a){return Er({infinite:r.infinite,pageIndex:a,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},showPage(c,d,h){return Y(this,arguments,function*({methods:r},a,l){const u=r._getParticleIndexByPageIndex(a);yield r.showParticle(u,l)})},offsetPage({data:r},a){const l=Wi(a,"animated",!0);return new Promise(c=>{r.durationMs=l?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{c()},r.durationMs)})}}},{onChange:i}),[n,o]=e;return[{data:n,progressManager:t},o,e._internal]}function qy(i){fe(i,"svelte-sme1z4",":root{--sc-color-rgb-light-50p:rgba(93, 93, 93, 0.5);--sc-color-rgb-light:#5d5d5d;--sc-color-hex-dark-50p:rgba(30, 30, 30, 0.5);--sc-color-hex-dark:#1e1e1e}.sc-carousel__carousel-container.svelte-sme1z4{display:flex;width:100%;flex-direction:column;align-items:center}.sc-carousel__content-container.svelte-sme1z4{position:relative;display:flex;width:100%}.sc-carousel__pages-window.svelte-sme1z4{flex:1;display:flex;overflow:hidden;box-sizing:border-box;position:relative}.sc-carousel__pages-container.svelte-sme1z4{width:100%;display:flex;transition-property:transform}.sc-carousel__arrow-container.svelte-sme1z4{padding:5px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sc-carousel-progress__container.svelte-sme1z4{width:100%;height:5px;background-color:var(--sc-color-rgb-light-50p);position:absolute;bottom:0}.sc-carousel-button{all:unset;cursor:pointer}.sc-carousel-button:focus{outline:5px auto}")}const Jy=i=>({currentPageIndex:i[0]&32,pagesCount:i[0]&1024,loaded:i[0]&64}),kc=i=>({currentPageIndex:i[5],pagesCount:i[10],showPage:i[15],loaded:i[6]}),Zy=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),xc=i=>({showNextPage:i[14].showNextPage,loaded:i[6],currentPageIndex:i[5]}),Ky=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Dc=i=>({loaded:i[6],currentPageIndex:i[5]}),$y=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),Mc=i=>({showPrevPage:i[14].showPrevPage,loaded:i[6],currentPageIndex:i[5]});function Sc(i){let t;const e=i[37].prev,n=hi(e,i,i[36],Mc),o=n||ew(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&fi(n,e,s,s[36],t?ui(e,s[36],r,$y):mi(s[36]),Mc):o&&o.p&&(!t||r[0]&36)&&o.p(s,t?r:[-1,-1])},i(s){t||(x(o,s),t=!0)},o(s){L(o,s),t=!1},d(s){o&&o.d(s)}}}function ew(i){let t,e,n;return e=new Hh({props:{direction:"prev",disabled:!i[2]&&i[5]===0}}),e.$on("click",i[23]),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){j(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s[0]&36&&(r.disabled=!o[2]&&o[5]===0),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&V(t),te(e)}}}function Lc(i){let t,e,n;return e=new r1({props:{value:i[7]}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(o,s){j(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s[0]&128&&(r.value=o[7]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&V(t),te(e)}}}function Tc(i){let t;const e=i[37].next,n=hi(e,i,i[36],xc),o=n||tw(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&96|r[1]&32)&&fi(n,e,s,s[36],t?ui(e,s[36],r,Zy):mi(s[36]),xc):o&&o.p&&(!t||r[0]&1060)&&o.p(s,t?r:[-1,-1])},i(s){t||(x(o,s),t=!0)},o(s){L(o,s),t=!1},d(s){o&&o.d(s)}}}function tw(i){let t,e,n;return e=new Hh({props:{direction:"next",disabled:!i[2]&&i[5]===i[10]-1}}),e.$on("click",i[14].showNextPage),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){j(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s[0]&1060&&(r.disabled=!o[2]&&o[5]===o[10]-1),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&V(t),te(e)}}}function zc(i){let t;const e=i[37].dots,n=hi(e,i,i[36],kc),o=n||nw(i);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){n?n.p&&(!t||r[0]&1120|r[1]&32)&&fi(n,e,s,s[36],t?ui(e,s[36],r,Jy):mi(s[36]),kc):o&&o.p&&(!t||r[0]&1056)&&o.p(s,t?r:[-1,-1])},i(s){t||(x(o,s),t=!0)},o(s){L(o,s),t=!1},d(s){o&&o.d(s)}}}function nw(i){let t,e;return t=new $b({props:{pagesCount:i[10],currentPageIndex:i[5]}}),t.$on("pageChange",i[41]),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o[0]&1024&&(s.pagesCount=n[10]),o[0]&32&&(s.currentPageIndex=n[5]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function iw(i){let t,e,n,o,s,r,a,l,c,d,h,u,m=i[1]&&Sc(i);const v=i[37].default,g=hi(v,i,i[36],Dc);let A=i[3]&&Lc(i),b=i[1]&&Tc(i),y=i[4]&&zc(i);return{c(){t=z("div"),e=z("div"),m&&m.c(),n=ne(),o=z("div"),s=z("div"),g&&g.c(),a=ne(),A&&A.c(),l=ne(),b&&b.c(),c=ne(),y&&y.c(),w(s,"class","sc-carousel__pages-container svelte-sme1z4"),T(s,"transform","translateX("+i[8]+"px)"),T(s,"transition-duration",i[9]+"ms"),T(s,"transition-timing-function",i[0]),w(o,"class","sc-carousel__pages-window svelte-sme1z4"),w(e,"class","sc-carousel__content-container svelte-sme1z4"),w(t,"class","sc-carousel__carousel-container svelte-sme1z4")},m(E,k){j(E,t,k),O(t,e),m&&m.m(e,null),O(e,n),O(e,o),O(o,s),g&&g.m(s,null),i[39](s),O(o,a),A&&A.m(o,null),i[40](o),O(e,l),b&&b.m(e,null),O(t,c),y&&y.m(t,null),d=!0,h||(u=[Ut(r=p1.call(null,s,{thresholdProvider:i[38]})),Ce(s,"swipeStart",i[16]),Ce(s,"swipeMove",i[18]),Ce(s,"swipeEnd",i[19]),Ce(s,"swipeFailed",i[20]),Ce(s,"swipeThresholdReached",i[17]),Ut(b1.call(null,o)),Ce(o,"hovered",i[21]),Ut(E1.call(null,o)),Ce(o,"tapped",i[22])],h=!0)},p(E,k){E[1]?m?(m.p(E,k),k[0]&2&&x(m,1)):(m=Sc(E),m.c(),x(m,1),m.m(e,n)):m&&(de(),L(m,1,1,()=>{m=null}),he()),g&&g.p&&(!d||k[0]&96|k[1]&32)&&fi(g,v,E,E[36],d?ui(v,E[36],k,Ky):mi(E[36]),Dc),(!d||k[0]&256)&&T(s,"transform","translateX("+E[8]+"px)"),(!d||k[0]&512)&&T(s,"transition-duration",E[9]+"ms"),(!d||k[0]&1)&&T(s,"transition-timing-function",E[0]),r&&di(r.update)&&k[0]&2048&&r.update.call(null,{thresholdProvider:E[38]}),E[3]?A?(A.p(E,k),k[0]&8&&x(A,1)):(A=Lc(E),A.c(),x(A,1),A.m(o,null)):A&&(de(),L(A,1,1,()=>{A=null}),he()),E[1]?b?(b.p(E,k),k[0]&2&&x(b,1)):(b=Tc(E),b.c(),x(b,1),b.m(e,null)):b&&(de(),L(b,1,1,()=>{b=null}),he()),E[4]?y?(y.p(E,k),k[0]&16&&x(y,1)):(y=zc(E),y.c(),x(y,1),y.m(t,null)):y&&(de(),L(y,1,1,()=>{y=null}),he())},i(E){d||(x(m),x(g,E),x(A),x(b),x(y),d=!0)},o(E){L(m),L(g,E),L(A),L(b),L(y),d=!1},d(E){E&&V(t),m&&m.d(),g&&g.d(E),i[39](null),A&&A.d(),i[40](null),b&&b.d(),y&&y.d(),h=!1,rt(u)}}}function ow(i,t,e){let{$$slots:n={},$$scope:o}=t,s=[],r,a,l=0,c=0,d=1;const[{data:h,progressManager:u},m,v]=Uy((se,Ie)=>{Jr({currentPageIndex:()=>e(5,r=Ie),progressValue:()=>e(7,a=Ie),offset:()=>e(8,l=Ie),durationMs:()=>e(9,c=Ie),pagesCount:()=>e(10,d=Ie),loaded:()=>e(6,s=Ie)})(se)}),g=cs();let{timingFunction:A="ease-in-out"}=t,{arrows:b=!0}=t,{infinite:y=!0}=t,{initialPageIndex:E=0}=t,{duration:k=500}=t,{autoplay:S=!1}=t,{autoplayDuration:C=3e3}=t,{autoplayDirection:_=cn}=t,{pauseOnFocus:M=!1}=t,{autoplayProgressVisible:X=!1}=t,{dots:J=!0}=t,{swiping:H=!0}=t,{particlesToShow:Q=1}=t,{particlesToScroll:G=1}=t;function B(se,Ie){return Y(this,null,function*(){const Qe=Wi(Ie,"animated",!0);if(typeof se!="number")throw new Error("pageIndex should be a number");yield m.showPage(se,{animated:Qe})})}function W(se){return Y(this,null,function*(){const Ie=Wi(se,"animated",!0);yield m.showPrevPage({animated:Ie})})}function q(se){return Y(this,null,function*(){const Ie=Wi(se,"animated",!0);yield m.showNextPage({animated:Ie})})}let U=0,Z,re;const oe=z1(({width:se})=>{e(11,U=se),h.particleWidth=U/h.particlesToShow,T1({particlesContainerChildren:re.children,particleWidth:h.particleWidth}),m.offsetPage({animated:!1})});function Ae(){const{clonesToAppend:se,clonesToPrepend:Ie}=_1({clonesCountHead:h.clonesCountHead,clonesCountTail:h.clonesCountTail,particlesContainerChildren:re.children});V1({particlesContainer:re,clonesToAppend:se,clonesToPrepend:Ie})}Mt(()=>{Y(this,null,function*(){yield Ba(),re&&Z&&(h.particlesCountWithoutClones=re.children.length,yield Ba(),h.infinite&&Ae(),h.particlesCount=re.children.length,m.showPage(E,{animated:!1}),oe.observe(Z))})}),hn(()=>{oe.disconnect(),u.reset()});function we(se){return Y(this,null,function*(){yield m.showPage(se,{animated:!0})})}function ge(){H&&(h.durationMs=0)}function Ve(se){return Y(this,null,function*(){H&&(yield Jr({[cn]:m.showNextPage,[ai]:m.showPrevPage})(se.detail.direction))})}function ve(se){H&&(h.offset+=se.detail.dx)}function Ge(){H&&m.showParticle(h.currentParticleIndex)}function ue(){return Y(this,null,function*(){H&&(yield m.offsetPage({animated:!0}))})}function be(se){h.focused=se.detail.value}function Se(){m.toggleFocused()}function me(){m.showPrevPage()}const Ue=()=>U/3;function at(se){Ke[se?"unshift":"push"](()=>{re=se,e(13,re)})}function ke(se){Ke[se?"unshift":"push"](()=>{Z=se,e(12,Z)})}const $e=se=>we(se.detail);return i.$$set=se=>{"timingFunction"in se&&e(0,A=se.timingFunction),"arrows"in se&&e(1,b=se.arrows),"infinite"in se&&e(2,y=se.infinite),"initialPageIndex"in se&&e(24,E=se.initialPageIndex),"duration"in se&&e(25,k=se.duration),"autoplay"in se&&e(26,S=se.autoplay),"autoplayDuration"in se&&e(27,C=se.autoplayDuration),"autoplayDirection"in se&&e(28,_=se.autoplayDirection),"pauseOnFocus"in se&&e(29,M=se.pauseOnFocus),"autoplayProgressVisible"in se&&e(3,X=se.autoplayProgressVisible),"dots"in se&&e(4,J=se.dots),"swiping"in se&&e(30,H=se.swiping),"particlesToShow"in se&&e(31,Q=se.particlesToShow),"particlesToScroll"in se&&e(32,G=se.particlesToScroll),"$$scope"in se&&e(36,o=se.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&32&&g("pageChange",r),i.$$.dirty[0]&4&&(h.infinite=y),i.$$.dirty[0]&33554432&&(h.durationMsInit=k),i.$$.dirty[0]&67108864&&(h.autoplay=S),i.$$.dirty[0]&134217728&&(h.autoplayDuration=C),i.$$.dirty[0]&268435456&&(h.autoplayDirection=_),i.$$.dirty[0]&536870912&&(h.pauseOnFocus=M),i.$$.dirty[1]&1&&(h.particlesToShowInit=Q),i.$$.dirty[1]&2&&(h.particlesToScrollInit=G)},[A,b,y,X,J,r,s,a,l,c,d,U,Z,re,m,we,ge,Ve,ve,Ge,ue,be,Se,me,E,k,S,C,_,M,H,Q,G,B,W,q,o,n,Ue,at,ke,$e]}class sw extends ce{constructor(t){super(),le(this,t,ow,iw,ae,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},qy,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function rw(i){fe(i,"svelte-159ski6",".media-item.svelte-159ski6.svelte-159ski6{position:relative;height:100%}.media-content.svelte-159ski6.svelte-159ski6{position:relative;pointer-events:auto;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;-o-object-fit:inherit;object-fit:inherit}.media-content.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none}.video-icon.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem;max-width:60%;max-height:60%;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.video-play-button-container.svelte-159ski6.svelte-159ski6{display:none;position:absolute;width:100%;height:100%;top:0;left:0;transform:translate3d(0, 0, 0)}.video-play-button-container.showPlayButton.svelte-159ski6.svelte-159ski6{pointer-events:none;display:block}.video-icon.svelte-159ski6.svelte-159ski6{pointer-events:auto}.video-icon.large.svelte-159ski6.svelte-159ski6{width:12.5rem;height:6.25rem}.video-icon.small.svelte-159ski6.svelte-159ski6{width:1.75rem;height:1.75rem}.video-icon.svelte-159ski6 .video-icon-img.svelte-159ski6{width:100%;height:100%;background-position:center center;background-size:contain;background-repeat:no-repeat}.video-icon.svelte-159ski6 .video-icon-img.canPlay.svelte-159ski6{cursor:pointer}")}function _c(i){let t;function e(s,r){if(s[2].type==="Image")return lw;if(s[2].type==="Video")return aw}let n=e(i),o=n&&n(i);return{c(){t=z("div"),o&&o.c(),w(t,"class","media-item svelte-159ski6"),w(t,"draggable","false")},m(s,r){j(s,t,r),o&&o.m(t,null)},p(s,r){n===(n=e(s))&&o?o.p(s,r):(o&&o.d(1),o=n&&n(s),o&&(o.c(),o.m(t,null)))},d(s){s&&V(t),o&&o.d()}}}function aw(i){let t,e,n,o,s,r;function a(d,h){return d[7]&&d[2].videoCoverUrl?dw:cw}let l=a(i),c=l(i);return{c(){c.c(),t=ne(),e=z("div"),n=z("div"),o=z("div"),w(o,"class","video-icon-img svelte-159ski6"),T(o,"background-image","url("+i[20]()+")"),$(o,"canPlay",i[5]),w(n,"class","video-icon svelte-159ski6"),$(n,"large",i[4]==="large"),$(n,"small",i[4]==="small"),w(e,"class","video-play-button-container svelte-159ski6"),$(e,"showPlayButton",i[10])},m(d,h){c.m(d,h),j(d,t,h),j(d,e,h),O(e,n),O(n,o),s||(r=Ce(o,"click",i[21]),s=!0)},p(d,h){l===(l=a(d))&&c?c.p(d,h):(c.d(1),c=l(d),c&&(c.c(),c.m(t.parentNode,t))),h&8&&T(o,"background-image","url("+d[20]()+")"),h&32&&$(o,"canPlay",d[5]),h&16&&$(n,"large",d[4]==="large"),h&16&&$(n,"small",d[4]==="small"),h&1024&&$(e,"showPlayButton",d[10])},d(d){c.d(d),d&&V(t),d&&V(e),s=!1,r()}}}function lw(i){let t,e,n,o;return{c(){t=z("img"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),wt(t.src,n=i[2].url)||w(t,"src",n),w(t,"alt",o=i[2].name),w(t,"draggable",!1)},m(s,r){j(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&w(t,"style",e),r&4&&!wt(t.src,n=s[2].url)&&w(t,"src",n),r&4&&o!==(o=s[2].name)&&w(t,"alt",o)},d(s){s&&V(t)}}}function cw(i){let t,e,n,o,s,r,a;return{c(){t=z("video"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),wt(t.src,n=i[2].videoCoverUrl?i[2].url:i[2].url+"#t=0.1")||w(t,"src",n),w(t,"poster",o=i[2].videoCoverUrl),w(t,"preload",s=i[2].videoCoverUrl?"none":"auto"),w(t,"disablepictureinpicture",""),t.playsInline=!0,w(t,"paused",""),t.muted=!0,w(t,"draggable",!1),t.loop=!1,w(t,"crossorigin",""),t.controls=!1,$(t,"showPlayButton",i[10])},m(l,c){j(l,t,c),i[19](t),r||(a=[Ce(t,"play",i[14]),Ce(t,"pause",i[15]),Ce(t,"error",i[16]),Ce(t,"ended",i[17]),Ce(t,"click",i[18])],r=!0)},p(l,c){c&64&&e!==(e=`object-fit: ${l[6]};`)&&w(t,"style",e),c&4&&!wt(t.src,n=l[2].videoCoverUrl?l[2].url:l[2].url+"#t=0.1")&&w(t,"src",n),c&4&&o!==(o=l[2].videoCoverUrl)&&w(t,"poster",o),c&4&&s!==(s=l[2].videoCoverUrl?"none":"auto")&&w(t,"preload",s),c&1024&&$(t,"showPlayButton",l[10])},d(l){l&&V(t),i[19](null),r=!1,rt(a)}}}function dw(i){let t,e,n,o;return{c(){t=z("img"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),wt(t.src,n=i[2].videoCoverUrl)||w(t,"src",n),w(t,"alt",o=i[2].name),w(t,"draggable",!1)},m(s,r){j(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&w(t,"style",e),r&4&&!wt(t.src,n=s[2].videoCoverUrl)&&w(t,"src",n),r&4&&o!==(o=s[2].name)&&w(t,"alt",o)},d(s){s&&V(t)}}}function hw(i){let t,e=i[2]&&_c(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),j(n,t,o)},p(n,[o]){n[2]?e?e.p(n,o):(e=_c(n),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:K,o:K,d(n){e&&e.d(n),n&&V(t)}}}function uw(i,t,e){let n,o,{mediaInstance:s={videoInstance:void 0,paused:!0}}=t,{tag:r}=t,{media:a}=t,{playButtonIfNeed:l="withoutText"}=t,{playButtonSizeIfNeed:c="small"}=t,{canPlay:d=!0}=t,{objectFit:h="fill"}=t,{disableVideoIfHavePoster:u=!1}=t,m=!0,v=!1;function g(){e(8,v=(a==null?void 0:a.type)==="Video"&&!!a.videoCoverUrl)}const A=rn("mediaStore"),b=rn("hooks"),y=()=>{v||n&&(e(9,n.muted=!0,n),n.play(),n.pause(),e(9,n.muted=!1,n),e(8,v=!0))};b.on("loadVideoFirstFrame",y),Mt(()=>{A.subscribe(({currentMediaElement:H})=>{H!==n&&(n==null||n.pause())})});const E=H=>{e(10,m=!1),e(0,s.paused=!1,s),e(8,v=!0),n&&A.set({currentMediaElement:n}),b.emit("playStateChange",{event:H,state:"playing",tag:r,mediaInstance:n})},k=H=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:H,state:"paused",tag:r,mediaInstance:n})},S=H=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:H,state:"paused",tag:r,mediaInstance:n})},C=H=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:H,state:"paused",tag:r,mediaInstance:n})},_=H=>{n&&n.pause()};function M(H){Ke[H?"unshift":"push"](()=>{s.videoInstance=H,e(0,s)})}const X=()=>l==="withText"?Oh:l==="withoutText"?Ur:l,J=H=>{d&&n&&(e(9,n.muted=!1,n),n.play())};return i.$$set=H=>{"mediaInstance"in H&&e(0,s=H.mediaInstance),"tag"in H&&e(1,r=H.tag),"media"in H&&e(2,a=H.media),"playButtonIfNeed"in H&&e(3,l=H.playButtonIfNeed),"playButtonSizeIfNeed"in H&&e(4,c=H.playButtonSizeIfNeed),"canPlay"in H&&e(5,d=H.canPlay),"objectFit"in H&&e(6,h=H.objectFit),"disableVideoIfHavePoster"in H&&e(7,u=H.disableVideoIfHavePoster)},i.$$.update=()=>{if(i.$$.dirty&1&&e(9,n=s.videoInstance),i.$$.dirty&4&&e(13,o=a==null?void 0:a.url),i.$$.dirty&8192&&o&&g(),i.$$.dirty&512&&n&&e(10,m=n.paused),i.$$.dirty&772&&(a==null?void 0:a.type)==="Video"&&!v){const H=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,G=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&H;n&&G&&n.paused&&(document.removeEventListener("WeixinJSBridgeReady",y),document.removeEventListener("touchstart",y),document.removeEventListener("click",y),document.addEventListener("WeixinJSBridgeReady",y),document.addEventListener("touchstart",y),document.addEventListener("click",y))}},[s,r,a,l,c,d,h,u,v,n,m,A,b,o,E,k,S,C,_,M,X,J]}class Kh extends ce{constructor(t){super(),le(this,t,uw,hw,ae,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,objectFit:6,disableVideoIfHavePoster:7},rw)}}function fw(i){fe(i,"svelte-1mrbqlg",".media-list-wrapper.svelte-1mrbqlg.svelte-1mrbqlg{width:100%;height:100%;position:relative;overflow:hidden;border-radius:0.125rem}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg{position:relative;pointer-events:auto;height:100%;left:50%;top:50%;transform:translate(-50%, -50%)}.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__carousel-container,.media-list-wrapper.svelte-1mrbqlg .media-list.svelte-1mrbqlg .sc-carousel__content-container{height:100%}")}function Vc(i,t,e){const n=i.slice();return n[28]=t[e],n[29]=t,n[30]=e,n}function jc(i){let t,e,n,o,s,r,a;const l=[pw,mw],c=[];function d(h,u){return h[13]&&h[10].length>1?0:1}return n=d(i),o=c[n]=l[n](i),{c(){t=z("div"),e=z("div"),o.c(),w(e,"class","media-list svelte-1mrbqlg"),$(e,"carouselEnabled",i[13]),w(t,"class","media-list-wrapper svelte-1mrbqlg"),$(t,"unfolded",i[5])},m(h,u){j(h,t,u),O(t,e),c[n].m(e,null),a=!0},p(h,u){i=h;let m=n;n=d(i),n===m?c[n].p(i,u):(de(),L(c[m],1,1,()=>{c[m]=null}),he(),o=c[n],o?o.p(i,u):(o=c[n]=l[n](i),o.c()),x(o,1),o.m(e,null)),(!a||u[0]&8192)&&$(e,"carouselEnabled",i[13]),(!a||u[0]&32)&&$(t,"unfolded",i[5])},i(h){a||(x(o),h&&ot(()=>{a&&(r&&r.end(1),s=Dn(t,Ga,i[6]?{y:4,duration:i[4],delay:i[2],easing:sn}:void 0),s.start())}),a=!0)},o(h){L(o),s&&s.invalidate(),h&&(r=gi(t,Ga,i[6]?{y:4,duration:i[4],delay:i[3],easing:sn}:void 0)),a=!1},d(h){h&&V(t),c[n].d(),h&&r&&r.end()}}}function mw(i){let t,e,n;const o=[{media:i[1][0]},i[7],{tag:i[0]}];function s(a){i[20](a)}let r={};for(let a=0;a<o.length;a+=1)r=Ze(r,o[a]);return i[8][0]!==void 0&&(r.mediaInstance=i[8][0]),t=new Kh({props:r}),Ke.push(()=>th(t,"mediaInstance",s)),{c(){ie(t.$$.fragment)},m(a,l){ee(t,a,l),n=!0},p(a,l){const c=l[0]&131?st(o,[l[0]&2&&{media:a[1][0]},l[0]&128&&eh(a[7]),l[0]&1&&{tag:a[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=a[8][0],Jd(()=>e=!1)),t.$set(c)},i(a){n||(x(t.$$.fragment,a),n=!0)},o(a){L(t.$$.fragment,a),n=!1},d(a){te(t,a)}}}function pw(i){let t,e,n={dots:!1,arrows:!1,$$slots:{default:[gw]},$$scope:{ctx:i}};return t=new sw({props:n}),i[18](t),t.$on("pageChange",i[19]),{c(){ie(t.$$.fragment)},m(o,s){ee(t,o,s),e=!0},p(o,s){const r={};s[0]&1409|s[1]&1&&(r.$$scope={dirty:s,ctx:o}),t.$set(r)},i(o){e||(x(t.$$.fragment,o),e=!0)},o(o){L(t.$$.fragment,o),e=!1},d(o){i[18](null),te(t,o)}}}function Oc(i){let t,e,n;const o=[i[7],{media:i[28]},{tag:i[0]}];function s(a){i[17](a,i[30])}let r={};for(let a=0;a<o.length;a+=1)r=Ze(r,o[a]);return i[8][i[30]]!==void 0&&(r.mediaInstance=i[8][i[30]]),t=new Kh({props:r}),Ke.push(()=>th(t,"mediaInstance",s)),{c(){ie(t.$$.fragment)},m(a,l){ee(t,a,l),n=!0},p(a,l){i=a;const c=l[0]&1153?st(o,[l[0]&128&&eh(i[7]),l[0]&1024&&{media:i[28]},l[0]&1&&{tag:i[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=i[8][i[30]],Jd(()=>e=!1)),t.$set(c)},i(a){n||(x(t.$$.fragment,a),n=!0)},o(a){L(t.$$.fragment,a),n=!1},d(a){te(t,a)}}}function gw(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=Oc(Vc(i,n,r));const s=r=>L(o[r],1,1,()=>{o[r]=null});return{c(){for(let r=0;r<o.length;r+=1)o[r].c();t=Ee()},m(r,a){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(r,a);j(r,t,a),e=!0},p(r,a){if(a[0]&1409){n=r[10];let l;for(l=0;l<n.length;l+=1){const c=Vc(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=Oc(c),o[l].c(),x(o[l],1),o[l].m(t.parentNode,t))}for(de(),l=n.length;l<o.length;l+=1)s(l);he()}},i(r){if(!e){for(let a=0;a<n.length;a+=1)x(o[a]);e=!0}},o(r){o=o.filter(Boolean);for(let a=0;a<o.length;a+=1)L(o[a]);e=!1},d(r){qt(o,r),r&&V(t)}}}function vw(i){let t,e,n=i[5]&&jc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,s){o[5]?n?(n.p(o,s),s[0]&32&&x(n,1)):(n=jc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function Aw(i,t,e){let n,o,s,r,{tag:a}=t,{mediaData:l}=t,{inDelay:c=0}=t,{outDelay:d=0}=t,{duration:h=0}=t,{unfolded:u=!0}=t,{animation:m=!0}=t,{mediaItemConfig:v}=t,{enableCarousel:g=!0}=t,{autoplayConfig:A={}}=t;const{autoplayVideo:b=!1,autoplayCarousel:y=!0,autoplayVideoInCarousel:E=!1}=A;let k=[],S=0,C,_=null;const M=rn("hooks"),X=rn("mediaStore");function J(){const W=k[S],q=W==null?void 0:W.videoInstance;q&&(q.paused?(q.muted=!1,q.play()):q.pause())}Mt(()=>{M.on("click",W=>{var q,U,Z;(Z=(U=(q=a.tag3DContentSvelte)==null?void 0:q.css3DInstance)==null?void 0:U.css3DObject)!=null&&Z.opacityMesh&&W.tag.id===a.id&&J()}),_=setInterval(()=>{r&&(C==null||C.goToNext())},3e3)}),hn(()=>{clearInterval(_),M.off("click",J)});function H(W,q){i.$$.not_equal(k[q],W)&&(k[q]=W,e(8,k))}function Q(W){Ke[W?"unshift":"push"](()=>{C=W,e(12,C)})}const G=W=>{n||X.set({currentMediaElement:null}),e(11,S=W.detail)};function B(W){i.$$.not_equal(k[0],W)&&(k[0]=W,e(8,k))}return i.$$set=W=>{"tag"in W&&e(0,a=W.tag),"mediaData"in W&&e(1,l=W.mediaData),"inDelay"in W&&e(2,c=W.inDelay),"outDelay"in W&&e(3,d=W.outDelay),"duration"in W&&e(4,h=W.duration),"unfolded"in W&&e(5,u=W.unfolded),"animation"in W&&e(6,m=W.animation),"mediaItemConfig"in W&&e(7,v=W.mediaItemConfig),"enableCarousel"in W&&e(15,g=W.enableCarousel),"autoplayConfig"in W&&e(16,A=W.autoplayConfig)},i.$$.update=()=>{i.$$.dirty[0]&256&&e(9,n=k.every(W=>W.paused)),i.$$.dirty[0]&32770&&e(13,o=g&&(l==null?void 0:l.length)>1),i.$$.dirty[0]&2&&e(10,s=l),i.$$.dirty[0]&1536&&(r=s.length>1&&y&&n)},[a,l,c,d,h,u,m,v,k,n,s,S,C,o,X,g,A,H,Q,G,B]}class $h extends ce{constructor(t){super(),le(this,t,Aw,vw,ae,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:15,autoplayConfig:16},fw,[-1,-1])}}function bw(i){fe(i,"svelte-1f7m1lj",".line.svelte-1f7m1lj{position:absolute;width:6.5625rem;height:1.3125rem;transform:translateY(-100%)}.text.svelte-1f7m1lj{position:absolute;width:6.25rem;left:1rem;bottom:0.0625rem;font-weight:600}.media-wrapper.svelte-1f7m1lj{position:absolute;left:0.875rem;top:-5.3125rem;width:5.625rem;height:3.75rem;font-weight:600}")}function Bc(i){let t,e,n,o,s,r,a,l;t=new Rt({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new Nb({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&Rc(i),d=i[1]&&Qc(i);return{c(){ie(t.$$.fragment),e=ne(),n=z("div"),ie(o.$$.fragment),s=ne(),c&&c.c(),r=ne(),d&&d.c(),a=Ee(),w(n,"class","line svelte-1f7m1lj")},m(h,u){ee(t,h,u),j(h,e,u),j(h,n,u),ee(o,n,null),j(h,s,u),c&&c.m(h,u),j(h,r,u),d&&d.m(h,u),j(h,a,u),l=!0},p(h,u){const m={};u&8&&(m.visible=h[3]),t.$set(m);const v={};u&8&&(v.unfolded=h[3]),o.$set(v),h[2]?c?(c.p(h,u),u&4&&x(c,1)):(c=Rc(h),c.c(),x(c,1),c.m(r.parentNode,r)):c&&(de(),L(c,1,1,()=>{c=null}),he()),h[1]?d?(d.p(h,u),u&2&&x(d,1)):(d=Qc(h),d.c(),x(d,1),d.m(a.parentNode,a)):d&&(de(),L(d,1,1,()=>{d=null}),he())},i(h){l||(x(t.$$.fragment,h),x(o.$$.fragment,h),x(c),x(d),l=!0)},o(h){L(t.$$.fragment,h),L(o.$$.fragment,h),L(c),L(d),l=!1},d(h){te(t,h),h&&V(e),h&&V(n),te(o),h&&V(s),c&&c.d(h),h&&V(r),d&&d.d(h),h&&V(a)}}}function Rc(i){let t,e,n;return e=new Rh({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","text svelte-1f7m1lj")},m(o,s){j(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&4&&(r.content=o[2]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&V(t),te(e)}}}function Qc(i){let t,e,n;return e=new $h({props:{autoplayConfig:{autoplayCarousel:!1},unfolded:i[3],mediaData:i[1],tag:i[0],enableCarousel:!1,mediaItemConfig:{canPlay:!1,playButtonSizeIfNeed:"small",disableVideoIfHavePoster:!0},inDelay:500,duration:500}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){j(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s&8&&(r.unfolded=o[3]),s&2&&(r.mediaData=o[1]),s&1&&(r.tag=o[0]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&V(t),te(e)}}}function yw(i){let t,e,n=i[0].state&&Bc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=Bc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function ww(i,t,e){let n,o,s,r,{tag:a}=t;return i.$$set=l=>{"tag"in l&&e(0,a=l.tag)},i.$$.update=()=>{var l,c,d;i.$$.dirty&1&&e(3,n=a.state?a.state.unfolded:!1),i.$$.dirty&1&&e(4,o=(c=(l=a.data.title)!=null?l:a.data.text)!=null?c:""),i.$$.dirty&16&&e(2,s=((d=o.length)!=null?d:0)>7?o.substring(0,6)+"...":o),i.$$.dirty&1&&e(1,r=a.data.mediaData)},[a,r,s,n,o]}class Pw extends ce{constructor(t){super(),le(this,t,ww,yw,ae,{tag:0},bw)}}function Cw(i){fe(i,"svelte-sezqcq",'@charset "UTF-8";.svelte-sezqcq.svelte-sezqcq{box-sizing:border-box}.marketing.svelte-sezqcq.svelte-sezqcq{transform:translateY(-100%)}.marketing.svelte-sezqcq .line.svelte-sezqcq{position:absolute;height:1.875rem;width:0.0625rem;left:50%;transform:translateX(-50%);background-color:white;bottom:0;transform-origin:bottom;transition:all 500ms}.marketing.svelte-sezqcq .content.svelte-sezqcq{position:relative;min-width:7.5rem;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;border-radius:0.25rem;top:-1.875rem;left:-1rem;padding:0.5rem 0rem 0.5625rem;transition-property:opacity, transform;transition-duration:500ms}.marketing.svelte-sezqcq .content .headerImage.svelte-sezqcq{position:absolute;width:100%;top:0.25rem;transform:translateY(-100%);border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.title-wrapper.svelte-sezqcq.svelte-sezqcq{position:relative;width:100%;height:1.125rem}.title-wrapper.svelte-sezqcq .title.svelte-sezqcq{border-radius:0.25rem;width:100%;padding-left:0.625rem;padding-right:0.625rem}.title-wrapper.svelte-sezqcq .title .text.svelte-sezqcq{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.75rem;font-weight:bold;line-height:1.125rem}.footer.svelte-sezqcq.svelte-sezqcq{position:relative;padding:0.5rem 0.625rem 0 0;width:100%;display:flex;align-items:center}.footer.svelte-sezqcq .goto-button.svelte-sezqcq{display:flex;align-self:flex-end;flex-wrap:wrap;align-items:center;overflow:hidden;height:0.875rem}.footer.svelte-sezqcq .goto-button .gap.svelte-sezqcq{height:100%;width:0.625rem}.footer.svelte-sezqcq .goto-button .text.svelte-sezqcq{display:block;height:100%;font-size:0.625rem}.footer.svelte-sezqcq .arrow-wrapper.svelte-sezqcq{height:0.875rem;display:flex;align-self:flex-end;flex-grow:0;flex-shrink:0;align-items:center;margin-left:0.25rem}.footer.svelte-sezqcq .arrow-wrapper svg.arrow.svelte-sezqcq{width:0.375rem;height:0.625rem}.footer.svelte-sezqcq .price.svelte-sezqcq{flex-shrink:0;margin-right:auto;white-space:nowrap;display:flex;align-items:baseline;margin-left:0.625rem}.footer.svelte-sezqcq .price .value.svelte-sezqcq{position:relative;font-size:0.875rem;line-height:1rem;font-family:TG-TYPE, PingFangSC, Segoe UI, Rototo, sans-serif;letter-spacing:0rem}.footer.svelte-sezqcq .price .unit.svelte-sezqcq{padding-left:0.125rem;font-size:0.625rem}.tags-wrapper.svelte-sezqcq.svelte-sezqcq{position:relative;overflow:hidden;height:1rem;margin-top:0.25rem}.tags-wrapper.svelte-sezqcq .tags.svelte-sezqcq{position:relative;display:inline-flex;max-width:100%;flex-wrap:wrap;padding-left:0.625rem;padding-right:0.375rem}.tags-wrapper.svelte-sezqcq .tags .tag.svelte-sezqcq{display:flex;align-items:center;justify-content:center;flex-shrink:0;flex-grow:0;font-size:0.625rem;height:1rem;margin-right:0.25rem;margin-bottom:0.625rem;padding:0 0.25rem;border-radius:0.125rem;max-width:100%;text-overflow:ellipsis;overflow:hidden}.marketing.light.svelte-sezqcq .content.svelte-sezqcq{background-color:white}.marketing.light.svelte-sezqcq .content .title-wrapper .title .text.svelte-sezqcq{color:rgba(0, 0, 0, 0.8)}.marketing.light.svelte-sezqcq .content .tags-wrapper .tags .primary-tag.svelte-sezqcq{background:rgba(234, 208, 154, 0.5);color:#946700}.marketing.light.svelte-sezqcq .content .tags-wrapper .tags .secondary-tag.svelte-sezqcq{background:rgba(0, 0, 0, 0.06);color:rgba(0, 0, 0, 0.5)}.marketing.light.svelte-sezqcq .content .footer.svelte-sezqcq{color:#946700;fill:#946700}.marketing.dark.svelte-sezqcq .content.svelte-sezqcq{background-color:rgba(0, 0, 0, 0.5)}.marketing.dark.svelte-sezqcq .content .title-wrapper .title .text.svelte-sezqcq{color:white}.marketing.dark.svelte-sezqcq .content .tags-wrapper .tags .primary-tag.svelte-sezqcq{background:rgba(234, 208, 154, 0.5);color:white}.marketing.dark.svelte-sezqcq .content .tags-wrapper .tags .secondary-tag.svelte-sezqcq{background:rgba(255, 255, 255, 0.15);color:rgba(255, 255, 255, 0.85)}.marketing.dark.svelte-sezqcq .content .footer.svelte-sezqcq{color:#ead09a;fill:#ead09a}.marketing.unfolded.svelte-sezqcq .line.svelte-sezqcq{transform:translateX(-50%) scale(1, 1)}.marketing.folded.svelte-sezqcq .line.svelte-sezqcq{transform:translateX(-50%) scale(1, 0);transition-timing-function:ease-in}.marketing.unfolded.svelte-sezqcq .content.svelte-sezqcq{opacity:1}.marketing.folded.svelte-sezqcq .content.svelte-sezqcq{opacity:0;transform:translateY(0.425rem);transition-timing-function:ease-in}')}function Hc(i,t,e){const n=i.slice();return n[0]=t[e],n}function Gc(i,t,e){const n=i.slice();return n[0]=t[e],n}function Fc(i){let t,e;return{c(){t=z("img"),w(t,"class","headerImage svelte-sezqcq"),wt(t.src,e=i[3].headerPictureUrl)||w(t,"src",e),w(t,"alt","")},m(n,o){j(n,t,o)},p(n,o){o&8&&!wt(t.src,e=n[3].headerPictureUrl)&&w(t,"src",e)},d(n){n&&V(t)}}}function Wc(i){let t,e,n,o,s=i[2]||[],r=[];for(let c=0;c<s.length;c+=1)r[c]=Nc(Gc(i,s,c));let a=i[5]||[],l=[];for(let c=0;c<a.length;c+=1)l[c]=Xc(Hc(i,a,c));return{c(){t=z("div"),e=z("div");for(let c=0;c<r.length;c+=1)r[c].c();n=ne();for(let c=0;c<l.length;c+=1)l[c].c();w(e,"class","tags svelte-sezqcq"),ot(()=>i[11].call(e)),w(t,"class","tags-wrapper svelte-sezqcq")},m(c,d){j(c,t,d),O(t,e);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(e,null);O(e,n);for(let h=0;h<l.length;h+=1)l[h]&&l[h].m(e,null);o=ls(e,i[11].bind(e))},p(c,d){if(d&4){s=c[2]||[];let h;for(h=0;h<s.length;h+=1){const u=Gc(c,s,h);r[h]?r[h].p(u,d):(r[h]=Nc(u),r[h].c(),r[h].m(e,n))}for(;h<r.length;h+=1)r[h].d(1);r.length=s.length}if(d&32){a=c[5]||[];let h;for(h=0;h<a.length;h+=1){const u=Hc(c,a,h);l[h]?l[h].p(u,d):(l[h]=Xc(u),l[h].c(),l[h].m(e,null))}for(;h<l.length;h+=1)l[h].d(1);l.length=a.length}},d(c){c&&V(t),qt(r,c),qt(l,c),o()}}}function Nc(i){let t,e=i[0]+"",n;return{c(){t=z("div"),n=_e(e),w(t,"class","tag primary-tag svelte-sezqcq"),T(t,"min-width",Ea)},m(o,s){j(o,t,s),O(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Oe(n,e)},d(o){o&&V(t)}}}function Xc(i){let t,e=i[0]+"",n;return{c(){t=z("div"),n=_e(e),w(t,"class","tag secondary-tag svelte-sezqcq"),T(t,"min-width",Ea)},m(o,s){j(o,t,s),O(t,n)},p(o,s){s&32&&e!==(e=o[0]+"")&&Oe(n,e)},d(o){o&&V(t)}}}function Yc(i){let t,e,n=i[7]&&Uc(i),o=i[3].highlightText&&Jc(i);return{c(){t=z("div"),n&&n.c(),e=ne(),o&&o.c(),w(t,"class","footer svelte-sezqcq")},m(s,r){j(s,t,r),n&&n.m(t,null),O(t,e),o&&o.m(t,null)},p(s,r){s[7]?n?n.p(s,r):(n=Uc(s),n.c(),n.m(t,e)):n&&(n.d(1),n=null),s[3].highlightText?o?o.p(s,r):(o=Jc(s),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(s){s&&V(t),n&&n.d(),o&&o.d()}}}function Uc(i){let t,e,n=i[3].price.value+"",o,s,r=i[3].price.unit&&qc(i);return{c(){t=z("div"),e=z("span"),o=_e(n),s=ne(),r&&r.c(),w(e,"class","value svelte-sezqcq"),w(t,"class","price svelte-sezqcq")},m(a,l){j(a,t,l),O(t,e),O(e,o),O(t,s),r&&r.m(t,null)},p(a,l){l&8&&n!==(n=a[3].price.value+"")&&Oe(o,n),a[3].price.unit?r?r.p(a,l):(r=qc(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&V(t),r&&r.d()}}}function qc(i){let t,e=i[3].price.unit+"",n;return{c(){t=z("span"),n=_e(e),w(t,"class","unit svelte-sezqcq")},m(o,s){j(o,t,s),O(t,n)},p(o,s){s&8&&e!==(e=o[3].price.unit+"")&&Oe(n,e)},d(o){o&&V(t)}}}function Jc(i){let t,e,n,o,s=i[3].highlightText+"",r,a,l;return{c(){t=z("div"),e=z("div"),n=ne(),o=z("span"),r=_e(s),a=ne(),l=z("div"),l.innerHTML='<svg class="arrow svelte-sezqcq" viewBox="0 0 6 9"><g transform="translate(-3, -2)" fill-rule="nonzero" class="svelte-sezqcq"><path d="M4.43868724,2.12056563 C4.28121824,1.95989074 4.02582143,1.95979988 3.86824251,2.1203627 C3.72498894,2.26632889 3.71189225,2.49481723 3.82900374,2.65587166 L6.57092402,5.92894326 C6.72651763,6.11470411 6.72651763,6.38529589 6.57092402,6.57105674 L3.86804348,9.79798499 C3.72488984,9.94405307 3.71194952,10.1725507 3.8291712,10.3335217 L3.86824251,10.3796373 C4.01149607,10.5256035 4.23559087,10.5387981 4.39346025,10.4192733 L4.43868724,10.3794344 L8.1144599,6.5985342 C8.30312347,6.40447482 8.30312347,6.09552518 8.1144599,5.9014658 L4.43868724,2.12056563 Z" class="svelte-sezqcq"></path></g></svg>',w(e,"class","gap svelte-sezqcq"),w(o,"class","text svelte-sezqcq"),w(t,"class","goto-button goto-icon svelte-sezqcq"),w(l,"class","arrow-wrapper svelte-sezqcq")},m(c,d){j(c,t,d),O(t,e),O(t,n),O(t,o),O(o,r),j(c,a,d),j(c,l,d)},p(c,d){d&8&&s!==(s=c[3].highlightText+"")&&Oe(r,s)},d(c){c&&V(t),c&&V(a),c&&V(l)}}}function Ew(i){var k,S;let t,e,n,o,s,r,a,l,c,d,h=i[3].title+"",u,m,v,g,A;e=new Rt({props:{visible:i[4],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let b=i[3].headerPictureUrl&&Fc(i),y=((k=i[2].length)!=null?k:0)+((S=i[5].length)!=null?S:0)>0&&Wc(i),E=(i[7]||i[3].highlightText)&&Yc(i);return{c(){t=z("div"),ie(e.$$.fragment),n=ne(),o=z("div"),s=ne(),r=z("div"),b&&b.c(),a=ne(),l=z("div"),c=z("div"),d=z("div"),u=_e(h),m=ne(),y&&y.c(),v=ne(),E&&E.c(),w(o,"class","line svelte-sezqcq"),T(o,"transition-delay",i[4]?zo+"ms":_o+Kc-Zc-40+"ms"),w(d,"class","text svelte-sezqcq"),w(c,"class","title svelte-sezqcq"),w(l,"class","title-wrapper svelte-sezqcq"),w(r,"class","content svelte-sezqcq"),T(r,"max-width",Ot(i[9])),T(r,"transition-delay",i[4]?zo+_o+"ms":"0ms"),w(t,"class",g=Be(`marketing ${i[6]}`)+" svelte-sezqcq"),$(t,"unfolded",i[4]),$(t,"folded",i[8])},m(C,_){j(C,t,_),ee(e,t,null),O(t,n),O(t,o),O(t,s),O(t,r),b&&b.m(r,null),O(r,a),O(r,l),O(l,c),O(c,d),O(d,u),O(r,m),y&&y.m(r,null),O(r,v),E&&E.m(r,null),A=!0},p(C,[_]){var X,J;const M={};_&16&&(M.visible=C[4]),e.$set(M),_&16&&T(o,"transition-delay",C[4]?zo+"ms":_o+Kc-Zc-40+"ms"),C[3].headerPictureUrl?b?b.p(C,_):(b=Fc(C),b.c(),b.m(r,a)):b&&(b.d(1),b=null),(!A||_&8)&&h!==(h=C[3].title+"")&&Oe(u,h),((X=C[2].length)!=null?X:0)+((J=C[5].length)!=null?J:0)>0?y?y.p(C,_):(y=Wc(C),y.c(),y.m(r,v)):y&&(y.d(1),y=null),C[7]||C[3].highlightText?E?E.p(C,_):(E=Yc(C),E.c(),E.m(r,null)):E&&(E.d(1),E=null),_&16&&T(r,"transition-delay",C[4]?zo+_o+"ms":"0ms"),(!A||_&64&&g!==(g=Be(`marketing ${C[6]}`)+" svelte-sezqcq"))&&w(t,"class",g),(!A||_&80)&&$(t,"unfolded",C[4]),(!A||_&320)&&$(t,"folded",C[8])},i(C){A||(x(e.$$.fragment,C),A=!0)},o(C){L(e.$$.fragment,C),A=!1},d(C){C&&V(t),te(e),b&&b.d(),y&&y.d(),E&&E.d()}}}const Ea=40,zo=400,Zc=500,_o=180,Kc=500;function Iw(i,t,e){let n,o,s,r,a,l,c,d,{tag:h}=t,u,m=(()=>{var A;const g=(A=h.data.limitWidth)!=null?A:!0;if(typeof g=="number")return g;if(g===!0)return 172})();function v(){u=this.offsetHeight,e(1,u)}return i.$$set=g=>{"tag"in g&&e(0,h=g.tag)},i.$$.update=()=>{var g,A,b,y,E,k;i.$$.dirty&1&&e(4,n=(A=(g=h.state)==null?void 0:g.unfolded)!=null?A:!1),i.$$.dirty&16&&e(8,o=!n),i.$$.dirty&1&&e(3,s=h.data),i.$$.dirty&8&&e(7,r=ci((b=s.price)==null?void 0:b.value)&&((y=s.price)==null?void 0:y.value)!==""),i.$$.dirty&1&&e(6,a=h.data.theme||"light"),i.$$.dirty&1026&&u>40&&e(10,l=l-1),i.$$.dirty&1032&&e(2,c=((E=s.brandTags)==null?void 0:E.slice(0,l).filter(Boolean))||[]),i.$$.dirty&1036&&e(5,d=((k=s.tags)==null?void 0:k.slice(0,l-c.length).filter(Boolean))||[])},e(10,l=(m-20)/Ea),[h,u,c,s,n,d,a,r,o,m,l,v]}class kw extends ce{constructor(t){super(),le(this,t,Iw,Ew,ae,{tag:0},Cw)}}class xw extends Audio{constructor(e){super();f(this,"sharedAudioSrc");f(this,"sharedAudioPaused",!0);f(this,"sharedAudioCurrentTime",0);f(this,"tryplaying",!1);f(this,"audioInstance");f(this,"eventListenerDisposer");this.sharedAudioSrc=e}get paused(){var e;return(e=this.sharedAudioPaused)!=null?e:!0}get currentTime(){return this.sharedAudioCurrentTime}play(){return Y(this,null,function*(){var n,o,s;if(this.tryplaying)return;this.tryplaying=!0,(!this.audioInstance||((n=this.audioInstance)==null?void 0:n.realSrc)!==this.sharedAudioSrc)&&(this.audioInstance=GA(this.sharedAudioSrc,{namespace:ga.PlayAudio})),(o=this.eventListenerDisposer)==null||o.call(this),this.eventListenerDisposer=this.addEventListeners(),this.audioInstance.currentTime=(s=this.currentTime)!=null?s:0;const e=this.audioInstance.currentTime!==this.currentTime;this.audioInstance.play().then(()=>{var r;this.audioInstance.muted=!1,e&&(this.audioInstance.currentTime=(r=this.currentTime)!=null?r:0),this.sharedAudioPaused=!1}).catch(r=>{var a;r.message==="The operation is not supported."?console.error("Error: 音频文件可能损坏或修改过文件后缀",r):console.error("Error: error playing media in Safari",r),this.endedHandler(),(a=this.onerror)==null||a.call(this,r)}).finally(()=>{this.tryplaying=!1})})}pause(e){var n;if(this.audioInstance&&!this.paused){if(this.sharedAudioPaused=!0,(n=this.eventListenerDisposer)==null||n.call(this),this.audioInstance.ended){this.endedHandler();return}this.audioInstance.paused||this.audioInstance.pause(),this.onpause(e!=null?e:new Event("pause")),this.clear()}}dispose(){var e;(e=this.eventListenerDisposer)==null||e.call(this),this.clear(),this.audioInstance=void 0}clear(){var e;(e=this.audioInstance)==null||e.clear()}endedHandler(e){var n,o;(n=this.onended)==null||n.call(this,e!=null?e:new Event("ended")),(o=this.eventListenerDisposer)==null||o.call(this),this.sharedAudioPaused=!0,this.sharedAudioCurrentTime=0,this.clear()}addEventListeners(){const e=this.audioInstance;if(!e)return;const n=u=>{var m;this.sharedAudioCurrentTime=e.currentTime,(m=this.ontimeupdate)==null||m.call(this,u)},o=u=>{var m;e.isBlankAudio||(this.sharedAudioPaused=!1,(m=this.onplay)==null||m.call(this,u))},s=u=>{this.pause(u)},r=u=>{this.endedHandler(u)},a=u=>{var m;this.sharedAudioPaused=!0,(m=this.onerror)==null||m.call(this,u)},l=u=>{var m;return(m=this.oncanplay)==null?void 0:m.call(this,u)},c=u=>{var m;return(m=this.oncanplaythrough)==null?void 0:m.call(this,u)},d=u=>{var m;return(m=this.onloadeddata)==null?void 0:m.call(this,u)},h=u=>{var m;return(m=this.onloadedmetadata)==null?void 0:m.call(this,u)};return e.addEventListener("timeupdate",n),e.addEventListener("play",o),e.addEventListener("pause",s),e.addEventListener("ended",r),e.addEventListener("error",a),e.addEventListener("canplay",l),e.addEventListener("canplaythrough",c),e.addEventListener("loadeddata",d),e.addEventListener("loadedmetadata",h),()=>{e.removeEventListener("timeupdate",n),e.removeEventListener("play",o),e.removeEventListener("pause",s),e.removeEventListener("ended",r),e.removeEventListener("error",a),e.removeEventListener("canplay",l),e.removeEventListener("canplaythrough",c),e.removeEventListener("loadeddata",d),e.removeEventListener("loadedmetadata",h)}}}function Dw(i){fe(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function Mw(i){let t,e,n,o;const s=i[8].default,r=hi(s,i,i[7],null);return{c(){t=z("div"),r&&r.c(),w(t,"class","audio svelte-13e7hxv"),w(t,"style",i[0])},m(a,l){j(a,t,l),r&&r.m(t,null),e=!0,n||(o=Ce(t,"click",Fd(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&fi(r,s,a,a[7],e?ui(s,a[7],l,null):mi(a[7]),null),(!e||l&1)&&w(t,"style",a[0])},i(a){e||(x(r,a),e=!0)},o(a){L(r,a),e=!1},d(a){a&&V(t),r&&r.d(a),n=!1,o()}}}function Sw(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=cs(),d=rn("hooks"),h=rn("mediaStore");let u,m=!0;function v(){e(5,u.onplay=A=>{d.emit("playStateChange",F({event:A,state:"playing",mediaInstance:u},l)),c("play"),e(6,m=!1)},u),e(5,u.onpause=A=>{d.emit("playStateChange",F({event:A,state:"paused",mediaInstance:u},l)),c("pause"),e(6,m=!0)},u),e(5,u.onended=A=>{d.emit("playStateChange",F({event:A,state:"paused",mediaInstance:u},l)),c("pause"),e(6,m=!0)},u),e(5,u.onloadedmetadata=A=>{typeof u.duration=="number"&&!Number.isNaN(u.duration)&&c("duration",u.duration)},u),e(5,u.onerror=A=>{c("pause"),e(6,m=!0)},u),e(5,u.ontimeupdate=A=>{c("timeupdate",u.currentTime)},u)}h.subscribe(({currentMediaElement:A})=>{A!==u&&(m||u==null||u.pause())});function g(A){u&&(d.emit("click",F({event:A,target:"AudioTagPlayIcon",audioInstance:u},l)),h.set({currentMediaElement:u}),d.emit("playStateChange",F({event:A,state:u.paused?"playing":"paused",mediaInstance:u},l)),u.paused?u.play():u.pause())}return i.$$set=A=>{"url"in A&&e(2,s=A.url),"enable"in A&&e(3,r=A.enable),"style"in A&&e(0,a=A.style),"hooksInfo"in A&&e(4,l=A.hooksInfo),"$$scope"in A&&e(7,o=A.$$scope)},i.$$.update=()=>{i.$$.dirty&4&&(s||c("duration",0)),i.$$.dirty&36&&(u==null||u.dispose(),e(5,u=new xw(s)),c("audioRef",u),setTimeout(()=>c("audioRef",u),200),v()),i.$$.dirty&40&&(r||u==null||u.pause()),i.$$.dirty&72&&c(r&&!m?"play":"pause")},[a,g,s,r,l,u,m,o,n]}let eu=class extends ce{constructor(t){super(),le(this,t,Sw,Mw,ae,{url:2,enable:3,style:0,hooksInfo:4},Dw)}};function Lw(i){fe(i,"svelte-srt2pi",".audio-icon__wrapper.svelte-srt2pi.svelte-srt2pi{display:inline-block}.audio-icon.svelte-srt2pi.svelte-srt2pi{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:50%;background-color:rgba(255, 255, 255, 0.8)}.audio-icon.svelte-srt2pi .sound-wave__container.svelte-srt2pi{position:absolute;pointer-events:none;width:60%;height:60%}.sound-wave.svelte-srt2pi.svelte-srt2pi{animation-duration:2s;animation-iteration-count:infinite;animation-play-state:paused;transition:opacity 0}.playing.svelte-srt2pi .sound-wave.svelte-srt2pi{animation-play-state:running}.playing.svelte-srt2pi .sound-wave-1.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_1_animation}.playing.svelte-srt2pi .sound-wave-2.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_2_animation}.playing.svelte-srt2pi .sound-wave-3.svelte-srt2pi{animation-name:svelte-srt2pi-sound_wave_3_animation}@keyframes svelte-srt2pi-sound_wave_1_animation{0%,10%{opacity:0}25%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_2_animation{0%,35%{opacity:0}50%,100%{opacity:1}}@keyframes svelte-srt2pi-sound_wave_3_animation{0%,60%{opacity:0}75%,100%{opacity:1}}")}function $c(i){let t,e;return t=new Rt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Tw(i){let t,e,n,o,s,r=i[1]&&$c();return{c(){t=z("div"),r&&r.c(),e=ne(),n=z("div"),o=z("div"),o.innerHTML='<svg width="100%" height="100%" viewBox="0 0 128 128"><g transform="rotate(-45 12 64) translate(12 64)" fill="black" stroke="black" fill-opacity="0.6" stroke-opacity="0.6"><path stroke="none" class="sound-wave sound-wave-1 svelte-srt2pi" d="M0,23 A23,23 0 0,0 23,0 L0,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-2 svelte-srt2pi" d="M0,46 A46,46 0 0,0 46,0"></path><path fill="none" stroke-width="15" class="sound-wave sound-wave-3 svelte-srt2pi" d="M0,80 A80,80 0 0,0 80,0"></path></g></svg>',w(o,"class","sound-wave__container svelte-srt2pi"),w(n,"class","audio-icon svelte-srt2pi"),$(n,"playing",i[0]),w(t,"class","audio-icon__wrapper svelte-srt2pi"),w(t,"style",i[2]),T(t,"width",i[5]),T(t,"height",i[5])},m(a,l){j(a,t,l),r&&r.m(t,null),O(t,e),O(t,n),O(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&x(r,1):(r=$c(),r.c(),x(r,1),r.m(t,e)):r&&(de(),L(r,1,1,()=>{r=null}),he()),(!s||l&1)&&$(n,"playing",a[0]),(!s||l&4)&&w(t,"style",a[2]);const c=l&4;(c||l&36)&&T(t,"width",a[5]),(c||l&36)&&T(t,"height",a[5])},i(a){s||(x(r),s=!0)},o(a){L(r),s=!1},d(a){a&&V(t),r&&r.d(),i[7](null),i[8](null)}}}function zw(i,t,e){let n,{playing:o}=t,{shadow:s=!1}=t,{style:r=null}=t,{width:a="100%"}=t,l,c;function d(u){Ke[u?"unshift":"push"](()=>{c=u,e(4,c)})}function h(u){Ke[u?"unshift":"push"](()=>{l=u,e(3,l)})}return i.$$set=u=>{"playing"in u&&e(0,o=u.playing),"shadow"in u&&e(1,s=u.shadow),"style"in u&&e(2,r=u.style),"width"in u&&e(6,a=u.width)},i.$$.update=()=>{i.$$.dirty&64&&e(5,n=typeof a=="number"?Ot(a):a)},[o,s,r,l,c,n,a,d,h]}class tu extends ce{constructor(t){super(),le(this,t,zw,Tw,ae,{playing:0,shadow:1,style:2,width:6},Lw)}}function _w(i){fe(i,"svelte-1s6gk4a",".audio-tag.svelte-1s6gk4a{position:absolute;left:0;top:0;width:0;height:0;overflow:visible}.audio-icon__wrapper.svelte-1s6gk4a{position:relative;vertical-align:top;width:100%;height:100%}.content.svelte-1s6gk4a{width:-moz-max-content;width:max-content;height:3.375rem;padding:2.25rem 0.25rem 0 1rem;position:absolute;left:0;bottom:0.125rem;overflow:hidden;box-sizing:border-box;font-size:0;white-space:nowrap;font-weight:600}.wrapper.svelte-1s6gk4a{position:relative;width:100%;height:100%}.audio-icon.svelte-1s6gk4a{pointer-events:none;vertical-align:top;display:inline-block;width:1rem;height:1rem;margin-right:0.25rem;margin-top:0.0625rem}.audio.svelte-1s6gk4a{position:relative;width:100%;height:100%}")}function ed(i){var A,b;let t,e,n,o,s,r,a,l,c,d,h,u,m,v;e=new Rt({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&td(i);return c=new Qh({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),h=new va({props:{unfolded:i[6],length:i[3],outDelay:i[4]+20*Math.min((b=(A=i[5])==null?void 0:A.length)!=null?b:10,15),useLinearColor:!0}}),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),o=z("div"),s=z("div"),r=z("div"),g&&g.c(),a=ne(),l=z("div"),ie(c.$$.fragment),d=ne(),ie(h.$$.fragment),w(r,"class","audio-icon svelte-1s6gk4a"),T(l,"display","inline-block"),w(s,"class","wrapper svelte-1s6gk4a"),w(o,"class","content svelte-1s6gk4a"),w(t,"class","audio-tag svelte-1s6gk4a"),$(t,"unfolded",i[6])},m(y,E){j(y,t,E),ee(e,t,null),O(t,n),O(t,o),O(o,s),O(s,r),g&&g.m(r,null),O(s,a),O(s,l),ee(c,l,null),O(t,d),ee(h,t,null),u=!0,m||(v=[Ce(l,"click",i[7]),Ut(vi.call(null,l)),Ce(l,"clientWidth",i[12])],m=!0)},p(y,E){var _,M;const k={};E&64&&(k.visible=y[6]),E&8&&(k.left=y[3]/2+"px"),e.$set(k),y[6]?g?(g.p(y,E),E&64&&x(g,1)):(g=td(y),g.c(),x(g,1),g.m(r,null)):g&&(de(),L(g,1,1,()=>{g=null}),he());const S={};E&64&&(S.visible=y[6]),E&2&&(S.textUnfolded=y[1]),E&32&&(S.content=y[5]),c.$set(S);const C={};E&64&&(C.unfolded=y[6]),E&8&&(C.length=y[3]),E&48&&(C.outDelay=y[4]+20*Math.min((M=(_=y[5])==null?void 0:_.length)!=null?M:10,15)),h.$set(C),(!u||E&64)&&$(t,"unfolded",y[6])},i(y){u||(x(e.$$.fragment,y),x(g),x(c.$$.fragment,y),x(h.$$.fragment,y),u=!0)},o(y){L(e.$$.fragment,y),L(g),L(c.$$.fragment,y),L(h.$$.fragment,y),u=!1},d(y){y&&V(t),te(e),g&&g.d(),te(c),te(h),m=!1,rt(v)}}}function td(i){let t,e,n,o,s,r,a;return e=new Rt({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new eu({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[Vw]},$$scope:{ctx:i}}}),o.$on("play",i[8]),o.$on("pause",i[9]),o.$on("error",i[10]),o.$on("audioRef",i[11]),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),ie(o.$$.fragment),w(t,"class","audio svelte-1s6gk4a")},m(l,c){j(l,t,c),ee(e,t,null),O(t,n),ee(o,t,null),a=!0},p(l,c){i=l;const d={};c&64&&(d.enable=i[6]),c&1&&(d.url=i[0].data.audioUrl),c&1&&(d.hooksInfo={tag:i[0]}),c&8196&&(d.$$scope={dirty:c,ctx:i}),o.$set(d)},i(l){a||(x(e.$$.fragment,l),x(o.$$.fragment,l),l&&ot(()=>{a&&(r&&r.end(1),s=Dn(t,In,{duration:1e3,delay:0,easing:oi}),s.start())}),a=!0)},o(l){var c,d;L(e.$$.fragment,l),L(o.$$.fragment,l),s&&s.invalidate(),l&&(r=gi(t,In,{duration:1e3,delay:20*Math.min((d=(c=i[5])==null?void 0:c.length)!=null?d:10,15),easing:oi})),a=!1},d(l){l&&V(t),te(e),te(o),l&&r&&r.end()}}}function Vw(i){let t,e,n;return e=new tu({props:{playing:i[2]}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){j(o,t,s),ee(e,t,null),n=!0},p(o,s){const r={};s&4&&(r.playing=o[2]),e.$set(r)},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&V(t),te(e)}}}function jw(i){let t,e,n=i[0].state&&ed(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=ed(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function Ow(i,t,e){let n,o,s,{tag:r}=t,a=!1,l=!1,c;function d(){e(1,a=!a)}const h=()=>{e(2,l=!0)},u=()=>{e(2,l=!1)},m=()=>{e(2,l=!1)};function v(A){pi.call(this,i,A)}const g=A=>{e(3,c=A.detail)};return i.$$set=A=>{"tag"in A&&e(0,r=A.tag)},i.$$.update=()=>{var A,b,y;i.$$.dirty&1&&e(6,n=!!((A=r.state)!=null&&A.unfolded)),i.$$.dirty&1&&e(5,o=(y=(b=r.data.title)!=null?b:r.data.text)!=null?y:""),i.$$.dirty&2&&e(4,s=a?450:0)},[r,a,l,c,s,o,n,d,h,u,m,v,g]}class Bw extends ce{constructor(t){super(),le(this,t,Ow,jw,ae,{tag:0},_w)}}function Rw(i){fe(i,"svelte-58hfjf",".audio-tag__wrapper.svelte-58hfjf{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.audio-tag.svelte-58hfjf{position:relative;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;padding:0.1875rem;padding-right:0.625rem;border-radius:624999.9375rem;border:0.03125rem solid rgba(255, 255, 255, 0.2)}.audio__inner.svelte-58hfjf{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.text.svelte-58hfjf{font-weight:bold;font-size:0.75rem;margin-left:0.25rem}.audio-icon__wrapper.svelte-58hfjf{position:relative;vertical-align:top;pointer-events:none;width:1.375rem;height:1.375rem}")}function nd(i){let t,e,n,o;return n=new eu({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[Hw]},$$scope:{ctx:i}}}),n.$on("play",i[6]),n.$on("pause",i[7]),n.$on("error",i[8]),n.$on("timeupdate",i[9]),n.$on("duration",i[10]),n.$on("audioRef",i[11]),{c(){t=z("div"),e=z("div"),ie(n.$$.fragment),w(e,"class","audio-tag svelte-58hfjf"),T(e,"background-color",i[4].bgColor),T(e,"color",i[4].fontColor),w(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){j(s,t,r),O(t,e),ee(n,e,null),o=!0},p(s,r){const a={};r&1&&(a.enable=s[0].state.visible),r&1&&(a.url=s[0].data.audioUrl),r&1&&(a.hooksInfo={tag:s[0]}),r&8232&&(a.$$scope={dirty:r,ctx:s}),n.$set(a),r&16&&T(e,"background-color",s[4].bgColor),r&16&&T(e,"color",s[4].fontColor)},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){L(n.$$.fragment,s),o=!1},d(s){s&&V(t),te(n)}}}function Qw(i){let t;return{c(){t=_e(i[5])},m(e,n){j(e,t,n)},p(e,n){n&32&&Oe(t,e[5])},d(e){e&&V(t)}}}function Hw(i){let t,e,n,o,s,r,a;return n=new tu({props:{playing:i[3]}}),r=new Aa({props:{maxWidth:72,$$slots:{default:[Qw]},$$scope:{ctx:i}}}),{c(){t=z("div"),e=z("div"),ie(n.$$.fragment),o=ne(),s=z("div"),ie(r.$$.fragment),w(e,"class","audio-icon__wrapper svelte-58hfjf"),w(s,"class","text svelte-58hfjf"),w(t,"class","audio__inner svelte-58hfjf")},m(l,c){j(l,t,c),O(t,e),ee(n,e,null),O(t,o),O(t,s),ee(r,s,null),a=!0},p(l,c){const d={};c&8&&(d.playing=l[3]),n.$set(d);const h={};c&8224&&(h.$$scope={dirty:c,ctx:l}),r.$set(h)},i(l){a||(x(n.$$.fragment,l),x(r.$$.fragment,l),a=!0)},o(l){L(n.$$.fragment,l),L(r.$$.fragment,l),a=!1},d(l){l&&V(t),te(n),te(r)}}}function Gw(i){let t,e,n=i[0].state&&nd(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=nd(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function Fw(i,t,e){let n,o,{tag:s}=t;const r={light:{bgColor:"rgba(255, 255, 255, 0.3)",fontColor:"rgba(0, 0, 0, 0.6)"},dark:{bgColor:"rgba(0, 0, 0, 0.3)",fontColor:"white"}};let a=0,l=0,c=!1;const d=()=>{e(3,c=!0)},h=()=>{e(3,c=!1)},u=()=>{e(3,c=!1)},m=A=>{e(1,a=A.detail)},v=A=>{e(2,l=A.detail)};function g(A){pi.call(this,i,A)}return i.$$set=A=>{"tag"in A&&e(0,s=A.tag)},i.$$.update=()=>{var A,b,y;i.$$.dirty&1&&e(5,n=(b=(A=s.data.title)!=null?A:s.data.text)!=null?b:""),i.$$.dirty&1&&e(4,o=(y=r[s.data.theme||"light"])!=null?y:r.light)},[s,a,l,c,o,n,d,h,u,m,v,g]}class Ww extends ce{constructor(t){super(),le(this,t,Fw,Gw,ae,{tag:0},Rw)}}function Nw(i){let t,e;return t=new Ww({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Xw(i){let t,e;return t=new Bw({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&1&&(s.tag=n[0]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function Yw(i){let t,e,n,o;const s=[Xw,Nw],r=[];function a(l,c){return l[1]==="line"?0:l[1]==="plane"?1:-1}return~(t=a(i))&&(e=r[t]=s[t](i)),{c(){e&&e.c(),n=Ee()},m(l,c){~t&&r[t].m(l,c),j(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(de(),L(r[d],1,1,()=>{r[d]=null}),he()),~t?(e=r[t],e?e.p(l,c):(e=r[t]=s[t](l),e.c()),x(e,1),e.m(n.parentNode,n)):e=null)},i(l){o||(x(e),o=!0)},o(l){L(e),o=!1},d(l){~t&&r[t].d(l),l&&V(n)}}}function Uw(i,t,e){let n,{tag:o}=t,s;function r(a){s=a.detail}return o.play=()=>s.play(),o.pause=()=>s.pause(),i.$$set=a=>{"tag"in a&&e(0,o=a.tag)},i.$$.update=()=>{var a;i.$$.dirty&1&&e(1,n=(a=o.data.appearance)!=null?a:"line")},[o,n,r]}class qw extends ce{constructor(t){super(),le(this,t,Uw,Yw,ae,{tag:0})}}function Jw(i){fe(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function id(i){var o;let t,e,n;return e=new $h({props:{mediaItemConfig:{canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(o=i[4])!=null?o:"withText",disableVideoIfHavePoster:!1,objectFit:i[2]},unfolded:i[6],mediaData:i[5],enableCarousel:i[1],autoplayConfig:i[3],tag:i[0],inDelay:500,duration:500}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class","media-wrapper svelte-10cw0el")},m(s,r){j(s,t,r),ee(e,t,null),n=!0},p(s,r){var l;const a={};r&20&&(a.mediaItemConfig={canPlay:!0,playButtonSizeIfNeed:"large",playButtonIfNeed:(l=s[4])!=null?l:"withText",disableVideoIfHavePoster:!1,objectFit:s[2]}),r&64&&(a.unfolded=s[6]),r&32&&(a.mediaData=s[5]),r&2&&(a.enableCarousel=s[1]),r&8&&(a.autoplayConfig=s[3]),r&1&&(a.tag=s[0]),e.$set(a)},i(s){n||(x(e.$$.fragment,s),n=!0)},o(s){L(e.$$.fragment,s),n=!1},d(s){s&&V(t),te(e)}}}function Zw(i){let t,e,n=i[0].state&&i[5]&&id(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&x(n,1)):(n=id(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function Kw(i,t,e){let n,o,s,r,a,l,{tag:c}=t;return i.$$set=d=>{"tag"in d&&e(0,c=d.tag)},i.$$.update=()=>{var d,h;i.$$.dirty&1&&e(6,n=c.state?c.state.unfolded:!1),i.$$.dirty&1&&e(5,o=c.data.mediaData),i.$$.dirty&1&&e(1,s=c.data.enableCarousel),i.$$.dirty&1&&e(4,r=c.data.playIcon),i.$$.dirty&3&&e(3,a=(d=c.data.autoplayConfig)!=null?d:{autoplay:s!=null?s:!0,autoplayVideo:!0}),i.$$.dirty&1&&e(2,l=(h=c.data.objectFit)!=null?h:(()=>c.data.adaptationMode==="stretch"?"fill":c.data.adaptationMode==="proportional"?"contain":void 0)())},[c,s,l,a,r,o,n]}class $w extends ce{constructor(t){super(),le(this,t,Kw,Zw,ae,{tag:0},Jw)}}function nu(i){return Y(this,null,function*(){return new Promise((t,e)=>{if(!i){e(Error("url is empty"));return}const n=new Image;n.src=i,n.onload=()=>t({width:n.width,height:n.height}),n.onerror=e})})}function eP(i){return Y(this,null,function*(){const{url:t,ratio:e=3}=i;i.ratio||console.warn("Tag icon ratio is not set, default is 3");const{width:n,height:o}=yield nu(t);return ye(F({},i),{width:n/e,height:o/e})})}function tP(i){return Y(this,null,function*(){const{steps:t,url:e,ratio:n=3,fps:o=24}=i;if(!t)throw new Error("KeyframeIcon requires steps");const{width:s,height:r}=yield nu(e),a=s/n,l=r/n,c=a/t,d=l,h=1/o*t+"s";return ye(F({},i),{width:c,height:d,duration:h})})}function nP(i){fe(i,"svelte-316sq3","@keyframes svelte-316sq3-sprites-animation{0%{background-position:0 0}100%{background-position:100% 0}}.icon-image.svelte-316sq3{display:block;width:auto}.icon-keyframe.svelte-316sq3{background-repeat:no-repeat;background-size:auto 100%;animation-direction:normal;animation-iteration-count:infinite;animation-name:svelte-316sq3-sprites-animation;animation-delay:0}")}function od(i){i[1]=i[19].width}function sd(i){i[1]=i[19].width,i[16]=i[19].height,i[17]=i[19].steps,i[18]=i[19].duration}function rd(i){let t,e,n,o=i[0]&&ad();function s(l,c){return l[8]?oP:iP}let r=s(i),a=r(i);return{c(){t=z("div"),o&&o.c(),e=ne(),a.c(),w(t,"class","icon"),T(t,"width",i[1])},m(l,c){j(l,t,c),o&&o.m(t,null),O(t,e),a.m(t,null),n=!0},p(l,c){l[0]?o?c&1&&x(o,1):(o=ad(),o.c(),x(o,1),o.m(t,e)):o&&(de(),L(o,1,1,()=>{o=null}),he()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&2&&T(t,"width",l[1])},i(l){n||(x(o),n=!0)},o(l){L(o),n=!1},d(l){l&&V(t),o&&o.d(),a.d()}}}function ad(i){let t,e;return t=new Rt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function iP(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:aP,then:rP,catch:sP,value:19};return Xo(e=i[11](He({url:i[7],ratio:i[5]})),n),{c(){t=Ee(),n.block.c()},m(o,s){j(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&160&&e!==(e=i[11](He({url:i[7],ratio:i[5]})))&&Xo(e,n)||$d(n,i,s)},d(o){o&&V(t),n.block.d(o),n.token=null,n=null}}}function oP(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:dP,then:cP,catch:lP,value:19};return Xo(e=i[10](He({url:i[7],steps:i[2],fps:i[6],ratio:i[5]})),n),{c(){t=Ee(),n.block.c()},m(o,s){j(o,t,s),n.block.m(o,n.anchor=s),n.mount=()=>t.parentNode,n.anchor=t},p(o,s){i=o,n.ctx=i,s&228&&e!==(e=i[10](He({url:i[7],steps:i[2],fps:i[6],ratio:i[5]})))&&Xo(e,n)||$d(n,i,s)},d(o){o&&V(t),n.block.d(o),n.token=null,n=null}}}function sP(i){return{c:K,m:K,p:K,d:K}}function rP(i){od(i);let t,e;return{c(){t=z("img"),w(t,"alt","tag-icon"),w(t,"class","icon-image svelte-316sq3"),wt(t.src,e=i[7])||w(t,"src",e),T(t,"width",Ot(Jn({originWidth:i[1],scale:i[4],wantedWidth:i[3]}).width))},m(n,o){j(n,t,o)},p(n,o){od(n),o&128&&!wt(t.src,e=n[7])&&w(t,"src",e),o&184&&T(t,"width",Ot(Jn({originWidth:n[1],scale:n[4],wantedWidth:n[3]}).width))},d(n){n&&V(t)}}}function aP(i){return{c:K,m:K,p:K,d:K}}function lP(i){return{c:K,m:K,p:K,d:K}}function cP(i){sd(i);let t,e=`url(${i[7]})`,n=`steps(${i[17]}, jump-none)`;return{c(){t=z("div"),w(t,"class","icon-keyframe svelte-316sq3"),T(t,"width",Ot(Jn({originWidth:i[1],originHeight:i[16],scale:i[4],wantedWidth:i[3]}).width)),T(t,"height",Ot(Jn({originWidth:i[1],originHeight:i[16],scale:i[4],wantedWidth:i[3]}).height)),T(t,"background-image",e),T(t,"animation-duration",i[18]),T(t,"animation-timing-function",n)},m(o,s){j(o,t,s)},p(o,s){sd(o),s&252&&T(t,"width",Ot(Jn({originWidth:o[1],originHeight:o[16],scale:o[4],wantedWidth:o[3]}).width)),s&252&&T(t,"height",Ot(Jn({originWidth:o[1],originHeight:o[16],scale:o[4],wantedWidth:o[3]}).height)),s&128&&e!==(e=`url(${o[7]})`)&&T(t,"background-image",e),s&228&&T(t,"animation-duration",o[18]),s&228&&n!==(n=`steps(${o[17]}, jump-none)`)&&T(t,"animation-timing-function",n)},d(o){o&&V(t)}}}function dP(i){return{c:K,m:K,p:K,d:K}}function hP(i){let t,e,n=i[9]&&rd(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[9]?n?(n.p(o,s),s&512&&x(n,1)):(n=rd(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function Jn(i){const{originWidth:t,originHeight:e,scale:n=1,wantedWidth:o}=i,s=(o!=null?o:t)*n,r=typeof e=="number"?s*(e/t):void 0;return ye(F({},i),{width:s,height:r})}function uP(i,t,e){let n,o,s,r,a,l,c,d,h,{width:u=null}=t,{icon:m=null}=t,{shadow:v=!1}=t;const g=cs();function A(E){return Y(this,null,function*(){const k=yield tP(E);return g("iconLoaded",k),k})}function b(E){return Y(this,null,function*(){if(typeof h=="number")return ye(F({},E),{width:h});const k=yield eP(E);return g("iconLoaded",k),k})}function y(){d||g("iconLoaded")}return Mt(()=>{y()}),i.$$set=E=>{"width"in E&&e(1,u=E.width),"icon"in E&&e(12,m=E.icon),"shadow"in E&&e(0,v=E.shadow)},i.$$.update=()=>{var E,k;i.$$.dirty&4096&&e(7,n=m==null?void 0:m.url),i.$$.dirty&4096&&e(2,o=(E=m==null?void 0:m.steps)!=null?E:1),i.$$.dirty&4096&&e(6,s=m==null?void 0:m.fps),i.$$.dirty&4096&&e(5,r=m==null?void 0:m.ratio),i.$$.dirty&4096&&e(4,a=(k=m==null?void 0:m.scale)!=null?k:1),i.$$.dirty&4096&&e(3,l=m==null?void 0:m.width),i.$$.dirty&252&&e(9,c=He({url:n,steps:o,fps:s,ratio:r,scale:a,width:l})),i.$$.dirty&4&&e(8,d=o>1),i.$$.dirty&2&&(h=u)},y(),[v,u,o,l,a,r,s,n,d,c,A,b,m]}class iu extends ce{constructor(t){super(),le(this,t,uP,hP,ae,{width:1,icon:12,shadow:0},nP)}}function fP(i){fe(i,"svelte-e58ijk",".wrapper.svelte-e58ijk{font-weight:600;cursor:pointer;width:-moz-max-content;width:max-content;height:-moz-max-content;height:max-content;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:auto}.text-wrapper.svelte-e58ijk{position:relative;display:flex;align-items:center;justify-content:center}.text.svelte-e58ijk{position:absolute;top:0;font-size:0.875rem;color:#ffffff;letter-spacing:0;text-align:center;max-width:8.75rem;width:-moz-max-content;width:max-content;line-height:1.125rem;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function ld(i){let t,e,n,o,s,r;return e=new Rt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=z("div"),ie(e.$$.fragment),n=ne(),o=z("div"),s=_e(i[1]),w(o,"class","text svelte-e58ijk"),w(t,"class","text-wrapper svelte-e58ijk")},m(a,l){j(a,t,l),ee(e,t,null),O(t,n),O(t,o),O(o,s),r=!0},p(a,l){(!r||l&2)&&Oe(s,a[1])},i(a){r||(x(e.$$.fragment,a),r=!0)},o(a){L(e.$$.fragment,a),r=!1},d(a){a&&V(t),te(e)}}}function mP(i){let t,e,n,o;e=new iu({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[4]);let s=i[1]&&i[2]&&ld(i);return{c(){t=z("div"),ie(e.$$.fragment),n=ne(),s&&s.c(),w(t,"class","wrapper svelte-e58ijk")},m(r,a){j(r,t,a),ee(e,t,null),O(t,n),s&&s.m(t,null),o=!0},p(r,[a]){const l={};a&1&&(l.icon=r[0]),e.$set(l),r[1]&&r[2]?s?(s.p(r,a),a&6&&x(s,1)):(s=ld(r),s.c(),x(s,1),s.m(t,null)):s&&(de(),L(s,1,1,()=>{s=null}),he())},i(r){o||(x(e.$$.fragment,r),x(s),o=!0)},o(r){L(e.$$.fragment,r),L(s),o=!1},d(r){r&&V(t),te(e),s&&s.d()}}}function pP(i,t,e){let n,o,s,{tag:r}=t;const a=()=>{e(2,n=!0)};return i.$$set=l=>{"tag"in l&&e(3,r=l.tag)},i.$$.update=()=>{var l,c,d;i.$$.dirty&8&&e(1,o=(l=r.data.title)!=null?l:r.data.text),i.$$.dirty&8&&e(0,s=(d=r.data.icon)!=null?d:(c=r.style)==null?void 0:c.point)},e(2,n=!1),[s,o,n,r,a]}class gP extends ce{constructor(t){super(),le(this,t,pP,mP,ae,{tag:3},fP)}}function vP(i){fe(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function AP(i){let t,e;return{c(){t=new Go(!1),e=Ee(),t.a=e},m(n,o){t.m(i[2],n,o),j(n,e,o)},p:K,d(n){n&&V(e),n&&t.d()}}}function bP(i){let t,e=typeof i[2]=="string"&&AP(i);return{c(){t=z("div"),e&&e.c(),w(t,"class","customElement__container svelte-kzl2aj"),$(t,"unfolded",i[1])},m(n,o){j(n,t,o),e&&e.m(t,null),i[5](t)},p(n,[o]){typeof n[2]=="string"&&e.p(n,o),o&2&&$(t,"unfolded",n[1])},i:K,o:K,d(n){n&&V(t),e&&e.d(),i[5](null)}}}function yP(i,t,e){var d,h;let n,{tag:o}=t,{renderMap:s=new Map}=t,r,a=(h=o.element)!=null?h:(d=s.get(o.contentType))==null?void 0:d.renderer,l;Mt(()=>{r&&(a instanceof Element?(r.appendChild(a),l=()=>{a instanceof Element&&a.remove()}):typeof a=="function"&&(l=a(r,o)))}),hn(()=>{l==null||l()});function c(u){Ke[u?"unshift":"push"](()=>{r=u,e(0,r)})}return i.$$set=u=>{"tag"in u&&e(3,o=u.tag),"renderMap"in u&&e(4,s=u.renderMap)},i.$$.update=()=>{i.$$.dirty&8&&e(1,n=o.state.unfolded)},[r,n,a,o,s,c]}class wP extends ce{constructor(t){super(),le(this,t,yP,bP,ae,{tag:3,renderMap:4},vP)}}function PP(i){fe(i,"svelte-1r4fqvg",'@font-face{font-family:"TG-TYPE";font-style:normal;font-weight:400;src:local("TG-TYPE-Bold"), url(data:application/font-woff2;charset=utf-8;base64,T1RUTwAKAIAAAwAgQ0ZGINFD4CEAAAaQAAAHC0dTVUIAAQAAAAANnAAAAApPUy8yaB5pEwAAAjQAAABgY21hcEItjGUAAAT0AAABfGhlYWQS1WWOAAAAtAAAADZoaGVhBfMBxwAAAhAAAAAkaG10eJ9gBO8AAADsAAABJG1heHAASVAAAAAArAAAAAZuYW1lqczkZQAAApQAAAJecG9zdP+4ADIAAAZwAAAAIAAAUAAASQAAAAEAAAABAADkeHeyXw889QADA+gAAAAA2NoRKwAAAADY2hErACn/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACCAA7AcwA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GAeE/JWYmROSxpklWieax5Ksc9i2BuxrpWerB/LsbTP2BrHaMVath4T7PsN93QVu7FjXFtlZltcZbC7urGzuh8T8oX8ghVPW7zHx7q6yMa9W1BPWVpQHw6i96Tz92/0AbTz93DzA/hp+HkVsIGveKwezmNFtUAbZGeBeGofSmNiRT8aZJVnnmseSrHPYtoboAb7EvukBfcHBvdL+CEFmaySqaQa+9gWxry+yJ6dhoGcHq12oWZmGk5YW1BMXLnKHg4gCiEK+11L91IlCvdiyhWtb6hpJgoeJAoOIQogCqz3pe/3b/UBufX3bfQD+G74dxWyga94rB7NZEW0PhtlaIF4ah9KY2FFPxo7tkTPZh6MjIqKjB+TiJCIjYoIjgaCoKGHoRuanY6QoB+IgfsB+6QF9wcG9y/4IgWYppGnqhr7a/sCFVBbvMjHu7zGyLxbTk5aWk4fDvtd+AojCoz7jBUmCh8kCq1vqGkeDvtdi/cS94wjCvwKBCIKDiD3ru8BvPeuA7z4EhUn967vBw4eoDf/DAmLDAv47BT4exWcEwAHAQFBXW97ipCarPcv8+7yAfdl8gP4aPf6FfIjB+r3gwUiBi77gwWHBjH3gwUkBuP7gwUnJPcxKPsxI/cx+y/y9y/3MPP7MO4GDvtdi/cSJQr3JBZkcqOzsKSksrCkcWdlcnFmHw6up6eurm+naGhvb2hop2+uHwv3EiUK9yP4ChUiCgt3SgWxBrnmBZGVj5eZGgsB2/cSAwtobm5paqBzqoYLAAABAAAAAAAAAAAAAA==) format("woff2")}*{-webkit-tap-highlight-color:transparent}.content__container.svelte-1r4fqvg{position:relative;left:50%;top:50%;transform:translate(-50%, -50%);font-family:PingFangSC, Segoe UI, Rototo, sans-serif}.content__container.withAnimation.svelte-1r4fqvg{transition:opacity 0.3s linear}.content__container.unClickable.svelte-1r4fqvg{pointer-events:none !important}.content__container.unClickable.svelte-1r4fqvg *{pointer-events:none !important}.content__wrapper.svelte-1r4fqvg{pointer-events:none;width:100%;height:100%}.content__container.hide.svelte-1r4fqvg{opacity:0;pointer-events:none}.content__container.hide.svelte-1r4fqvg *{pointer-events:none !important}.content__container.disable.svelte-1r4fqvg{display:none}.content.svelte-1r4fqvg{position:relative;width:100%;height:100%;font-size:0.75rem;color:#fff}.content.svelte-1r4fqvg:not(.unfolded){pointer-events:none}.content.svelte-1r4fqvg:not(.unfolded) *{pointer-events:none !important}.content.unfolded.svelte-1r4fqvg{pointer-events:auto}')}function CP(i){let t,e;return{c(){t=z("div"),w(t,"data-info","tag content is keep folded"),w(t,"data-id",e=i[1].id)},m(n,o){j(n,t,o)},p(n,o){o&2&&e!==(e=n[1].id)&&w(t,"data-id",e)},i:K,o:K,d(n){n&&V(t)}}}function EP(i){let t,e,n,o,s,r,a,l,c,d;const h=[LP,SP,MP,DP,xP,kP],u=[];function m(v,g){return v[1].contentType==="Text"?0:v[1].contentType==="ImageText"||v[1].contentType==="Image"||v[1].contentType==="Video"?1:v[1].contentType==="Audio"?2:v[1].contentType==="Marketing"?3:v[1].contentType==="Link"||v[1].contentType==="VRLink"||v[1].contentType==="PanoLink"||v[1].contentType==="Sticker"?4:v[1].contentType==="MediaPlane"||v[1].contentType==="MediaModel"?5:-1}return~(o=m(i))&&(s=u[o]=h[o](i)),{c(){var v;t=z("div"),e=z("div"),n=z("div"),s&&s.c(),w(n,"class","content svelte-1r4fqvg"),$(n,"unfolded",(v=i[1].state)==null?void 0:v.unfolded),w(e,"class","content__wrapper svelte-1r4fqvg"),w(t,"class",r=Be(it("content__container",i[1].className))+" svelte-1r4fqvg"),w(t,"data-id",a=i[1].id),$(t,"disable",i[1].enabled===!1),$(t,"hide",i[5]),$(t,"withAnimation",i[0]),$(t,"unClickable",i[1].config.clickable===!1),T(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),T(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(v,g){j(v,t,g),O(t,e),O(e,n),~o&&u[o].m(n,null),l=!0,c||(d=Ce(t,"click",Fd(i[15])),c=!0)},p(v,g){var b;let A=o;o=m(v),o===A?~o&&u[o].p(v,g):(s&&(de(),L(u[A],1,1,()=>{u[A]=null}),he()),~o?(s=u[o],s?s.p(v,g):(s=u[o]=h[o](v),s.c()),x(s,1),s.m(n,null)):s=null),(!l||g&2)&&$(n,"unfolded",(b=v[1].state)==null?void 0:b.unfolded),(!l||g&2&&r!==(r=Be(it("content__container",v[1].className))+" svelte-1r4fqvg"))&&w(t,"class",r),(!l||g&2&&a!==(a=v[1].id))&&w(t,"data-id",a),(!l||g&2)&&$(t,"disable",v[1].enabled===!1),(!l||g&34)&&$(t,"hide",v[5]),(!l||g&3)&&$(t,"withAnimation",v[0]),(!l||g&2)&&$(t,"unClickable",v[1].config.clickable===!1),g&2&&T(t,"width",v[1].stickType==="Plane"||v[1].contentType==="MediaModel"?"100%":0),g&2&&T(t,"height",v[1].stickType==="Plane"||v[1].contentType==="MediaModel"?"100%":0)},i(v){l||(x(s),l=!0)},o(v){L(s),l=!1},d(v){v&&V(t),~o&&u[o].d(),c=!1,d()}}}function IP(i){let t,e,n,o,s,r,a;return e=new wP({props:{tag:He(i[1]),renderMap:i[3]}}),{c(){t=z("div"),ie(e.$$.fragment),w(t,"class",n=Be(it("content__container",i[1].className))+" svelte-1r4fqvg"),w(t,"data-id",o=i[1].id),$(t,"custom-tag-disable",i[1].enabled===!1),$(t,"custom-tag-hide",i[5])},m(l,c){j(l,t,c),ee(e,t,null),s=!0,r||(a=Ce(t,"click",i[14]),r=!0)},p(l,c){const d={};c&2&&(d.tag=He(l[1])),c&8&&(d.renderMap=l[3]),e.$set(d),(!s||c&2&&n!==(n=Be(it("content__container",l[1].className))+" svelte-1r4fqvg"))&&w(t,"class",n),(!s||c&2&&o!==(o=l[1].id))&&w(t,"data-id",o),(!s||c&2)&&$(t,"custom-tag-disable",l[1].enabled===!1),(!s||c&34)&&$(t,"custom-tag-hide",l[5])},i(l){s||(x(e.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),s=!1},d(l){l&&V(t),te(e),r=!1,a()}}}function kP(i){let t,e;return t=new $w({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function xP(i){let t,e;return t=new gP({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function DP(i){let t,e;return t=new kw({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function MP(i){let t,e;return t=new qw({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function SP(i){let t,e;return t=new Pw({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function LP(i){let t,e;return t=new Hb({props:{tag:He(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=He(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function TP(i){let t,e,n,o,s;const r=[IP,EP,CP],a=[];function l(c,d){return d&10&&(t=null),t==null&&(t=!!(c[1].element||c[3].has(c[1].contentType))),t?0:c[4]?1:2}return e=l(i,-1),n=a[e]=r[e](i),{c(){n.c(),o=Ee()},m(c,d){a[e].m(c,d),j(c,o,d),s=!0},p(c,[d]){let h=e;e=l(c,d),e===h?a[e].p(c,d):(de(),L(a[h],1,1,()=>{a[h]=null}),he(),n=a[e],n?n.p(c,d):(n=a[e]=r[e](c),n.c()),x(n,1),n.m(o.parentNode,o))},i(c){s||(x(n),s=!0)},o(c){L(n),s=!1},d(c){a[e].d(c),c&&V(o)}}}function zP(i,t,e){let n,o,s,r,a,l,{withAnimation:c=!1}=t,{tag:d}=t,{hooks:h}=t,{renderMap:u=new Map}=t,{state:m}=t,{mediaStore:v}=t,{temporaryState:g}=t;jr("hooks",h),jr("mediaStore",v);let A,b;function y(C){C?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}function E(C,_,M){var X,J;return!(!_.visible||!_.enabled||!M.visible||!((X=C.state)!=null&&X.visible)||((J=C.temporaryState)==null?void 0:J.visible)===!1||pt(C)&&!C.mediaVisible)}const k=C=>h.emit("click",{event:C,target:"TagContent",tag:d}),S=C=>h.emit("click",{event:C,target:"TagContent",tag:d});return i.$$set=C=>{"withAnimation"in C&&e(0,c=C.withAnimation),"tag"in C&&e(1,d=C.tag),"hooks"in C&&e(2,h=C.hooks),"renderMap"in C&&e(3,u=C.renderMap),"state"in C&&e(6,m=C.state),"mediaStore"in C&&e(7,v=C.mediaStore),"temporaryState"in C&&e(8,g=C.temporaryState)},i.$$.update=()=>{var C,_,M,X,J,H,Q,G,B,W,q;i.$$.dirty&2&&e(12,n=(C=d.state)==null?void 0:C.unfolded),i.$$.dirty&2&&e(11,o=(_=d.state)==null?void 0:_.visible),i.$$.dirty&322&&e(13,s=m.visible&&g.visible&&((M=d.state)==null?void 0:M.visible)),i.$$.dirty&2&&(r=d.id),i.$$.dirty&322&&e(5,a=!E(d,m,g)),i.$$.dirty&8192&&y(s),i.$$.dirty&7682&&d.hooks&&(n!==void 0&&n!==b&&(e(10,b=n),n?(J=(X=d.hooks).emit)==null||J.call(X,"unfolded"):(Q=d==null?void 0:(H=d.hooks).emit)==null||Q.call(H,"folded")),o!==void 0&&o!==A&&(e(9,A=o),o?(B=(G=d.hooks).emit)==null||B.call(G,"show"):(q=(W=d.hooks).emit)==null||q.call(W,"hide"))),i.$$.dirty&2&&e(4,l=(()=>!(typeof d.config.unfoldedConfig=="object"&&d.config.unfoldedConfig.keep==="folded"))())},[c,d,h,u,l,a,m,v,g,A,b,o,n,s,k,S]}let ou=class extends ce{constructor(t){super(),le(this,t,zP,TP,ae,{withAnimation:0,tag:1,hooks:2,renderMap:3,state:6,mediaStore:7,temporaryState:8},PP)}};function _P(i){fe(i,"svelte-7aiuwz",'@charset "UTF-8";.tag-point-click-helper.svelte-7aiuwz.svelte-7aiuwz{position:absolute;pointer-events:auto;cursor:pointer;width:calc(100% + 0.75rem);height:calc(100% + 0.75rem);left:50%;top:50%;transform:translate(-50%, -50%)}.tag-point-wrapper.svelte-7aiuwz.svelte-7aiuwz{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.tag-folded-point.svelte-7aiuwz.svelte-7aiuwz,.tag-unfolded-point.svelte-7aiuwz.svelte-7aiuwz{transition:all 0.5s}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.3125rem;height:0.3125rem;border-radius:50%;background-color:white}.tag-point-wrapper.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz:before{content:"";position:absolute;width:0.875rem;height:0.875rem;border-radius:50%;background-color:rgba(0, 0, 0, 0.2)}.tag-point-wrapper.folded.svelte-7aiuwz .tag-folded-point.svelte-7aiuwz{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-7aiuwz .tag-folded-point.svelte-7aiuwz{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-7aiuwz .tag-unfolded-point.svelte-7aiuwz{opacity:1;scale:1}')}function VP(i){let t,e,n,o,s,r,a,l,c,d,h,u;return o=new Rt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new iu({props:{icon:i[2],width:i[1]}}),c.$on("iconLoaded",i[7]),{c(){t=z("div"),e=z("div"),n=ne(),ie(o.$$.fragment),s=ne(),r=z("div"),a=ne(),l=z("div"),ie(c.$$.fragment),w(e,"class","tag-point-click-helper svelte-7aiuwz"),w(r,"class","tag-unfolded-point svelte-7aiuwz"),T(r,"transition-delay",(i[3]?i[5]:0)+"ms"),w(l,"class","tag-folded-point svelte-7aiuwz"),T(l,"transition-delay",(i[3]?i[5]:0)+"ms"),w(t,"class","tag-point-wrapper svelte-7aiuwz"),$(t,"unfolded",i[0]),$(t,"folded",i[3])},m(m,v){j(m,t,v),O(t,e),O(t,n),ee(o,t,null),O(t,s),O(t,r),O(t,a),O(t,l),ee(c,l,null),d=!0,h||(u=Ce(e,"click",i[4]),h=!0)},p(m,[v]){v&8&&T(r,"transition-delay",(m[3]?m[5]:0)+"ms");const g={};v&4&&(g.icon=m[2]),v&2&&(g.width=m[1]),c.$set(g),v&8&&T(l,"transition-delay",(m[3]?m[5]:0)+"ms"),(!d||v&1)&&$(t,"unfolded",m[0]),(!d||v&8)&&$(t,"folded",m[3])},i(m){d||(x(o.$$.fragment,m),x(c.$$.fragment,m),d=!0)},o(m){L(o.$$.fragment,m),L(c.$$.fragment,m),d=!1},d(m){m&&V(t),te(o),te(c),h=!1,u()}}}function jP(i,t,e){let n,o,s,r;const a=rn("hooks");let{tag:l}=t,c,d=!1;const h=()=>{c!==void 0&&clearTimeout(c),d=!0,c=setTimeout(()=>{d=!1},800)},u=g=>{d||a.emit("click",{event:g,target:"TagPoint",tag:l})},m=(()=>l.contentType==="Text"&&l.data.appearance==="plane"?500:800)();function v(g){pi.call(this,i,g)}return i.$$set=g=>{"tag"in g&&e(6,l=g.tag)},i.$$.update=()=>{var g,A,b,y;i.$$.dirty&64&&e(0,n=(g=l.state)==null?void 0:g.unfolded),i.$$.dirty&1&&e(3,o=!n),i.$$.dirty&64&&e(2,s=(b=(A=l.style)==null?void 0:A.point)!=null&&b.url?(y=l.style)==null?void 0:y.point:{url:ZA}),i.$$.dirty&64&&e(1,r=(()=>{var S,C,_,M;const E=(C=(S=l.style)==null?void 0:S.point)==null?void 0:C.width;if(typeof E=="number")return E;const k=(M=(_=l.style)==null?void 0:_.point)==null?void 0:M.size;if(typeof k=="number")return k;if(k==="S")return 18;if(k==="M")return 20;if(k==="L")return 24;if(k==="XL")return 28})())},h(),[n,r,s,o,u,m,l,v]}class OP extends ce{constructor(t){super(),le(this,t,jP,VP,ae,{tag:6},_P)}}function BP(i){fe(i,"svelte-pzwdws",".tag.withAnimation.svelte-pzwdws{transition:opacity 0.3s linear}.tag.hide.svelte-pzwdws{opacity:0;pointer-events:none}.tag.hide.svelte-pzwdws *{pointer-events:none !important}.tag.unClickable.svelte-pzwdws{pointer-events:none !important}.tag.unClickable.svelte-pzwdws *{pointer-events:none !important}.tag.disable.svelte-pzwdws{display:none}.wrapper.svelte-pzwdws{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}")}function RP(i){let t;return{c(){t=z("div"),w(t,"data-info","tag point is disable")},m(e,n){j(e,t,n)},p:K,i:K,o:K,d(e){e&&V(t)}}}function QP(i){let t,e;return t=new OP({props:{tag:i[1]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=n[1]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function HP(i){let t;return{c(){t=z("div"),w(t,"data-info","tag content is disable")},m(e,n){j(e,t,n)},p:K,i:K,o:K,d(e){e&&V(t)}}}function GP(i){let t,e;return t=new ou({props:{mediaStore:i[2],withAnimation:i[0],tag:He(i[1]),hooks:i[15],state:i[4],temporaryState:i[5],renderMap:i[3]}}),{c(){ie(t.$$.fragment)},m(n,o){ee(t,n,o),e=!0},p(n,o){const s={};o&4&&(s.mediaStore=n[2]),o&1&&(s.withAnimation=n[0]),o&2&&(s.tag=He(n[1])),o&16&&(s.state=n[4]),o&32&&(s.temporaryState=n[5]),o&8&&(s.renderMap=n[3]),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){te(t,n)}}}function FP(i){let t,e,n,o,s,r,a,l,c,d;const h=[QP,RP],u=[];function m(b,y){return b[14]?0:1}n=m(i),o=u[n]=h[n](i);const v=[GP,HP],g=[];function A(b,y){return b[13]?0:1}return r=A(i),a=g[r]=v[r](i),{c(){t=z("div"),e=z("div"),o.c(),s=ne(),a.c(),w(e,"class",l=Be(it("wrapper",i[1].className?`${i[1].className}__wrapper`:void 0))+" svelte-pzwdws"),w(e,"data-tag-unfolded",i[6]),w(e,"data-tag-id",i[12]),w(e,"data-content-type",c=i[1].contentType),T(e,"left",i[9]),T(e,"top",i[8]),w(t,"class","tag svelte-pzwdws"),w(t,"data-tag-id",i[12]),$(t,"unClickable",i[1].config.clickable===!1),$(t,"disable",i[11]),$(t,"hide",i[10]),$(t,"withAnimation",i[0]),T(t,"z-index",i[7])},m(b,y){j(b,t,y),O(t,e),u[n].m(e,null),O(e,s),g[r].m(e,null),d=!0},p(b,[y]){let E=n;n=m(b),n===E?u[n].p(b,y):(de(),L(u[E],1,1,()=>{u[E]=null}),he(),o=u[n],o?o.p(b,y):(o=u[n]=h[n](b),o.c()),x(o,1),o.m(e,s));let k=r;r=A(b),r===k?g[r].p(b,y):(de(),L(g[k],1,1,()=>{g[k]=null}),he(),a=g[r],a?a.p(b,y):(a=g[r]=v[r](b),a.c()),x(a,1),a.m(e,null)),(!d||y&2&&l!==(l=Be(it("wrapper",b[1].className?`${b[1].className}__wrapper`:void 0))+" svelte-pzwdws"))&&w(e,"class",l),(!d||y&64)&&w(e,"data-tag-unfolded",b[6]),(!d||y&4096)&&w(e,"data-tag-id",b[12]),(!d||y&2&&c!==(c=b[1].contentType))&&w(e,"data-content-type",c),y&512&&T(e,"left",b[9]),y&256&&T(e,"top",b[8]),(!d||y&4096)&&w(t,"data-tag-id",b[12]),(!d||y&2)&&$(t,"unClickable",b[1].config.clickable===!1),(!d||y&2048)&&$(t,"disable",b[11]),(!d||y&1024)&&$(t,"hide",b[10]),(!d||y&1)&&$(t,"withAnimation",b[0]),y&128&&T(t,"z-index",b[7])},i(b){d||(x(o),x(a),d=!0)},o(b){L(o),L(a),d=!1},d(b){b&&V(t),u[n].d(),g[r].d()}}}function WP(i,t,e){let n,o,s,r,a,l,c,d,h,{withAnimation:u=!1}=t,{tag:m}=t,{mediaStore:v}=t,{renderMap:g=new Map}=t,{state:A}=t,{temporaryState:b}=t;const y=rn("hooks");return i.$$set=E=>{"withAnimation"in E&&e(0,u=E.withAnimation),"tag"in E&&e(1,m=E.tag),"mediaStore"in E&&e(2,v=E.mediaStore),"renderMap"in E&&e(3,g=E.renderMap),"state"in E&&e(4,A=E.state),"temporaryState"in E&&e(5,b=E.temporaryState)},i.$$.update=()=>{var E,k,S,C,_,M,X,J;i.$$.dirty&2&&e(14,n=(()=>{var H,Q;return!(((Q=(H=m.style)==null?void 0:H.point)==null?void 0:Q.enabled)===!1||m.contentType==="Sticker"||m.contentType==="Link"||m.contentType==="VRLink"||m.contentType==="PanoLink"||m.contentType==="Audio"&&m.data.appearance==="plane")})()),i.$$.dirty&2&&e(13,o=(()=>m.stickType==="2DPoint")()),i.$$.dirty&2&&e(12,s=m.id),i.$$.dirty&2&&e(11,r=!((E=m.screenPosition)!=null&&E.leftPercent)||!((k=m.screenPosition)!=null&&k.topPercent)||m.enabled===!1||!m.state),i.$$.dirty&2&&e(10,a=!((S=m.state)!=null&&S.visible)||((C=m.temporaryState)==null?void 0:C.visible)===!1),i.$$.dirty&2&&e(6,l=(_=m.state)==null?void 0:_.unfolded),i.$$.dirty&2&&e(9,c=((M=m.screenPosition)==null?void 0:M.leftPercent)+"%"),i.$$.dirty&2&&e(8,d=((X=m.screenPosition)==null?void 0:X.topPercent)+"%"),i.$$.dirty&66&&e(7,h=((J=m.zIndex)!=null?J:0)+(l?1e4:0))},[u,m,v,g,A,b,l,h,d,c,a,r,s,o,n,y]}class NP extends ce{constructor(t){super(),le(this,t,WP,FP,ae,{withAnimation:0,tag:1,mediaStore:2,renderMap:3,state:4,temporaryState:5},BP)}}function XP(i){fe(i,"svelte-uq11d5",".tag--container.svelte-uq11d5{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;opacity:1;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:translate3d(0, 0, 0)}.withAnimation.svelte-uq11d5{transition:opacity 0.3s linear}.tag--container.hide.svelte-uq11d5{opacity:0;pointer-events:none}.tag--container.hide.svelte-uq11d5 *{pointer-events:none !important}")}function cd(i,t,e){const n=i.slice();return n[7]=t[e],n}function dd(i){let t,e=[],n=new Map,o,s=i[1];const r=a=>a[7].id;for(let a=0;a<s.length;a+=1){let l=cd(i,s,a),c=r(l);n.set(c,e[a]=hd(c,l))}return{c(){t=z("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","tag--container svelte-uq11d5"),$(t,"hide",!i[4].visible||!i[5].visible),$(t,"withAnimation",i[0])},m(a,l){j(a,t,l);for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(t,null);o=!0},p(a,l){l&63&&(s=a[1],de(),e=St(e,l,r,1,a,s,n,t,un,hd,null,cd),he()),(!o||l&48)&&$(t,"hide",!a[4].visible||!a[5].visible),(!o||l&1)&&$(t,"withAnimation",a[0])},i(a){if(!o){for(let l=0;l<s.length;l+=1)x(e[l]);o=!0}},o(a){for(let l=0;l<e.length;l+=1)L(e[l]);o=!1},d(a){a&&V(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function hd(i,t){let e,n,o;return n=new NP({props:{state:t[4],temporaryState:t[5],withAnimation:t[0],tag:t[7],mediaStore:t[2],renderMap:t[3]}}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(s,r){j(s,e,r),ee(n,s,r),o=!0},p(s,r){t=s;const a={};r&16&&(a.state=t[4]),r&32&&(a.temporaryState=t[5]),r&1&&(a.withAnimation=t[0]),r&2&&(a.tag=t[7]),r&4&&(a.mediaStore=t[2]),r&8&&(a.renderMap=t[3]),n.$set(a)},i(s){o||(x(n.$$.fragment,s),o=!0)},o(s){L(n.$$.fragment,s),o=!1},d(s){s&&V(e),te(n,s)}}}function YP(i){let t,e,n=i[4].enabled&&dd(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),j(o,t,s),e=!0},p(o,[s]){o[4].enabled?n?(n.p(o,s),s&16&&x(n,1)):(n=dd(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(de(),L(n,1,1,()=>{n=null}),he())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&V(t)}}}function UP(i,t,e){let{withAnimation:n=!1}=t,{tags:o=[]}=t,{hooks:s}=t,{mediaStore:r}=t,{renderMap:a}=t,{state:l}=t,{temporaryState:c}=t;return jr("hooks",s),i.$$set=d=>{"withAnimation"in d&&e(0,n=d.withAnimation),"tags"in d&&e(1,o=d.tags),"hooks"in d&&e(6,s=d.hooks),"mediaStore"in d&&e(2,r=d.mediaStore),"renderMap"in d&&e(3,a=d.renderMap),"state"in d&&e(4,l=d.state),"temporaryState"in d&&e(5,c=d.temporaryState)},[n,o,r,a,l,c,s]}class qP extends ce{constructor(t){super(),le(this,t,UP,YP,ae,{withAnimation:0,tags:1,hooks:6,mediaStore:2,renderMap:3,state:4,temporaryState:5},XP)}}const JP=new Cu.GLTFLoader;function ZP(i){return new Promise((t,e)=>{function n(s){t(s)}function o(s){e(s)}JP.load(i,n,void 0,o)})}const KP=new Map,$P=new Map;class eC extends nb{constructor(e){super(e);f(this,"group",new R.Group);f(this,"renderMap",new Map);f(this,"imagePlaneGroup",new R.Group);f(this,"gltfObjectGroup",new R.Group);f(this,"enabledModelTagSet",new Set);f(this,"temporaryState",{visible:!0});f(this,"TagContainerSvelte");f(this,"loadModel",e=>Y(this,null,function*(){var a;const n=e.data.modelUrl;if(!n)return;const o=ZP(n).then(l=>{var h,u,m,v,g;const c=Object.assign(l.scene,{customID:e.id,isTagModel:!0,removeEventListener:this.addObjectClickHandler(e,l.scene,A=>{this.hooks.emit("click",{target:"TagModel",tag:e,event:A})})});return c.visible=this.getCurrentVisibleState(e),new R.Matrix4().fromArray(e.matrix).decompose(c.position,c.quaternion,c.scale),c.updateWorldMatrix(!0,!0),c.visible=this.getVisibleByFiveMode(e),(m=(u=(h=this.config)==null?void 0:h.globalConfig)==null?void 0:u.modelConfig)!=null&&m.autoLookAtEnabled&&((g=(v=e.config)==null?void 0:v.modelConfig)!=null&&g.autoLookAtEnabled)&&c.lookAt(this.five.camera.position.clone().setY(c.position.y)),c});e.model={promise:o};const s=yield o;if(((a=e.model)==null?void 0:a.promise)!==o||!this.tags.includes(e))return;e.model.object=s;const r=this.gltfObjectGroup.children.find(l=>l.customID===e.id);if(r&&(this.gltfObjectGroup.remove(r),r.removeEventListener()),this.updateRender3DDomTag(),pt(e)){if(this.getRenderType(e)==="Mesh"&&!e.mediaPlane){const l=e.data.mediaPosition.map(xt);e.mediaPlane=new $l(e.data.mediaData[0].url,e.data.mediaPosition.map(xt),{objectFit:e.data.objectFit});const c=new R.Vector3().addVectors(l[0],l[2]).divideScalar(2);e.mediaPlane.position.copy(c),s.add(e.mediaPlane)}this.getRenderType(e)!=="Mesh"&&(s.updateTagCss3DObjectMatrix=()=>this.updateTagCss3DObjectMatrix(e,s),s.updateTagCss3DObjectMatrix())}return this.gltfObjectGroup.add(s),s}));this.group.name="PanoTagPluginModelGroup",this.gltfObjectGroup.name="PanoTagPluginGLTFObjectGroup",this.imagePlaneGroup.name="ImagePlaneGroup",this.group.add(this.gltfObjectGroup),this.group.add(this.imagePlaneGroup)}registerRenderer(e,n){this.renderMap.set(e,{renderer:n})}clearTags(){this.tags.forEach(e=>{var n,o;(o=(n=e.mediaPlane)==null?void 0:n.parent)==null||o.remove(e.mediaPlane)}),this.tags=[],this.enabledModelTagSet.clear(),this.clearCache(),this.disposeAllCSS3DContainer(),this.updateRenderAllTags()}updateRenderAllTags(){this.enabledModelTagSet.clear(),this.tags.forEach(e=>e.stickType==="Model"&&this.enabledModelTagSet.add(e.id)),this.updateRenderPointTag(),this.updateRender3DDomTag(),this.updateRenderModelTag(),this.updateRenderImagePlane()}updateRenderImagePlane(){this.sort(this.filterImagePlane).forEach(n=>{var l,c,d,h,u;const o=n.data.mediaData[0];if(!o)return;const{url:s,type:r}=o;if(!s||(n.mediaPlane&&(n.mediaPlane.visible=(c=(l=n.state)==null?void 0:l.visible)!=null?c:!0,n.mediaPlane.visible||n.mediaPlane instanceof qr&&((d=n.data.autoplayConfig)!=null&&d.autoplayVideo||n.mediaPlane.pause())),((h=n.mediaPlane)==null?void 0:h.src)===s))return;const a=n.position.map(xt);if(n.mediaPlane&&n.mediaPlane.removeFromParent(),r==="Image")n.mediaPlane=new $l(s,a,{objectFit:n.data.objectFit}),n.config.clickable!==!1&&this.domEvents.addAutoBindEventListener(n.mediaPlane,"click",m=>{this.hooks.emit("click",{tag:n,target:"TagContent",event:m.origDomEvent})});else if(r==="Video"){const m=new qr(s,a,{videoCoverSrc:o.videoCoverUrl,playButton:n.data.playIcon,paused:!((u=n.data.autoplayConfig)!=null&&u.autoplayVideo),objectFit:n.data.objectFit,videoTextureMap:KP,ImageTextureMap:$P});m.onVideoReady=g=>{g.addEventListener("play",()=>this.mediaStore.set({currentMediaElement:m.videoInstance}))},m.initialDomEvents(this.domEvents);const v=g=>(this.five.on("renderFrame",g),()=>this.five.off("renderFrame",g));m.initialRenderHooks(v),n.mediaPlane=m}this.imagePlaneGroup.add(n.mediaPlane)})}updateRender3DDomTag(){this.sort([...this.filterCSS3DTag]).forEach(n=>{var o,s,r,a;if(n.tag3DContentSvelte){const{svelteApp:l,css3DInstance:c,initialNormal:d,currentNormal:h}=n.tag3DContentSvelte;if(l.$set({tag:n,hooks:this.hooks,state:this.state,temporaryState:this.temporaryState}),!d.equals(h)){const u=new R.Quaternion().setFromUnitVectors(d,h);c.css3DObject.setRotationFromQuaternion(u)}return}else{if(pt(n)&&!((o=n.model)!=null&&o.object)||((s=n.state)==null?void 0:s.visible)===!1||!this.state.visible||!this.state.enabled)return;if(this.css3DRenderPlugin||(this.css3DRenderPlugin=ia(this.five)),n.stickType==="3DPoint"&&!n.normal)return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");const l=this.getPositions(n);if(!l)return;const c=this.getTagNormal(n);if(!c)return;const h=(r=this.getTagConfig(n).tag3DConfig)!=null?r:{};if(this.getRenderType(n)==="BehindDom"){h.mode="behind",h.container=document.createElement("div");const v="black";h.container.style.backgroundColor=v,h.container.style.border=`3px solid ${v}`,this.css3DRenderPlugin.hooks.on("render",()=>{var g;if(u.css3DObject.opacityMesh){const A=this.addObjectClickHandler(n,u.css3DObject.opacityMesh,b=>{this.hooks.emit("click",{event:b,target:"TagContent",tag:n})});(g=this.store.css3DRenderDisposer.get(n.id))==null||g.push(A)}})}const u=this.css3DRenderPlugin.create3DDomContainer(l,h);if(!u)return;this.store.css3DRenderDisposer.set(n.id,[u.dispose]);const m=new ou({target:u.container,props:{tag:n,hooks:this.hooks,state:this.state,mediaStore:this.mediaStore,temporaryState:this.temporaryState}});n.tag3DContentSvelte={svelteApp:m,domContainer:u,css3DInstance:u,initialNormal:c,currentNormal:c,dispose:()=>{m.$destroy(),u.dispose()}},pt(n)&&((a=n.model)!=null&&a.object)&&this.updateTagCss3DObjectMatrix(n,n.model.object)}}),this.clearUnusedPanelTag()}updateRenderModelTag(){const e=s=>!this.enabledModelTagSet.has(s.customID),n=this.gltfObjectGroup.children.filter(e);n.forEach(s=>s.removeEventListener()),this.gltfObjectGroup.remove(...n),this.tags.filter(s=>s.stickType==="Model").forEach(s=>{var r;(r=s.model)==null||r.promise.then(a=>{a.visible=this.getCurrentVisibleState(s)})}),this.five.needsRender=!0}updateTagModelVisible(){this.tags.forEach(e=>{var n;e.mediaPlane&&(e.mediaPlane.visible=this.getCurrentVisibleState(e)),(n=e.model)!=null&&n.object&&(e.model.object.visible=this.getCurrentVisibleState(e))})}updateTagCss3DObjectMatrix(e,n){var g,A,b;const o=(A=(g=e.config.tag3DConfig)==null?void 0:g.ratio)!=null?A:.00216,s=(b=e.tag3DContentSvelte)==null?void 0:b.css3DInstance.css3DObject;if(!s)return;const r=pt(e)?e.data.mediaPosition:e.position;if(!r||r.length!==4||!Array.isArray(r[0])||!Array.isArray(r[2]))return;n.updateWorldMatrix(!1,!1);const a=n.matrixWorld,l=new R.Vector3().fromArray(r[0]),c=new R.Vector3().fromArray(r[2]),d=xn(l,c).add(new R.Vector3(0,0,5e-4)),h=new R.Matrix4().setPosition(d),u=new R.Matrix4().makeScale(o,o,o),m=new R.Matrix4().multiply(a).multiply(h).multiply(u);m.decompose(s.position,s.quaternion,s.scale);const v=s.opacityMesh;v&&m.decompose(v.position,v.quaternion,v.scale)}addMediaModelTag(e){return Y(this,null,function*(){const n=e.filter(VA).map(o=>this.loadModel(o));yield Promise.all(n),this.setModelMedialVisible(),this.updateRenderAllTags()})}updateRenderPointTag(){var n;const e=this.filterPointTag;if(this.setTagZIndex(e),this.setPointTagPosition(),this.TagContainerSvelte)this.TagContainerSvelte.$set({tags:e,state:this.state,temporaryState:this.temporaryState});else{const o=(n=this.five.getElement())==null?void 0:n.parentElement;if(!o)return console.error("updateRenderPlaneTag: tag2DContainer not found");this.TagContainerSvelte=new qP({target:o,props:{hooks:this.hooks,tags:e,state:this.state,temporaryState:this.temporaryState,mediaStore:this.mediaStore,renderMap:this.renderMap}})}}updateTagContainerVisible(){var e;(e=this.TagContainerSvelte)==null||e.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation}),this.filterCSS3DTag.forEach(n=>{var o,s,r,a,l;(a=(s=(o=n.tag3DContentSvelte)==null?void 0:o.css3DInstance)==null?void 0:s.css3DObject)==null||a.setVisible((this.state.visible&&((r=n.state)==null?void 0:r.visible))!==!1),(l=n.tag3DContentSvelte)==null||l.svelteApp.$set({state:this.state,temporaryState:this.temporaryState,withAnimation:this.store.visibleWithAnimation})})}disposeAllCSS3DContainer(){for(const[,e]of this.store.css3DRenderDisposer)e==null||e.forEach(n=>n==null?void 0:n());this.store.css3DRenderDisposer=new Map}clearUnusedPanelTag(){this.filter2DPointTag.forEach(e=>{var n;(n=e.tag3DContentSvelte)==null||n.css3DInstance.dispose(),e.tag3DContentSvelte=void 0});for(const[e,n]of this.store.css3DRenderDisposer){const o=this.getTagById(e);(!o||o.stickType==="2DPoint")&&(n==null||n.forEach(s=>s==null?void 0:s()),this.store.css3DRenderDisposer.delete(e))}}}const su="Dnalogel-PanoTagPlugin",tC=i=>`${su}--${i}`;class ns extends eC{constructor(e,n){super(e);f(this,"state",{enabled:!0,visible:!0});f(this,"params");f(this,"debug");f(this,"changeTagModel",(e,n)=>Y(this,null,function*(){e.data=Ye({},e.data,n),yield this.loadModel(e),this.updateRenderAllTags()}));f(this,"handleFiveInitAnimationEnded",()=>{const e=this.five.getCurrentState().mode;this.tags.forEach(n=>{pt(n)&&e==="Panorama"&&this.changeTagMode(n,"front"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags()});f(this,"handleFiveModelShownFloorChange",()=>{this.tags.forEach(e=>{var o,s;const n=this.getTagConfig(e).visibleConfig;typeof n=="object"&&((o=n.visibleFiveMode)!=null&&o.includes("Floorplan")||(s=n.visibleFiveMode)!=null&&s.includes("Mapview"))&&(e.state.visible=this.getVisibleByFiveMode(e))}),this.updateRenderAllTags()});this.params=Ye({},{debug:!1,config:this.config},F({},n)),this.debug=this.params.debug,this.config=this.params.config,FA(1,{namespace:ga.PlayAudio});try{const o=window;Array.isArray(o.__PANOTAGPLUGIN_DEBUG_LIST__)||(o.__PANOTAGPLUGIN_DEBUG_LIST__=[]),o.__PANOTAGPLUGIN_DEBUG_LIST__.push(this),o.__PANOTAGPLUGIN_DEBUG__=this}catch(o){}}load(e,n){return Y(this,null,function*(){var s,r;this.clearTags(),console.debug(su," load:",{data:JSON.parse(JSON.stringify(e))}),this.config=Ye({},this.config,{globalConfig:(s=e.globalConfig)!=null?s:{},contentTypeConfig:(r=e.contentTypeConfig)!=null?r:{}});const o=yield this.addTag(e.tagList,n);if(this.debug)try{SA(this.five,this.tags)}catch(a){console.error(a)}return o})}addTag(e,n){return Y(this,null,function*(){const s=(Array.isArray(e)?e:[e]).map(r=>{var d,h;const a=this.getTagConfig(r),l=JSON.parse(JSON.stringify(r.data));return ye(F({},r),{enabled:(d=r.enabled)!=null?d:!0,id:(h=r.id)!=null?h:dt(),data:Ye(r.data,a.initialData,l),state:F({visible:void 0,unfolded:!this.can("fold",r)},a.initialState),hooks:new ze.Subscribe,initialConfig:r.config,config:a,unfold:()=>this.changeUnfoldedById(r.id,!0),fold:()=>this.changeUnfoldedById(r.id,!1),enable:()=>this.changeEnabledById(r.id,!0),disable:()=>this.changeEnabledById(r.id,!1),destroy:()=>this.destroyTagById(r.id),changeData:u=>this.changeDataById(r.id,u)})}).filter(r=>r.position);return s.forEach(HA),this.tags.push(...s),OA(this.five).then(()=>Y(this,null,function*(){var r,a,l;this.store.eventListenerDisposer&&((a=(r=this.store).eventListenerDisposer)==null||a.call(r)),this.state.enabled&&this.handleEnable(),this.addResizeListener(),this.clearUnusedPanelTag(),this.setVisibleAndUnfolded({withAnimation:(l=n==null?void 0:n.withAnimation)!=null?l:!0}).then(()=>this.updateRenderAllTags()),this.updateRenderAllTags(),yield this.addMediaModelTag(s)}))})}changeConfig(e,n=!0){n?this.config=Ye({},this.config,e):this.config=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeGlobalConfig(e,n=!0){n?this.config.globalConfig=Ye({},this.config.globalConfig,e):this.config.globalConfig=e,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}changeContentTypeConfig(e,n,o=!0){this.config.contentTypeConfig||(this.config.contentTypeConfig={}),o?this.config.contentTypeConfig[e]=Ye({},this.config.contentTypeConfig[e],n):this.config.contentTypeConfig[e]=n,this.updateTagConfig({force:!0}),this.updateRenderAllTags()}show(e){return Y(this,null,function*(){if(this.checkDisposed())return;const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};this.setState({visible:!0},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("show",{userAction:n,withAnimation:o})})}hide(e){return Y(this,null,function*(){if(this.checkDisposed())return;const{userAction:n=!0,withAnimation:o=!1}=e!=null?e:{};this.setState({visible:!1},{userAction:n,visibleWithAnimation:o}),this.hooks.emit("hide",{userAction:n,withAnimation:o})})}enable(e){if(this.checkDisposed())return;const{userAction:n=!0}=e!=null?e:{};this.setState({enabled:!0},{userAction:n}),this.hooks.emit("enable",{userAction:n})}disable(e){if(this.checkDisposed())return;const{userAction:n=!0}=e!=null?e:{};this.setState({enabled:!1},{userAction:n}),this.hooks.emit("disable",{userAction:n})}setState(e,n){if(this.checkDisposed())return;const{userAction:o=!0,visibleWithAnimation:s=!1}=n,r=F({},this.state);this.state=Object.assign(this.state,e),this.store.visibleWithAnimation=s,r.visible!==this.state.visible&&(e.visible?this.handleShow():this.handleHide()),r.enabled!==this.state.enabled&&(e.enabled?this.handleEnable():this.handleDisable()),this.hooks.emit("stateChange",{state:this.state,prevState:r,userAction:o})}dispose(){var e,n,o,s,r,a;this.pauseCurrentMedia(),this.disposeAllCSS3DContainer(),(e=this.TagContainerSvelte)==null||e.$destroy(),this.filterCSS3DTag.forEach(l=>{var c;return(c=l.tag3DContentSvelte)==null?void 0:c.svelteApp.$destroy()}),this.tags=[],(n=this.store.disposers)==null||n.forEach(l=>l==null?void 0:l()),this.store.disposers=[],(s=(o=this.store).eventListenerDisposer)==null||s.call(o),this.store.eventListenerDisposer=void 0,(a=(r=this.store).resizeObserverDisposer)==null||a.call(r),this.store.resizeObserverDisposer=void 0,this.store.resizeObserverDisposerAdding=!1,this.five.scene.remove(this.group),this.group.remove(...this.group.children),this.gltfObjectGroup.remove(...this.gltfObjectGroup.children),this.imagePlaneGroup.remove(...this.imagePlaneGroup.children),this.clearCache(),this.five.needsRender=!0,this.store.disposed=!0,this.hooks.emit("dispose")}changeUnfoldedById(e,n){var a;const o=this.getTagById(e);if(!o)return;const s=this.can("fold",o),r=this.can("unfold",o);if(s&&r){o.state.unfolded=n;const l=this.filterPointTag;(a=this.TagContainerSvelte)==null||a.$set({tags:l})}else console.warn(`tag ${e} cannot be ${n?"unfolded":"folded"}`)}changeEnabledById(e,n){const o=this.getTagById(e);o&&(o.enabled=n,this.updateRenderAllTags())}changeTagNormalById(e,n){const o=this.getTagById(e);o&&o.tag3DContentSvelte&&(o.tag3DContentSvelte.currentNormal=xt(n))}changeDataById(e,n,o=!0){const s=this.getTagById(e);let r=!1;s&&(s.data&&(r=!0),o?s.data=Ye(s.data,n):s.data=F(F({},s.data),n),this.clearUnusedPanelTag(),this.updateRenderAllTags(),r&&s.hooks.emit("dataChanged",s.data))}changeStickTypeById(e,n,o=!0){this.changeTagById(e,n,o)}changeTagById(e,n,o=!0){const s=this.getTagById(e);let r=!1;n&&(n.data&&(r=!0),o?Ye(s,n):Object.assign(s,n),s!=null&&s.tag3DContentSvelte&&(n!=null&&n.normal)&&(s.tag3DContentSvelte.currentNormal=xt(n.normal)),this.updateRenderAllTags(),this.clearUnusedPanelTag(),r&&s.hooks.emit("dataChanged",s.data))}destroyTagById(e){(Array.isArray(e)?e:[e]).forEach(o=>{const s=this.tags.findIndex(r=>r.id===o);s!==-1&&this.tags.splice(s,1)}),this.updateRenderAllTags()}setVisibleAndUnfolded(){return Y(this,arguments,function*({withAnimation:e}={withAnimation:!1}){if(this.isPanorama)return this.setVisible(),e?new Promise(n=>{setTimeout(()=>{this.setUnfoldedByPanoIndex(),n()},10)}):(this.setUnfoldedByPanoIndex(),Promise.resolve())})}handleShow(){this.state.visible=!0,this.group.visible=!0,this.updateTagContainerVisible(),this.updateTagModelVisible(),this.five.needsRender=!0}handleHide(){this.pauseCurrentMedia(),this.state.visible=!1,this.group.visible=!1,this.updateTagContainerVisible(),this.updateTagModelVisible(),this.five.needsRender=!0}handleEnable(){this.state.enabled=!0,this.store.eventListenerDisposer=this.addEventListener(),this.five.scene.children.includes(this.group)||this.five.scene.add(this.group),this.group.traverse(e=>{var n;(n=e==null?void 0:e.updateTagCss3DObjectMatrix)==null||n.call(e)}),this.updateRenderAllTags(),this.five.needsRender=!0}handleDisable(){var e,n,o;this.pauseCurrentMedia(),this.state.enabled=!1,(n=(e=this.store).eventListenerDisposer)==null||n.call(e),this.five.scene.remove(this.group),(o=this.TagContainerSvelte)==null||o.$set({tags:[]}),this.filterCSS3DTag.forEach(s=>{var r;(r=s.tag3DContentSvelte)==null||r.dispose(),s.tag3DContentSvelte=void 0}),this.five.needsRender=!0}addEventListener(){const{five:e,hooks:n}=this,o=this.handleFiveWantsMoveToPano.bind(this),s=this.handleFiveModeChange.bind(this),r=this.handleFiveCameraUpdate.bind(this),a=this.handleFiveCameraUpdateDebounce(),l=this.handleFivePanoArrived.bind(this),c=this.loadVideoFirstFrame.bind(this),d=this.clickhandler.bind(this),h=this.five.currentMode;return h&&this.handleFiveModeChange(h),this.handleFivePanoArrived(),e.on("wantsMoveToPano",o),e.on("modeChange",s),e.on("initAnimationEnded",this.handleFiveInitAnimationEnded),e.on("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.on("cameraUpdate",r),e.on("cameraUpdate",a),e.on("panoArrived",l),e.on("panoArrived",c),n.on("click",d),()=>{e.off("wantsMoveToPano",o),e.off("modeChange",s),e.off("initAnimationEnded",this.handleFiveInitAnimationEnded),e.off("modelShownFloorChange",this.handleFiveModelShownFloorChange),e.off("cameraUpdate",r),e.off("cameraUpdate",a),e.off("panoArrived",l),e.off("panoArrived",c),n.off("click",d),this.store.eventListenerDisposer=void 0}}addResizeListener(){if(!this.store.resizeObserverDisposer&&!this.store.resizeObserverDisposerAdding){const e=this.addResizeObserver();this.store.resizeObserverDisposerAdding=!0,setTimeout(()=>{this.store.resizeObserverDisposer=e,this.store.resizeObserverDisposerAdding=!1},200)}}addResizeObserver(){if(!this.store.disposed)return;const e=this.five.getElement(),n=()=>{this.state.enabled&&(this.show(),this.updateRenderAllTags())},o=()=>{this.state.enabled&&this.hide()},{observe:s,unobserve:r}=Kl(RA(()=>{this.store.resizeObserverDisposer&&o()},500),e),{observe:a,unobserve:l}=Kl(Zl(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){this.setModelMedialVisible(),this.tags.forEach(n=>{pt(n)&&e!=="Panorama"&&this.changeTagMode(n,"behind"),n.state.visible=this.getVisible(n)}),this.updateRenderAllTags()}handleFiveWantsMoveToPano(){this.tags.forEach(e=>{const n=this.getTagConfig(e);typeof n.visibleConfig=="object"&&(n.visibleConfig.keep?e.temporaryState=ye(F({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=ye(F({},e.temporaryState),{visible:!!n.visibleConfig.alwaysShowWhenMovePano}))}),this.updateTagContainerVisible()}clickhandler(e){if(e.target!=="TagPoint")return;if(!e.tag.state)return console.warn("Clickhandler: params.tag.state is undefined");const n=this.can("fold",e.tag),o=this.can("unfold",e.tag);n&&o&&(e.tag.state.unfolded=!e.tag.state.unfolded,e.tag.state.unfolded&&this.tags.forEach(s=>{s.id!==e.tag.id&&s.state&&this.can("fold",s)&&(s.state.unfolded=!1)}),this.updateRenderAllTags())}handleFiveCameraUpdateDebounce(){return Zl(()=>{this.setUnfoldedByCamera(),this.updateRenderAllTags()},100)}handleFiveCameraUpdate(){this.updateRenderPointTag()}handleFivePanoArrived(){return Y(this,null,function*(){var e,n,o;this.setModelMedialVisible(),yield this.setVisibleAndUnfolded(),this.tags.forEach(s=>{s.temporaryState=ye(F({},s.temporaryState),{visible:!0})}),(o=(n=(e=this.config)==null?void 0:e.globalConfig)==null?void 0:n.modelConfig)!=null&&o.autoLookAtEnabled&&this.tags.filter(_A).filter(s=>{var r,a;return(a=(r=s.config)==null?void 0:r.modelConfig)==null?void 0:a.autoLookAtEnabled}).forEach(s=>{var u;const r=new I.Mesh(new I.BoxGeometry,new I.MeshBasicMaterial),a=(u=s.model)==null?void 0:u.object;if(!a)return;r.position.copy(a.position),r.quaternion.copy(a.quaternion);const l=this.five.camera.position;r.lookAt(l.clone().setY(r.position.y));const c=a.quaternion.clone(),d=r.quaternion.clone(),h=ss();h.onUpdate(({progress:m})=>{a.quaternion.copy(c.clone().slerp(d,m))}),h.play()}),this.store.visibleWithAnimation=!0,this.updateTagContainerVisible(),this.updateRenderAllTags()})}setUnfoldedByCamera(){let e=!1;this.tags.forEach(n=>{const o=this.getUnfoldedByCamera(n);n.state&&o!==void 0&&(o===!0&&(e=!0),n.state.unfolded=o)}),e&&this.tags.forEach(n=>{const o=this.getTagConfig(n).unfoldedConfig;typeof o=="object"&&(o.autoUnfold||o.keep)||n.state&&(n.state.unfolded=!1)})}changeTagMode(e,n){var o,s,r,a,l,c;((o=this.getTagConfig(e))==null?void 0:o.renderType)!=="Mesh"&&((a=(r=(s=e.tag3DContentSvelte)==null?void 0:s.css3DInstance)==null?void 0:r.css3DObject)==null?void 0:a.mode)!==n&&((l=e.config)!=null&&l.tag3DConfig?e.config.tag3DConfig.mode=n:e.config?e.config.tag3DConfig={mode:n}:e.config={tag3DConfig:{mode:n}},(c=this.store.css3DRenderDisposer.get(e.id))==null||c.forEach(d=>d==null?void 0:d()),e.tag3DContentSvelte=void 0)}}var ru=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))(ru||{}),au=(i=>(i.Audio="Audio",i.Text="Text",i.ImageText="ImageText",i.Image="Image",i.Video="Video",i.Link="Link",i.Sticker="Sticker",i.VRLink="VRLink",i.PanoLink="PanoLink",i.Marketing="Marketing",i.MediaPlane="MediaPlane",i.MediaModel="MediaModel",i.Model="Model",i.Custom="Custom",i.Unknown="Unknown",i))(au||{}),lu=(i=>(i.Two="2D",i.Three="3D",i))(lu||{});const nC=(i,t)=>new ns(i,t);function iC(i){fe(i,"svelte-b9xhqz",".guide-line__tag.svelte-b9xhqz.svelte-b9xhqz{position:relative}.text-with-distance.svelte-b9xhqz.svelte-b9xhqz{display:flex;flex-direction:column;position:relative;padding:0.125rem 0.25rem;border-radius:0.125rem;background:linear-gradient(to top, rgba(147, 147, 147, 0.3), rgba(74, 74, 74, 0.3));box-shadow:0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.2)}.text-with-distance.svelte-b9xhqz .border.svelte-b9xhqz{position:absolute;top:-50%;right:-50%;bottom:-50%;left:-50%;padding:0.0625rem;border-radius:0.25rem;background:linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);mask-composite:exclude;-webkit-mask-composite:xor;transform:scale(0.5)}.distance-and-name.svelte-b9xhqz.svelte-b9xhqz{display:flex;gap:0.1875rem}.distance.svelte-b9xhqz.svelte-b9xhqz{white-space:nowrap;font-size:0.625rem;line-height:0.875rem;color:#66afff}.name.svelte-b9xhqz.svelte-b9xhqz{opacity:0.6;font-size:0.625rem;line-height:0.875rem;white-space:nowrap;color:#ffffff}.line-name.svelte-b9xhqz.svelte-b9xhqz{color:#fff;white-space:nowrap;font-size:0.625rem;line-height:0.875rem}.guide-line__tag-point.svelte-b9xhqz.svelte-b9xhqz{position:absolute;left:50%;bottom:0.0625rem;width:0.4375rem;height:0.125rem;transform:translateX(-50%);background:#fff;border-radius:50%;opacity:0.5}.guide-line__tag-line.svelte-b9xhqz.svelte-b9xhqz{position:absolute;left:50%;bottom:0.0625rem;width:0.0625rem;height:1.875rem;transform:translateX(-50%);background:linear-gradient(to top, #fff, rgba(255, 255, 255, 0))}.guide-line__tag-content.svelte-b9xhqz.svelte-b9xhqz{position:absolute;left:-0.9375rem;bottom:1.9375rem;display:flex}.guide-line__tag-icon.svelte-b9xhqz.svelte-b9xhqz{width:1.875rem;height:1.875rem;background-size:100%}.guide-line__tag-text.svelte-b9xhqz.svelte-b9xhqz{box-sizing:content-box;height:0.875rem;width:-moz-max-content;width:max-content;margin-top:0.3125rem;transform:translateX(-0.1875rem);white-space:nowrap;font-size:0.625rem;line-height:0.875rem;border:solid transparent;border-width:0.125rem 0.5rem 0.125rem 0.375rem;border-image-source:url('https://vrlab-static.ljcdn.com/release/web/jsl/test2.2ea9ddee.png');border-image-slice:6 25 6 18 fill;color:#fff}")}function ud(i){let t,e;return{c(){t=z("div"),e=_e(i[0]),w(t,"class","guide-line__tag-text svelte-b9xhqz"),T(t,"border-image-source",`url(${i[6]})`)},m(n,o){j(n,t,o),O(t,e)},p(n,o){o&1&&Oe(e,n[0])},d(n){n&&V(t)}}}function fd(i){let t,e,n,o,s=i[5]("全程")+"",r,a,l=i[5]("米")+"",c,d,h,u,m,v,g=i[4]&&md(i);return{c(){t=z("div"),g&&g.c(),e=ne(),n=z("div"),o=z("span"),r=_e(s),a=_e(i[2]),c=_e(l),d=ne(),h=z("span"),u=_e(i[0]),m=ne(),v=z("div"),w(o,"class","distance svelte-b9xhqz"),w(h,"class","name svelte-b9xhqz"),w(n,"class","distance-and-name svelte-b9xhqz"),w(v,"class","border svelte-b9xhqz"),w(t,"class","text-with-distance svelte-b9xhqz")},m(A,b){j(A,t,b),g&&g.m(t,null),O(t,e),O(t,n),O(n,o),O(o,r),O(o,a),O(o,c),O(n,d),O(n,h),O(h,u),O(t,m),O(t,v)},p(A,b){A[4]?g?g.p(A,b):(g=md(A),g.c(),g.m(t,e)):g&&(g.d(1),g=null),b&32&&s!==(s=A[5]("全程")+"")&&Oe(r,s),b&4&&Oe(a,A[2]),b&32&&l!==(l=A[5]("米")+"")&&Oe(c,l),b&1&&Oe(u,A[0])},d(A){A&&V(t),g&&g.d()}}}function md(i){let t,e;return{c(){t=z("span"),e=_e(i[4]),w(t,"class","line-name svelte-b9xhqz")},m(n,o){j(n,t,o),O(t,e)},p(n,o){o&16&&Oe(e,n[4])},d(n){n&&V(t)}}}function oC(i){let t,e,n,o,s,r,a,l,c,d=i[0]&&!i[2]&&ud(i),h=i[2]&&fd(i);return{c(){t=z("div"),e=z("div"),n=ne(),o=z("div"),s=ne(),r=z("div"),a=z("div"),l=ne(),d&&d.c(),c=ne(),h&&h.c(),w(e,"class","guide-line__tag-point svelte-b9xhqz"),w(o,"class","guide-line__tag-line svelte-b9xhqz"),w(a,"class","guide-line__tag-icon svelte-b9xhqz"),T(a,"background-image",`url(${i[1]})`),w(r,"class","guide-line__tag-content svelte-b9xhqz"),w(t,"class","guide-line__tag svelte-b9xhqz"),T(t,"opacity",i[3])},m(u,m){j(u,t,m),O(t,e),O(t,n),O(t,o),O(t,s),O(t,r),O(r,a),O(r,l),d&&d.m(r,null),O(r,c),h&&h.m(r,null)},p(u,[m]){m&2&&T(a,"background-image",`url(${u[1]})`),u[0]&&!u[2]?d?d.p(u,m):(d=ud(u),d.c(),d.m(r,c)):d&&(d.d(1),d=null),u[2]?h?h.p(u,m):(h=fd(u),h.c(),h.m(r,null)):h&&(h.d(1),h=null),m&8&&T(t,"opacity",u[3])},i:K,o:K,d(u){u&&V(t),d&&d.d(),h&&h.d()}}}function sC(i,t,e){let{text:n=""}=t,{icon_url:o=""}=t,{distance:s=0}=t,{opacity:r=1}=t,{name:a=""}=t,{i18n:l=d=>d}=t;const c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHUAAAA2CAMAAADOFiZMAAACEFBMVEUAAACIiIheXl5oaGh6enpsbGxiYmJ9fX1wcHBXV1eBgYFzc3NSUlKNjY2Dg4N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Xytjfyz4MFqBDgLWPGuA05/sqRQobaOzsBMbFQsRhaAWco/A6Z92FAuU446wWL+aHJWcHJtMOzEDwWrU+PyvHEcFRlkutELInT4NFiCRGqA6yQDWfH5jWdFegXLL8V3qDIsNIySHoRsWIGMN/wBY8/mXRosFxrrDCE20EwJzCGQ9XP7crBN46AdHbthmkPvluICccLzgchnDjBD/eqaxKOOtIKGyiEzDqSFOCt7D4X/dlHFDkNCWPu3fjTHGQBgpbI06TkeIpuQ37bbltAlSKstM/g6EdYcEr0jJv2rLfrZXkFKcPhVjMsWY0GGSrTn00H7TakbD11sChd7qa+gCSKdJVitpyvWLlab6uifsieKtLk1N7QZWtvpYXl4aGxsrAtIJBQVNWVlZOTkZGRm2z7bHW0q2lJRkZ2c3NOTn19fV19fn5zfAsmQL8Nhmg66cHOhvKigoSC/Iysk+vH9//jd2n8g6TG7yjbXZYCAMq6s7fBiah4aGLl0aGLhw4f758zuBmpq+vurq6h07dnR1dXTcrqqq2uejqup2R0dXF8jV1X19NTU1O3feu3f+/oWBgUtD++uePHtbLAThNzRClbi+VnseAAAAAElFTkSuQmCC";return i.$$set=d=>{"text"in d&&e(0,n=d.text),"icon_url"in d&&e(1,o=d.icon_url),"distance"in d&&e(2,s=d.distance),"opacity"in d&&e(3,r=d.opacity),"name"in d&&e(4,a=d.name),"i18n"in d&&e(5,l=d.i18n)},[n,o,s,r,a,l,c]}class rC extends ce{constructor(t){super(),le(this,t,sC,oC,ae,{text:0,icon_url:1,distance:2,opacity:3,name:4,i18n:5},iC)}}function aC(i){return i.length===0?[]:i.filter((t,e)=>t!==i[e-1])}const lC=`
582
582
  varying vec2 vUv;
583
583
 
584
584
  void main() {
@@ -665,7 +665,7 @@ void main() {
665
665
  gl_FragColor.a = gl_FragColor.a * linearGradientOpacity();
666
666
  gl_FragColor.a = gl_FragColor.a * flicker;
667
667
  }
668
- `;class Zr{constructor(t,e){f(this,"name","");f(this,"startTagContainer");f(this,"endTagContainer");f(this,"mesh");f(this,"five");f(this,"mode");f(this,"path",[]);f(this,"_curvePath",null);f(this,"_curvePoints",null);f(this,"_panoGroup",[]);f(this,"skippedPositions",null);f(this,"textureUrl","");f(this,"scale",1);f(this,"width",.5);f(this,"unitLength",.5);f(this,"_visibleFloorIndexes",null);f(this,"visible",null);f(this,"modeVisible",!1);f(this,"floorVisible",!0);f(this,"defaultVisible",!1);f(this,"inWalkAnimation",!1);f(this,"customVisible",null);f(this,"parent");f(this,"plugin");f(this,"textureHasLoaded",!1);f(this,"disposed",!1);f(this,"flowAnime",new os({progress:0}).to({progress:1}).duration(1500).repeat(1/0));f(this,"flickerAnime",ss(300).yoyo(!0).repeat(5));f(this,"cacheLengths",[]);f(this,"dispose",()=>{var t,e;this.disposed||(this.disposed=!0,this.parent.hooks.off("show",this.updateVisible),this.parent.hooks.off("hide",this.updateVisible),this.plugin.hooks.off("show",this.updateVisible),this.plugin.hooks.off("hide",this.updateVisible),this.plugin.hooks.off("enable",this.updateVisible),this.plugin.hooks.off("disable",this.updateVisible),this.five.off("modeChange",this.onFiveModeChange),this.five.off("modelShownFloorChange",this.onFiveModelShownFloorChange),this.doHide(),(t=this.startTagContainer)==null||t.plugin.dispose(),(e=this.endTagContainer)==null||e.plugin.dispose())});f(this,"onWalkAnimationStart",()=>{this.inWalkAnimation=!0,this.updateVisible()});f(this,"onWalkAnimationEnd",()=>{this.inWalkAnimation=!1,this.updateVisible()});f(this,"onFiveModeChange",t=>{this.modeVisible=this.mode==="panorama"?ta(t):Md(t),this.updateVisible()});f(this,"onFiveModelShownFloorChange",t=>{this.floorVisible=t===null||this.visibleFloorIndexes===null||this.visibleFloorIndexes.includes(t),this.updateVisible()});f(this,"updateVisible",()=>{const t=(()=>!this.parent.visible||!this.plugin.state.enabled||!this.plugin.state.visible?!1:this.customVisible!==null?this.customVisible:this.inWalkAnimation?!0:this.modeVisible&&this.textureHasLoaded&&this.defaultVisible&&this.floorVisible)();this.visible!==t&&(this.visible=t,t?this.doShow():this.doHide())});f(this,"onFlowAnimeUpdate",t=>{const{progress:e}=t;this.mesh.material.uniforms.vOffset.value=e,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0});f(this,"onFlickerAnimeUpdate",t=>{var o,s;const{progress:e}=t,n=1-e;this.mesh.material.uniforms.flicker.value=n,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0,this.startTagContainer.tag&&kr(this.startTagContainer.tag)&&((o=this.startTagContainer.app)==null||o.$set(ye(F({},this.startTagContainer.tag.data),{opacity:n,name:this.name,distance:Math.floor(this.curvePath.getLength())}))),this.endTagContainer.tag&&kr(this.endTagContainer.tag)&&((s=this.endTagContainer.app)==null||s.$set(ye(F({},this.endTagContainer.tag.data),{opacity:n})))});f(this,"logWarning",t=>aA("GuideLineModeItem: ",t));f(this,"logError",t=>Sh("GuideLineModeItem: ",t));var s,r;this.five=t,this.mode=e.mode,this.plugin=e.plugin,this.parent=e.parent,this.startTagContainer={tag:null,plugin:new ns(this.five)},this.endTagContainer={tag:null,plugin:new ns(this.five)};const n=new I.BufferGeometry,o=new I.ShaderMaterial({vertexShader:lC,fragmentShader:cC,transparent:!0,uniforms:{map:{value:null},useMapColor:{value:0},mapColor:{value:new I.Color},mapOpacity:{value:1},backgroundColor:{value:new I.Color},backgroundOpacity:{value:0},borderColor:{value:new I.Color},borderOpacity:{value:0},opacity:{value:1},flicker:{value:1},maxU:{value:0},vOffset:{value:0}}});this.mesh=new I.Mesh(n,o),this.mesh.name="GuideLineModeItem",this.mode==="panorama"&&(this.parent.hooks.on("walkStart",this.onWalkAnimationStart),this.parent.hooks.on("walkEnded",this.onWalkAnimationEnd)),this.updateVisible(),this.onFiveModeChange(this.five.getCurrentState().mode),this.onFiveModelShownFloorChange((r=(s=this.five.model)==null?void 0:s.shownFloor)!=null?r:null),this.flowAnime.onUpdate(this.onFlowAnimeUpdate),this.flickerAnime.onUpdate(this.onFlickerAnimeUpdate),this.parent.hooks.on("show",this.updateVisible),this.parent.hooks.on("hide",this.updateVisible),this.plugin.hooks.on("show",this.updateVisible),this.plugin.hooks.on("hide",this.updateVisible),this.plugin.hooks.on("enable",this.updateVisible),this.plugin.hooks.on("disable",this.updateVisible),this.plugin.hooks.on("dispose",this.dispose),this.five.on("modeChange",this.onFiveModeChange),this.five.on("modelShownFloorChange",this.onFiveModelShownFloorChange)}get panoGroup(){return this._panoGroup}get visibleFloorIndexes(){return this._visibleFloorIndexes}get curvePath(){return this._curvePath}get curvePoints(){return this._curvePoints}setCustomVisible(t){if(this.disposed)return this.logError("disposed");this.customVisible!==t&&(this.customVisible=t,this.updateVisible())}setDefaultVisible(t){if(this.disposed)return this.logError("disposed");this.defaultVisible!==t&&(this.defaultVisible=t,this.updateVisible())}setUnitSize(t,e){if(this.disposed)return this.logError("disposed");this.width=t,this.unitLength=e,this.setGeometryByPath(this.path,{width:t,unit_length:e})}setScale(t){if(this.disposed)return this.logError("disposed");this.scale=t,this.setGeometryByPath(this.path,{scale:t})}setGeometryByPanoGroup(t,e){if(this.disposed)return this.logError("disposed");if(!this.five.work)return this.logError("setPathByPanoGroup: work is not ready");const n=aC(t);if(this._panoGroup=n,(e==null?void 0:e.skipPanoGroup)!==void 0){const s=e.skipPanoGroup?n.map(r=>this.five.work.observers[r]).map(r=>r.standingPosition.clone()):null;this.skippedPositions=s}const o=this.getPathFromPanoGroup(n,this.five.work,e);this.path=o,this.setGeometryByPath(o,e)}setGeometryByPath(t,e){var d,h,u;if(this.disposed)return this.logError("disposed");const n=(d=e==null?void 0:e.scale)!=null?d:this.scale,o=(h=e==null?void 0:e.width)!=null?h:this.width,s=(u=e==null?void 0:e.unit_length)!=null?u:this.unitLength;this.path=t,this.scale=n,this.width=o,this.unitLength=s;const{geometry:r,maxU:a,curvePath:l,curvePoints:c}=kA({path:t,width:o*n,unitLength:s*n,skipPositions:this.skippedPositions});this._curvePath=l,this._curvePoints=c,this.mesh.geometry=r,this.mesh.material.needsUpdate=!0,this.mesh.material.uniforms.maxU.value=a,this.five.needsRender=!0}setMartial(t){var e;if(this.disposed)return this.logError("disposed");(t==null?void 0:t.visible)!==void 0&&this.setDefaultVisible(t.visible),(t==null?void 0:t.color)!==void 0&&this.setColor(t.color),(t==null?void 0:t.opacity)!==void 0&&this.setOpacity(t.opacity),((e=t==null?void 0:t.texture)==null?void 0:e.url)!==void 0&&this.setTextureUrl(t.texture.url),(t==null?void 0:t.background_color)!==void 0&&this.setBackgroundColor(t.background_color),(t==null?void 0:t.background_opacity)!==void 0&&this.setBackgroundOpacity(t.background_opacity),(t==null?void 0:t.border_color)!==void 0&&this.setBorderColor(t.border_color),(t==null?void 0:t.border_opacity)!==void 0&&this.setBorderOpacity(t.border_opacity)}setColor(t){if(this.disposed)return this.logError("disposed");t&&(this.mesh.material.uniforms.mapColor.value=new I.Color().set(t)),this.mesh.material.uniforms.useMapColor.value=t?1:0,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderColor(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderColor.value=new I.Color().set(t),this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundColor(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundColor.value=new I.Color().set(t),this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.opacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setMapOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.mapOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setTextureUrl(t){if(this.disposed)return this.logError("disposed");this.textureUrl=t,Ui(t).then(e=>{this.disposed||this.textureUrl===t&&(e.wrapT=I.RepeatWrapping,this.textureHasLoaded=!0,this.mesh.material.uniforms.map.value=e,this.mesh.material.uniformsNeedUpdate=!0,this.mesh.material.needsUpdate=!0,this.five.needsRender=!0,this.updateVisible())})}setVisibleFloorIndexes(t){var e,n;if(this.disposed)return this.logError("disposed");this._visibleFloorIndexes=t,this.onFiveModelShownFloorChange((n=(e=this.five.model)==null?void 0:e.shownFloor)!=null?n:null)}setStartTag(t){this.setTag("start",t)}setEndTag(t){this.setTag("end",t)}flicker(){if(this.disposed)return this.logError("disposed");this.flickerAnime.play()}getLengthByPanoGroupIndex(t){return this.disposed?this.logError("disposed"):this.cacheLengths.length!==0?this.cacheLengths[t]:(this.cacheLengths=this.getPanoGroupLengths(),this.cacheLengths[t])}getPanoGroupLengths(){const t=this.panoGroup.map(c=>this.five.work.observers[c]),e=this.curvePoints.length,n=this.curvePath.getLength(),o=e-1,s=n/o,r=this.curvePath.getLengths(o),a=[];let l=0;for(let c=0;c<e;c++){const d=this.curvePoints[c],h=t[l];if(!h)break;h.standingPosition.clone().setY(0).distanceTo(d.clone().setY(0))<s&&(a.push(r[c]),l+=1)}return a}setTag(t,e){const n=t==="start"?this.startTagContainer:this.endTagContainer;e||n.plugin.clearTags();const s=Ye({},{contentType:"Custom",stickType:"2DPoint",config:{visibleConfig:{visibleFiveMode:["Floorplan","Mapview"],followModelVisibility:!1}},style:{point:{enabled:!1}},data:{}},e);n.tag=s,kr(s)&&(n.tag.element=r=>{var c;(c=n.app)==null||c.$destroy();const a=t==="start"?ye(F({},s.data),{name:this.name,distance:Math.floor(this.curvePath.getLength()),i18n:this.plugin.config.i18n}):s.data,l=new rC({target:r,intro:!0,props:a});return n.app=l,()=>l.$destroy()}),n.plugin.load({tagList:[n.tag]})}doShow(){this.mode==="model"&&this.flowAnime.play(),this.five.scene.add(this.mesh),this.startTagContainer.plugin.show(),this.endTagContainer.plugin.show(),this.five.needsRender=!0}doHide(){this.mode==="model"&&this.flowAnime.stop(),this.five.scene.remove(this.mesh),this.startTagContainer.plugin.hide(),this.endTagContainer.plugin.hide(),this.five.needsRender=!0}getPathFromPanoGroup(t,e,n){if(t.length<2)return[];const s=t.map(r=>e.observers[r]).map(r=>r.standingPosition.toArray());return[F({type:"CatmullRomCurve3",points:s},n)]}}function kr(i){return i.contentType==="Custom"}const dC=Object.freeze(Object.defineProperty({__proto__:null,GuideLineModeItem:Zr},Symbol.toStringTag,{value:"Module"}));function pd(i){const t=Math.abs(Math.cos(i.latitude));return new I.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function hC(i,t){const e=pd(i),n=pd(t);return e.angleTo(n)}const uC=i=>Y(exports,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),_o=Math.PI*2;function fC(i){return i>=0&&i<_o?i:(i%_o+_o)%_o}function mC(i){return{longitude:fC(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function pC(i,t,e,n){const o=-i/e,s=i;return o*n+s}function gC(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const cu="v1.0.6",du="CruisePlugin",ys=`${du}@${cu}`,gd=()=>{console.error(`${ys} is disposed`)},vC=()=>{console.warn(`${ys} is disabled`)},AC=()=>{console.error(`${ys} is disabled`)},xr=new Map;class to extends Mn{constructor(e,n){super(e,n);f(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});f(this,"data");f(this,"config");f(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,disposers:[],modeChanging:!1});f(this,"GuideLine");this.config=n,Object.assign(window,{[`__${du}_DEBUG__`]:this});const o=this.setFiveLinearUpdateCamera.bind(this),s=this.setFiveOriginUpdateCamera.bind(this);this.hooks.on("play",o),this.hooks.on("broke",s),this.hooks.on("end",s),this.hooks.on("pause",s),this.privateState.disposers.push(()=>{this.hooks.off("play",o),this.hooks.off("broke",s),this.hooks.off("end",s),this.hooks.off("pause",s)})}load(e,n,o){return Y(this,null,function*(){var d,h,u,m,v,g;if(this.state.disposed)return gd();this.privateState.fiveOriginGetProgress||(h=(d=this.five.controller)==null?void 0:d.cameraMotion)!=null&&h.getProgress||(yield this.waitFiveLoaded(),this.privateState.fiveOriginGetProgress=(m=(u=this.five.controller)==null?void 0:u.cameraMotion)==null?void 0:m.getProgress),this.clear();const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=r,this.hooks.emit("dataChange",r,s);let a=[],l;const c=this.data.keyframes.filter(A=>A.data.panoIndex!==void 0);c.filter((A,b)=>{var y;return A.data.panoIndex!==((y=c[b-1])==null?void 0:y.data.panoIndex)}).map(A=>A.data.panoIndex).forEach(A=>{var y,E;const b=(y=this.five.work.observers[A])==null?void 0:y.floorIndex;if(b!==void 0)if(l===b){const k=a.length-1;a[k]=[...(E=a[k])!=null?E:[],A]}else{l=b;const k=a.length;a[k]=[A]}}),!this.GuideLine&&((v=this.config)==null?void 0:v.useGuideLine)!==!1&&r.useGuildLine!==!1&&(this.GuideLine=fu(this.five,this.config)),(g=this.GuideLine)==null||g.load({routes:a.map(A=>({panoIndexList:A})),config:r.guildPluginOptions}),this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed),n&&this.setState(n,{userAction:o}),console.debug(`${ys} loaded`,r),this.hooks.emit("dataLoaded",r)})}play(e){this.setState({playing:!0},e)}playFrom(e){const{index:n,id:o,userAction:s}=e;this.state.playing&&this.setState({playing:!1},{userAction:s}),this.setState({playing:!0},{userAction:s,playFromIndex:n,playFromId:o})}playFromStart(e){return this.playFrom(ye(F({},e),{index:0}))}pause(e){this.setState({playing:!1},e)}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return gd();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return AC();const o=F({},this.state);this.state=F(F({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),e.playing!==void 0&&e.playing!==o.playing&&this.changePlayState(e.playing,n),e.speed!==void 0&&e.speed!==o.speed&&this.changeSpeed(e.speed,n==null?void 0:n.userAction),Vt(o,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0})}formatData(e){return Y(this,null,function*(){this.five.work||(yield this.waitFiveLoaded());const n=this.five.work.observers,o=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(o.keyframes)return{keyframesId:dt(),keyframes:o.keyframes.map((s,r)=>{var c;const a=o.keyframes[r+1],l=(()=>!a||a.start===void 0||s.end===void 0?0:a.start-s.end)();return ye(F({id:(c=s.uuid)!=null?c:dt(),moveIndex:r,stay:l,index:r},s),{guildPluginOptions:o.guildPluginOptions})})};if(o.panoIndexList){let s=[];const{moveEffect:r,moveToFirstPanoEffect:a,moveToFirstPanoDuration:l}=o;return this.privateState.moveToFirstPanoEffect=a,this.privateState.moveToFirstPanoDuration=l,o.panoIndexList.forEach((c,d)=>{const h=(()=>{var A,b,y,E;const u=o.panoIndexList.slice(d).find(k=>k!==c);if(u===void 0)return;const m=(A=n[c])==null?void 0:A.position,v=(b=n[u])==null?void 0:b.position;if(!v||!m||((y=n[c])==null?void 0:y.floorIndex)!==((E=n[u])==null?void 0:E.floorIndex))return;const g=new I.Vector3().subVectors(v,m);return mC(g.normalize())})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:d,stay:o.stay,data:F({effect:"Move",panoIndex:c,moveEffect:r},h!=null?h:{})}):o.moveType==="moveAndRotate"&&(s.push({moveIndex:d,stay:o.stay,data:{effect:"Move",panoIndex:c,moveEffect:r}}),h&&s.push({moveIndex:d,stay:o.stay,data:F({effect:"Rotate",panoIndex:c},h)}))}),{keyframesId:dt(),keyframes:s.map((c,d)=>F({id:dt(),index:d},c)),guildPluginOptions:o.guildPluginOptions,useGuildLine:o.useGuildLine}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handleEnable(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.enable(),this.hooks.emit("enable",{userAction:n})):((s=this.GuideLine)==null||s.disable(),this.changePlayState(!1,{userAction:n}),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):((s=this.GuideLine)==null||s.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}changePlayState(e,n){this.actionIfStateIsEnabled(()=>{var o;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(o=n==null?void 0:n.userAction)!=null?o:!0})}),e?this.handlePlay(n):this.handlePause(n),this.state.playing=e}handlePlay(e){return Y(this,null,function*(){var m;const{data:n,state:o,privateState:s,hooks:r}=this;if(s.playing||!(n!=null&&n.keyframes)||(n==null?void 0:n.keyframes.length)===0)return;const a=dt();s.playId=a,s.playing=!0,s.broke=!1;const l=n.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(m=e==null?void 0:e.userAction)!=null?m:!0});let d=!1;const u=yield(()=>Y(this,null,function*(){var v,g;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(v=this.data)==null?void 0:v.keyframes.findIndex(A=>A.id===e.playFromId);if(c!=null&&c.keyframeId){const A=(g=this.data)==null?void 0:g.keyframes.find(b=>b.id===c.keyframeId);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:s.moveToFirstPanoEffect,duration:s.moveToFirstPanoDuration})),A){if(A.data.effect==="Move")return A.index;if(A.data.effect==="Rotate"){const b=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(A,{duration:b}),d=!0,A.index+1}}}}))();this.clearPauseData();for(const v of l){if(s.broke||!o.playing||!s.playing||a!==s.playId)return;if(!(u!==void 0&&v.index<u))try{r.emit("playIndexChange",v.index,v),yield this.playKeyframe(v,{moveEffect:d===!1?s.moveToFirstPanoEffect:void 0,duration:d===!1&&typeof s.moveToFirstPanoDuration=="number"?s.moveToFirstPanoDuration:void 0}),v.stay&&(yield gC(v.stay)),d===!1&&(d=!0)}catch(g){return Promise.resolve("broke")}}o.playing&&a===s.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:n,privateState:o,hooks:s}=this;n.playing=!1,o.playing!==!1&&(o.playing=!1,this.setPauseData(),o.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&s.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}playKeyframe(e,n){return Y(this,null,function*(){var s;const{privateState:o}=this;return((s=this.privateState.currentPlayKeyframe)==null?void 0:s.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),o.currentPlayQueue.push(this.getPlayPromise(e,n)),this.actionPromiseQueue()})}addInterruptListener(e){const n=()=>{this.privateState.modeChanging||e()},o=e;return this.five.once("gesture",o),this.five.once("wantsChangeMode",n),()=>{this.five.off("gesture",o),this.five.once("wantsChangeMode",n)}}getPlayPromise(o){return Y(this,arguments,function*(e,n={}){var r;const s=e.data;if(n.duration=(r=n.duration)!=null?r:e.start!==void 0&&e.end!==void 0?e.end-e.start:void 0,!!s)return new Promise((a,l)=>{let c=!1;this.addInterruptListener(()=>{if(!c)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),c=!0,l(new Error("play is interupted"))});try{if(c)return;const d=()=>{a(),c=!0};switch(s.effect){case"Move":this.move(s,n).then(d);break;case"Rotate":this.rotate(s,n).then(d);break;default:this.rotate(s,n).then(d)}}catch(d){}})})}actionPromiseQueue(){return Y(this,null,function*(){const{privateState:e}=this;return new Promise((n,o)=>{if(e.currentPlayQueue.length===0){n();return}const s=e.currentPlayQueue.shift();if(!s){n();return}s.then(n,o)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,n){return Y(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,n);else return Promise.resolve()})}rotate(e,n){return Y(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,n);yield this.updateCamera(e,n)})}updateCamera(o){return Y(this,arguments,function*(e,n={}){const{five:s,privateState:r,state:a}=this,l=(()=>{var m,v;const h=(m=a.config)==null?void 0:m.speedConfig,u=(v=e.rotateSpeed)!=null?v:h==null?void 0:h.rotateSpeed;if((h==null?void 0:h.rotateSpeedUnit)===void 0)return u;if(u!==void 0)return h.rotateSpeedUnit==="rad/ms"?u:u/1e3})(),c=(()=>{if(n.duration)return n.duration;if(l){const h=this.five.getCurrentState();return hC(h,e)/l}return 800})();r.currentPlayKeyframe&&(r.currentPlayKeyframe.originDuration=c);const d=this.getSpeededDuration(c);return new Promise(h=>{uC(()=>s.updateCamera(e,d)),setTimeout(()=>h(),d)})})}changePano(e,n){return Y(this,null,function*(){const{five:o,privateState:s,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===o.panoIndex)return;const a=o.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);const l=(()=>{var u,m;const d=(u=r.config)==null?void 0:u.speedConfig,h=(m=e.moveSpeed)!=null?m:d==null?void 0:d.moveSpeed;if((d==null?void 0:d.moveSpeedUnit)===void 0)return h;if(h!==void 0)return d.moveSpeedUnit==="m/ms"?h:h/1e3})(),c=(()=>{if(n!=null&&n.duration)return n.duration;if(l&&typeof o.panoIndex=="number"&&typeof e.panoIndex=="number"){const d=o.work.observers[o.panoIndex].position,h=o.work.observers[e.panoIndex].position;return d.distanceTo(h)/l}return 800})();s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=c),yield new Promise(d=>{var h,u,m;o.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:this.getSpeededDuration(c),effect:(m=(u=n==null?void 0:n.moveEffect)!=null?u:(h=this.state.config)==null?void 0:h.moveEffect)!=null?m:e.moveEffect,moveCancelCallback:()=>d(),moveEndCallback:()=>d()}),a&&o.once("panoArrived",()=>d())}),a&&(this.privateState.modeChanging=!1)})}changeSpeed(e,n=!0){const{state:o,privateState:s,hooks:r}=this,{currentPlayKeyframe:a}=s;if(r.emit("speedChange",e,{userAction:n}),o.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});s.currentPlayQueue.push(c)}catch(l){}}getSpeededDuration(e){return e/this.state.speed}getProgress(){return this.five.controller.cameraMotion.progress}changeMode(e,n){return Y(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,yield this.five.changeMode(e.mode,e,n),this.privateState.modeChanging=!1)})}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return xr.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return xr.set((n=this.data)==null?void 0:n.keyframesId,{keyframeId:(o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clearPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return xr.delete((n=this.data)==null?void 0:n.keyframesId)}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}handleDispose(){var e,n;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0,(n=this.privateState.disposers)==null||n.forEach(o=>o==null?void 0:o())}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&vC()}waitFiveLoaded(){return Y(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}setFiveLinearUpdateCamera(){this.privateState.fiveOriginGetProgress&&(this.five.controller.cameraMotion.getProgress=e=>{const n=this.five.controller.cameraMotion,o=e-n.startTime;return o<0?0:o>=n.duration?1:1-pC(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){this.privateState.fiveOriginGetProgress&&(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}f(to,"PluginVersion",cu);const bC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yC=i=>new to(i);class hu{constructor(t){f(this,"id");f(this,"renderID");f(this,"isGuideLine",!0);f(this,"panoramaItem");f(this,"modelItem");f(this,"hooks",new ze.Subscribe);f(this,"_visible",!0);f(this,"plugin");f(this,"five");f(this,"logError",t=>Sh("GuideLineItem: ",t));this.id=t.id,this.five=t.five,this.plugin=t.plugin,this.panoramaItem=new Zr(this.five,{mode:"panorama",plugin:this.plugin,parent:this}),this.modelItem=new Zr(this.five,{mode:"model",plugin:this.plugin,parent:this})}get visible(){return this._visible}setData(t){this.setDataByMode("panorama",t),this.setDataByMode("model",t)}setHeightOffset(t){this.modelItem.mesh.position.y=t,this.panoramaItem.mesh.position.y=t}setDataByMode(t,e){var l;const n=t==="panorama"?this.panoramaItem:this.modelItem,o=t==="panorama"?e.panorama_style:e.model_style,s=e.path,r=o,a=o;if(e.pano_group){const c=t==="panorama";n.setGeometryByPanoGroup(e.pano_group,F({skipPanoGroup:c},r))}else e.path&&n.setGeometryByPath(s,r);n.name=e.name,n.setMartial(a),n.setVisibleFloorIndexes((l=e.visible_floor_indexes)!=null?l:null),n.setStartTag(o==null?void 0:o.start_tag),n.setEndTag(o==null?void 0:o.end_tag)}show(){this._visible=!0,this.hooks.emit("show",{userAction:!0})}hide(){this._visible=!1,this.hooks.emit("hide",{userAction:!0})}dispose(){this.panoramaItem.dispose(),this.modelItem.dispose()}walk(t){return Y(this,null,function*(){if(!this.panoramaItem.panoGroup)return;const e=F({panoIndexList:this.panoramaItem.panoGroup},t);this.hooks.emit("walkStart",{userAction:!0});const[n]=yield ii(wC(this.five,e));if(this.hooks.emit("walkEnded",{userAction:!0}),n)return this.logError(n.message)})}}function wC(i,t){return Y(this,null,function*(){if(t.panoIndexList.length===0)return;const e=i.getCurrentState();e.mode!=="Panorama"&&(yield fa(i,["Panorama",{longitude:e.longitude,latitude:0,panoIndex:t.panoIndexList[0]}]));const n=new to(i,{useGuideLine:!1});yield n.load(t),yield new Promise((o,s)=>{const r=i.getCurrentState();let a=t.panoIndexList.slice();r.panoIndex===a[0]&&c(r.panoIndex),n.playFromStart();function l(m){if(m!=="Panorama")return h(new Error("mode not match"))}function c(m){const v=a[0];if(a=a.slice(1),m!==v)return h(new Error("panoIndex not match, wanted: "+v+", got: "+m));if(a.length===0)return u()}function d(){i.off("modeChange",l),i.off("panoArrived",c)}function h(m){d(),s(m)}function u(){d(),o()}i.on("modeChange",l),i.on("panoArrived",c)})})}const PC=Object.freeze(Object.defineProperty({__proto__:null,GuideLineItem:hu},Symbol.toStringTag,{value:"Module"})),uu="v1.1.0",Kr="GuideLinePlugin",vd=`${Kr}@${uu}`;class CC extends Mn{constructor(e,n){super(e,n);f(this,"version",uu);f(this,"name",Kr);f(this,"cruisePlugin");f(this,"itemMap",new Map);f(this,"state",{visible:!1,enabled:!0});f(this,"data");f(this,"heightOffset",0);f(this,"_config");f(this,"_disposed",!1);f(this,"disposedErrorLog",()=>{console.error(`${vd} is disposed`)});this._config=n!=null?n:{},this.cruisePlugin=new to(e,{useGuideLine:!1}),Object.assign(window,{[`__${Kr}_DEBUG__`]:this})}get config(){return this._config}get disposed(){return this._disposed}load(e,n,o=!0){return Y(this,null,function*(){var m,v,g,A,b,y,E;if(this.disposed)return;const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,s),this.data=r;const a=r.config,c={panorama_style:{visible:!!(!r.lines&&r.routes),unit_length:(m=a==null?void 0:a.unitHeight)!=null?m:.4,width:(v=a==null?void 0:a.unitWidth)!=null?v:.6,texture:{url:(g=a==null?void 0:a.arrowTextureUrl)!=null?g:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"}}},d=(b=(A=r.routes)==null?void 0:A.map(k=>{var S;return Ye({},c,{id:(S=k.id)!=null?S:Date.now(),pano_group:k.panoIndexList})}))!=null?b:[],h=(E=(y=r.lines)==null?void 0:y.map(k=>Ye({},c,k)))!=null?E:[],u=[...d,...h];yield this.waitFiveLoaded(),this.clear(),u.forEach(k=>{this.addGuideLineItem(k)}),this.updateTagsEnable(),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),n&&this.setState(n,{userAction:o}),this.hooks.emit("dataLoaded",r),console.debug(`${vd} loaded`,r)})}formatData(e){return Y(this,null,function*(){return this.getDataWithoutVersion(e)})}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.disposed||(this.clear(),this.hooks.emit("dispose"))}setState(e,n){var s;if(this.disposed)return this.disposedErrorLog();const o=F({},this.state);this.state=F(F({},this.state),e),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),Vt(o,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0}),this.five.needsRender=!0)}addGuideLineItem(e){const n=e.render_id||e.id,o=this.itemMap.get(n);o&&this.removeGuideLineItem(o);const s=new hu({five:this.five,id:n,plugin:this});return this.itemMap.set(n,s),e&&s.setData(e),this.heightOffset+=1e-4,s.setHeightOffset(this.heightOffset),s}getGuideLineItemByID(e){return this.itemMap.get(e)}removeGuideLineItem(e){this.itemMap.delete(e.id),e.panoramaItem.dispose(),e.modelItem.dispose()}updateTagsEnable(){const e=[];function n(r){return Array.isArray(r)&&r.every(a=>typeof a=="number")}function o(r,a){return new I.Vector3().fromArray(r).distanceTo(new I.Vector3().fromArray(a))<.01}function s(r){var l;const a=(l=r.tag)==null?void 0:l.position;return n(a)?e.every(c=>{var d;return n((d=c.tag)==null?void 0:d.position)?!o(a,c.tag.position):!0}):!1}this.itemMap.forEach(r=>{const a=r.modelItem.startTagContainer,l=r.modelItem.endTagContainer,c=s(a);c&&e.push(a),a.plugin.setState({enabled:c},{});const d=s(l);d&&e.push(l),l.plugin.setState({enabled:d},{})})}clear(){this.itemMap.forEach(e=>{this.removeGuideLineItem(e)})}handleEnable(e,n=!0){this.hooks.emit(e?"enable":"disable",{userAction:n})}handleVisible(e,n=!0){this.state.enabled&&this.hooks.emit(e?"show":"hide",{userAction:n})}waitFiveLoaded(){return Y(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}getDataWithoutVersion(e){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e}}const fu=(i,t)=>new CC(i,t);function mu(i,t,e){if(e){const o=new I.Vector3().subVectors(i.position,e).applyQuaternion(i.quaternion.clone().inverse()).applyQuaternion(t).add(e);i.position.copy(o)}i.quaternion.copy(t)}class EC extends R.Object3D{constructor(){super()}add(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.add(...e)}remove(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.remove(...e)}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}}class ws extends EC{constructor(e,n){var o;super();f(this,"originObject3D");f(this,"onRender");this.originObject3D=e,this.onRender=(o=n==null?void 0:n.onRender)!=null?o:()=>{}}get helperObject(){return this}render(){this.onRender()}enable(){this.parent.children.includes(this)||this.parent.add(this)}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,n=[]){return e.intersectObject(this,!0,n)}initialPosition(){this.position.add(this.originObject3D.position)}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}setHelperQuaternion(e,n){mu(this,e,n)}applyHelperQuaternion(e,n){if(n){const o=new R.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class IC extends ws{}class kC extends ws{}class xC extends ws{}class pu extends ws{}class DC extends pu{}class MC extends I.Group{constructor(e){super();f(this,"direction");this.direction=e||"x"}}class Ad extends I.Mesh{constructor(e,n,o){super(e,n);f(this,"direction");this.direction=o||"x"}}function SC(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new I.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function Ia(i,t,e){if(!t||!e||!i)return;const n=SC(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new I.Raycaster;return o.setFromCamera(n,i),o}function LC(i,t){return!(Math.abs(i.x-t.x)>1e-5||Math.abs(i.y-t.y)>1e-5||Math.abs(i.z-t.z)>1e-5)}class Dr extends MC{constructor(e){var d;super(e.direction);f(this,"line");f(this,"arrow");f(this,"lineHeight",.4);f(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new I.Color((d=e.color)!=null?d:16214315),o=new I.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:I.DoubleSide}),s=new I.ConeGeometry(.04,.1,32),r=new Ad(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new I.CylinderGeometry(a,a,.4,32),c=new Ad(l,o.clone(),e.direction);c.name=`line-${e.direction}`,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const Mr={X:15618642,Y:4765519,Z:4227839};class ei{static get X(){return new I.Color(Mr.X).convertSRGBToLinear().clone()}static get Y(){return new I.Color(Mr.Y).convertSRGBToLinear().clone()}static get Z(){return new I.Color(Mr.Z).convertSRGBToLinear().clone()}}class TC extends IC{constructor(e){super(e);f(this,"xArrow",new Dr({direction:"x",color:ei.X}));f(this,"yArrow",new Dr({direction:"y",color:ei.Y}));f(this,"zArrow",new Dr({direction:"z",color:ei.Z}));this.add(this.xArrow),this.add(this.yArrow),this.add(this.zArrow)}show(){super.show(),this.xArrow.visible=!0,this.yArrow.visible=!0,this.zArrow.visible=!0}showDraggingHelper(e){this.xArrow.visible=e.includes("x"),this.yArrow.visible=e.includes("y"),this.zArrow.visible=e.includes("z")}dispose(){this.remove(this.xArrow,this.yArrow,this.zArrow)}}function En(i,t){return zC(document.createElement(t!=null?t:"div"),i)}function zC(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function jC(i){const t=En(F({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"99999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},i)),e=()=>{t.style.display!=="block"&&t.style.top&&t.style.left&&(t.style.display="block")};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(s,r)=>{t.style.left=s,t.style.top=r,e()}}}class _C extends xC{constructor(e,n){super(e);f(this,"xCircle");f(this,"yCircle");f(this,"zCircle");f(this,"children",[]);f(this,"angleTips");f(this,"container");(n==null?void 0:n.yzCircleEnable)!==!1&&(this.xCircle=new Sr({direction:"x",color:ei.X})),(n==null?void 0:n.xzCircleEnable)!==!1&&(this.yCircle=new Sr({direction:"y",color:ei.Y})),(n==null?void 0:n.xyCircleEnable)!==!1&&(this.zCircle=new Sr({direction:"z",color:ei.Z})),n!=null&&n.container&&(n==null?void 0:n.angleTipsEnable)!==!1&&(this.container=n==null?void 0:n.container,this.angleTips=jC({display:"none"}),this.container.appendChild(this.angleTips.element)),this.add(...[this.xCircle,this.yCircle,this.zCircle].filter(Boolean)),this.show()}hide(){this.children.forEach(e=>e.hide())}show(){var e;this.children.forEach(n=>n.showCircle()),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var n;this.hide(),this.children.filter(o=>e.includes(o.direction)).forEach(o=>o.showRing()),(n=this.angleTips)==null||n.show()}dispose(){var e,n;this.removeFromParent(),(n=(e=this.angleTips)==null?void 0:e.element)==null||n.remove()}}class Sr extends I.Group{constructor(e){super();f(this,"direction");f(this,"circle");f(this,"ring");f(this,"angleSector");this.direction=e.direction,this.circle=new VC(e),this.ring=new OC(e),this.angleSector=new BC(e),this.add(this.circle,this.ring,this.angleSector),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}showCircle(){this.add(this.circle),this.remove(this.ring,this.angleSector)}showRing(){this.add(this.ring,this.angleSector),this.remove(this.circle)}hide(){this.remove(this.ring,this.angleSector,this.circle)}}class VC extends I.Mesh{constructor(e){var n;super();f(this,"direction");f(this,"gapAngle",.02);f(this,"geometry",new I.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new I.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:I.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}}class OC extends I.Group{constructor(e){super();f(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new I.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new I.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),c=new I.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...o)}}class BC extends I.Mesh{constructor(e){var o;super();f(this,"direction");f(this,"baseAxes");f(this,"angleDirection");switch(e.direction){case"x":this.baseAxes=new I.Vector3(0,0,1);break;case"y":this.baseAxes=new I.Vector3(1,0,0);break;case"z":this.baseAxes=new I.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new I.CircleGeometry(n,48,0,1e-4),this.material=new I.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),this.direction=e.direction,this.angleDirection=this.direction==="z"?1:-1}}function RC(){const i=En({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=En({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=En({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});i.appendChild(t),t.appendChild(e);const n="-4px",o={direction:"nesw",element:en({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:en({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:en({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:en({cursor:"ew-resize",right:n})},l={direction:"nesw",element:en({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:en({cursor:"ns-resize",top:n})},d={direction:"nwse",element:en({cursor:"nwse-resize",left:n,top:n})},h={direction:"ew",element:en({cursor:"ew-resize",left:n})};return new Array(s,a,c,h,o,r,l,d).forEach(m=>t.appendChild(m.element)),{container:i,squares:[o,s,r,a,l,c,d,h]}}function en(i){const t=En(F({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=En({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=En({width:"15px",height:"15px",cursor:i==null?void 0:i.cursor,pointerEvents:"auto",background:"transparent"});return n.draggable=!0,e.appendChild(n),t.appendChild(e),t}class QC extends DC{constructor(e,n,o,s){super(e);f(this,"points",[]);f(this,"cornerPositions",[]);f(this,"css3DInstance");f(this,"plane");f(this,"css3DRenderer",new ti);f(this,"camera");f(this,"scene");f(this,"container");f(this,"enabled",!1);this.camera=o,this.scene=s,this.container=n,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}applyMatrix4(e){var n;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(n=this.plane)==null||n.applyMatrix4(e),this.cornerPositions.forEach(o=>o.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,n){var o;(o=this.plane)==null||o.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((n,o)=>{n.position.copy(e[o])})}applyHelperQuaternion(e,n){var s;const o=(s=this.css3DInstance)==null?void 0:s.css3DObject;if(o){const r=new I.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new I.Vector3().subVectors(this.plane.position,n).applyQuaternion(e).add(n);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new I.Vector3().subVectors(r,n).applyQuaternion(e).add(n);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;this.enabled&&(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}initRectangleScaleHelper(){var a,l;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const n=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!n)return;this.css3DInstance=n,n.appendToElement(this.container);const o=n.css3DObject.container,{container:s,squares:r}=RC();this.points=r.map((c,d)=>({direction:c.direction,point:c.element,position:this.calculatePointPosition(e)[d]})),o.insertBefore(s,(a=o.children[0])!=null?a:null),this.helperObject.position.copy(this.originObject3D.position),(l=this.plane)==null||l.position.copy(this.originObject3D.position)}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("当前物体暂时不支持 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}function gu(i){const t=new I.Box3,e=new I.Vector3;if(i.traverse(n=>{var s;if(n.name==="shadow")return;const o=n.geometry;if(o!==void 0)if((s=o==null?void 0:o.attributes)!=null&&s.position){const r=o.attributes.position;for(let a=0,l=r.count;a<l;a++)e.fromBufferAttribute(r,a).applyMatrix4(n.matrix),t.expandByPoint(e)}else o.vertices.forEach(r=>{const a=r.clone().applyMatrix4(n.matrix);t.expandByPoint(a)})}),!t.isEmpty())return t}class HC extends kC{constructor(e){super(e);f(this,"box");f(this,"outline");f(this,"originObject");f(this,"positionAttribute");this.originObject=e,this.positionAttribute=new I.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}raycasterIntersectObject(e,n){return e.intersectObject(this,!1,n)}raycast(e,n){this.box.raycast(e,n)}update(){const e=gu(this.originObject);if(!e)return;const{min:n,max:o}=e;this.positionAttribute.setXYZ(0,o.x,o.y,o.z),this.positionAttribute.setXYZ(1,n.x,o.y,o.z),this.positionAttribute.setXYZ(2,n.x,n.y,o.z),this.positionAttribute.setXYZ(3,o.x,n.y,o.z),this.positionAttribute.setXYZ(4,o.x,o.y,n.z),this.positionAttribute.setXYZ(5,n.x,o.y,n.z),this.positionAttribute.setXYZ(6,n.x,n.y,n.z),this.positionAttribute.setXYZ(7,o.x,n.y,n.z),this.positionAttribute.needsUpdate=!0}createOutline(){const e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.LineBasicMaterial({color:64767,linewidth:1,opacity:1,depthTest:!1,transparent:!0,toneMapped:!1}),s=new I.LineSegments(n,o);return s.matrixAutoUpdate=!1,s}createBox(){const e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new I.Mesh(n,o)}}class no{constructor(t,e){f(this,"originObject3D");f(this,"hooks");f(this,"disposers",[]);f(this,"helperObject3D");f(this,"camera");f(this,"model");f(this,"scene");f(this,"container");f(this,"domEvents");f(this,"isDragging",!1);f(this,"enabled",!1);f(this,"name","BaseController");f(this,"boundingBox");f(this,"offset");f(this,"onRender");f(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});var c,d;this.hooks=(c=t.sharedHooks)!=null?c:new li,this.camera=t.camera,this.model=t.model,this.originObject3D=t.originObject3D,this.helperObject3D=t.helperObject3D,this.container=t.container,this.scene=t.scene,this.domEvents=new Me(t.camera,t.container),this.onRender=(d=t.onRender)!=null?d:()=>{},this.offset=e==null?void 0:e.offset,this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable();const n=(...h)=>this.onSetOriginObjectScale(...h),o=(...h)=>this.onSetOriginObjectRotate(...h),s=(...h)=>this.onSetOriginObjectPosition(...h),r=(...h)=>this.onApplyOriginObjectScale(...h),a=(...h)=>this.onApplyOriginObjectRotate(...h),l=(...h)=>this.onApplyOriginObjectPosition(...h);this.hooks.on("setObjectScale",n),this.hooks.on("setObjectRotate",o),this.hooks.on("setObjectPosition",s),this.hooks.on("applyObjectPosition",l),this.hooks.on("applyObjectRotate",a),this.hooks.on("applyObjectScale",r),this.disposers.push(()=>{this.hooks.off("setObjectScale",n),this.hooks.off("setObjectRotate",o),this.hooks.off("setObjectPosition",s),this.hooks.off("applyObjectPosition",l),this.hooks.off("applyObjectRotate",a),this.hooks.off("applyObjectScale",r)})}initialHelperPosition(){this.helperObject3D.position.add(this.calculateOffset(this.offset)),this.helperObject3D.initialPosition()}initialHelperQuaternion(){this.helperObject3D.initQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.helperObject3D.enable(),this.render())}disable(){this.enabled&&(this.enabled=!1,this.helperObject3D.disable(),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){var t;(t=this.disposers)==null||t.forEach(e=>e==null?void 0:e()),this.helperObject3D.dispose(),this.render()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,n){if(this.isDragging)return!1}onIntersectionOnModelUpdate(t){}onApplyOriginObjectScale(t){this.applyHelperScaleMatrix4(t.matrix,t.origin)}onApplyOriginObjectRotate(t){this.applyHelperQuaternion(t.quaternion,t.origin)}onApplyOriginObjectPosition(t){this.applyHelperMatrix4(t.matrix)}onSetOriginObjectScale(t){this.helperObject3D.scale.copy(t),this.updateOffsetByScale(t)}onSetOriginObjectRotate(t,e){this.helperObject3D.setHelperQuaternion(t,e)}onSetOriginObjectPosition(t){this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.offset)))}render(){this.onRender()}updateOffsetByScale(t){if(this.boundingBox&&this.offset){const e=this.originObject3D.position,n=new I.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),o=new I.Vector3().subVectors(this.boundingBox.min,e).multiply(t).add(e),s=this.calculateOffset(this.offset,{min:o,max:n});this.helperObject3D.position.copy(s),this.helperObject3D.initialPosition()}}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(ci),s=[];for(const r of o)if(r instanceof I.Mesh||r instanceof I.Group){const a=r instanceof I.Group?r.children.filter(u=>u instanceof I.Mesh):[r];a.forEach(u=>{u.__originalColor__=u.material.color.clone(),u.__originalOpacity__=u.material.opacity});const l=()=>{a.forEach(u=>{u.material.color.set(e),u.material.opacity=n}),this.render()},c=()=>{a.forEach(u=>{u.material.color.copy(u.__originalColor__),u.material.opacity=u.__originalOpacity__}),this.render()},d=()=>{this.isDragging||l()},h=()=>{this.isDragging||c()};for(const u of a)this.domEvents.addEventListener(u,"mouseover",d),this.domEvents.addEventListener(u,"mouseout",h),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(u,"mouseover",d),this.domEvents.removeEventListener(u,"mouseout",h),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;const o=this.helperObject3D.raycasterIntersectObject(t)[0];if(!o)return;const s=o;if(s.object=n,this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<s.point.distanceTo(e))return}return s.object}calculateOffset(t,e){const n=this.originObject3D,o=new I.Vector3(0,0,0);if(!t)return o;const s=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=gu(n),this.boundingBox));if(typeof t.x=="number")o.setX(t.x);else if(typeof t.x=="object"){const r=s();o.setX((r.max.x-r.min.x)*t.x.percents)}if(typeof t.y=="number")o.setY(t.y);else if(typeof t.y=="object"){const r=s();o.setY((r.max.y-r.min.y)*t.y.percents)}if(typeof t.z=="number")o.setZ(t.z);else if(typeof t.z=="object"){const r=s();o.setZ((r.max.z-r.min.z)*t.z.percents)}return o}}class GC extends no{constructor(...e){super(...e);f(this,"name","MoveController");f(this,"startInfo");f(this,"_moveByMouseEnable",!1);f(this,"mouseInfo");f(this,"mousedownEventListenerDisposer");const n=this.helperObject3D;this.hoverListener([n.xArrow,n.yArrow,n.zArrow]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("rotateStart",l),this.hooks.on("rotateEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("rotateStart",l),this.hooks.off("rotateEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}),this.moveByMouseEnable&&this.moveByMouse()}get moveByMouseEnable(){return this._moveByMouseEnable}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(n=>n==null?void 0:n())}moveByMouse(){this._moveByMouseEnable=!0;const e=this.handleMouseDown.bind(this),n=this.handleMouseUp.bind(this);this.hooks.emit("moveByMouseEnable"),setTimeout(()=>{this.container.addEventListener("mousedown",e),this.container.addEventListener("mouseup",n)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener("mousedown",e),this.container.removeEventListener("mouseup",n)}}disableMoveByMouse(){var e;this._moveByMouseEnable=!1,this.hooks.emit("moveByMouseDisable"),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){!this.moveByMouseEnable||this.hooks.emit("wantToMove",e.point)||(this.originObject3D.position.copy(e.point),this.hooks.emit("setObjectPosition",e.point),this.hooks.emit("move",e.point))}onApplyOriginObjectScale(e){}handleMouseDown(e){const{x:n,y:o}=e;this.mouseInfo={x:n,y:o,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;const{x:n,y:o}=e;this.mouseInfo.x===n&&this.mouseInfo.y===o&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}dragStart(e){if(this._moveByMouseEnable||this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=new I.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new I.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(o){case"x":return s;case"y":return r;case"z":return a}})(),c=(()=>{switch(o){case"x":case"y":return a;case"z":return s}})(),d=n.point.clone(),h=new I.Plane;h.setFromNormalAndCoplanarPoint(c,d),this.startInfo={startVectorProject:d.clone().projectOnVector(l),directionVector:l,plane:h},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("moveStart"),this.isDragging=!0}dragging(e){if(!this.isDragging||!this.startInfo)return;const n=Ia(this.camera,e,this.container);return n?(this.move(n),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:n,directionVector:o,startVectorProject:s}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(n,new I.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new I.Matrix4;d.setPosition(c);const h=r.position.clone().applyMatrix4(d);this.hooks.emit("wantToMove",h)||(r.applyMatrix4(d),s.copy(l),this.hooks.emit("applyObjectPosition",{matrix:d}),this.hooks.emit("move",h))}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Oi{constructor(t,e,n,o,s,r){f(this,"helperController");f(this,"five");f(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});f(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});f(this,"onFiveIntersectionOnModelUpdate",(...t)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...t)});const{camera:a,model:l,scene:c}=t,d=t.getElement();if(this.five=t,!a||!l||!d||!c)return;const h=()=>{t.needsRender=!0};this.helperController=new e({camera:a,model:l,originObject3D:n,helperObject3D:o,container:d,scene:c,onRender:h,sharedHooks:r},s),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture),t.on("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate)}dispose(){var t;this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate),(t=this.helperController)==null||t.dispose()}}const FC="v1.0.1",WC="Object3DHelper",ka=`${WC}@${FC}`,NC=()=>{console.error(`${ka} is disposed`)},XC=()=>{console.warn(`${ka} is disabled`)},YC=()=>{console.error(`${ka} is disabled`)};class UC{constructor(t){f(this,"controllers",{});f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"hooks",new li);f(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return Y(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return Y(this,null,function*(){this.setState({visible:!1},t)})}enable(t){this.setState({enabled:!0},t)}disable(t){this.setState({enabled:!1},t)}dispose(){this.setState({disposed:!0})}setState(t,e){if(this.state.disposed)return NC();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return YC();const n=F({},this.state);this.state=F(F({},this.state),t),t.disposed!==void 0&&t.disposed!==n.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}addControllers(t){this.controllers=F(F({},this.controllers),t),this.setState(this.state)}getCurrentState(){return this.state}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(n=>{n.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(n=>{n.hide()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(n=>{n==null||n.dispose()});for(const n in this.controllers){if(!n)continue;const o=n;(e=(t=this.eventListener)[o])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&XC()}}function Lr(i){return i*Math.PI/180}class qC extends no{constructor(...e){var c,d,h;super(...e);f(this,"name","RotateController");f(this,"startInfo");f(this,"removeListener");const n=this.helperObject3D;this.hoverListener([(c=n.xCircle)==null?void 0:c.circle,(d=n.yCircle)==null?void 0:d.circle,(h=n.zCircle)==null?void 0:h.circle].filter(Boolean));const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.removeListener=()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}}get rotateCenter(){return this.helperObject3D.position.clone()}initialHelperQuaternion(){this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}setRotateAngle(e){const{x:n=0,y:o=0,z:s=0}=e,r=new I.Euler(Lr(n),Lr(o),Lr(s)),a=new I.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:d}=this;mu(c,a,d),this.hooks.emit("setObjectRotate",a,d),this.hooks.emit("rotate",a),this.render()}dispose(){this.removeListener(),super.dispose()}onApplyOriginObjectRotate(e){this.isDragging||super.onApplyOriginObjectRotate(e)}onApplyOriginObjectScale(e){}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=n.point,r=this.getAngleHelper(o);this.setTipsAngle(0);const a=s.clone();a.y+=.2,this.setTipsPosition(a);const l=(()=>{if(o==="x")return new I.Vector3(1,0,0).applyQuaternion(this.originObject3D.quaternion);if(o==="y")return new I.Vector3(0,1,0).applyQuaternion(this.originObject3D.quaternion);if(o==="z")return new I.Vector3(0,0,1).applyQuaternion(this.originObject3D.quaternion)})(),c=new I.Plane().setFromNormalAndCoplanarPoint(l,s),h=c.projectPoint(s.clone(),new I.Vector3).clone().sub(this.rotateCenter),u=h.angleTo(r.baseAxes.clone().applyQuaternion(this.originObject3D.quaternion));this.setAngleHelperStart(o,u),this.setAngleHelperLength(o,0),this.startInfo={direction:o,startVector:h,plane:c,angleHelper:r,angle:0,objectQuaternion:this.originObject3D.quaternion.clone()},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("rotateStart"),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const n=Ia(this.camera,e,this.container);return n?(this.rotate(n),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:n,plane:o,angleHelper:s,direction:r,objectQuaternion:a}=this.startInfo,{originObject3D:l}=this,c=e.ray.intersectPlane(o,new I.Vector3);if(!c)return;const d=this.rotateCenter.clone(),u=o.projectPoint(c.clone(),new I.Vector3).clone().sub(d);if(n.angleTo(u)===0)return;const m=new I.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize()),v=l.quaternion.clone().premultiply(m);if(this.hooks.emit("wantToRotate",v))return;const b=new I.Euler().setFromQuaternion(new I.Quaternion().setFromUnitVectors(n.clone().normalize().applyQuaternion(a.clone().inverse()),u.clone().normalize().applyQuaternion(a.clone().inverse())),`${r.toUpperCase()}${"XZY".replace(r.toUpperCase(),"")}`)[r]*s.angleDirection;if(this.startInfo.angle+=b,this.setAngleHelperLength(r,this.startInfo.angle),this.setTipsAngle(lh(this.startInfo.angle)),d){const y=new I.Vector3().subVectors(l.position,d).applyQuaternion(m).add(d);l.position.copy(y)}l.applyQuaternion(m),this.hooks.emit("applyObjectRotate",{quaternion:m,origin:d}),this.hooks.emit("rotate",l.quaternion),this.startInfo.startVector=u}dragEnd(){this.isDragging&&(this.hooks.emit("setObjectRotate",this.originObject3D.quaternion,this.rotateCenter),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){var n,o,s;switch(e){case"x":return(n=this.helperObject3D.xCircle)==null?void 0:n.angleSector;case"y":return(o=this.helperObject3D.yCircle)==null?void 0:o.angleSector;case"z":return(s=this.helperObject3D.zCircle)==null?void 0:s.angleSector}}setAngleHelperStart(e,n){const o=this.getAngleHelper(e);if(!o){console.warn("angleHelper is undefined");return}if(o instanceof I.Mesh&&o.geometry instanceof I.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new I.CircleGeometry(s,r,n,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,n){const s=n>=0?Math.max(n,.001):Math.min(n,-.001),r=this.getAngleHelper(e);if(r instanceof I.Mesh&&r.geometry instanceof I.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new I.CircleGeometry(a,c,l,s)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var o;const n=(o=this.helperObject3D.angleTips)==null?void 0:o.element;n&&(n.innerText=`${e.toFixed(0)}°`)}setTipsPosition(e){const n=this.helperObject3D.angleTips;if(!n)return;const o=e.project(this.camera),{x:s,y:r,z:a}=o;if(a>1)return;const l=(s+1)/2*100+"%",c=(-r+1)/2*100+"%";n.setLeftTop(l,c)}}class JC extends no{constructor(...e){super(...e);f(this,"startInfo");f(this,"name","RectangleScaleController")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}onApplyOriginObjectPosition(e){this.isDragging||super.onApplyOriginObjectPosition(e)}onApplyOriginObjectScale(e){this.helperObject3D.applyHelperScaleMatrix4(e.matrix,e.origin)}getDragPlane(){const e=new I.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new R.Vector3),n[0]):e.setFromCoplanarPoints(n[0],n[1],n[2]),e}dragStart(e,n){var s,r;(r=(s=this.helperObject3D).updatePoints)==null||r.call(s);const o=this.getDragPlane();if(!o)return this.dragEnd();this.startInfo={startPoint:{position:n.position.clone(),direction:n.direction},plane:o},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const n=Ia(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n)}scale(e){var X,J;if(!this.startInfo)return;const n=this.originObject3D,{startPoint:o,plane:s}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(s,new R.Vector3);if(!a||LC(a,this.camera.position))return;const l=new R.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=o,h=new R.Vector3().subVectors(r[1],r[0]),u=new R.Vector3().subVectors(r[3],r[0]),m=H=>{const Q=new R.Vector3(0,0,0);if(!this.startInfo)return Q;const G=(H==="ew"?h:u).clone(),B=c.clone().projectOnVector(G),W=a.clone().projectOnVector(G),q=l.clone().projectOnVector(G);if(W.equals(B))return Q;if(H==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const re=new R.Vector3().subVectors(W,q),oe=re.x<0&&G.x>=0,Ae=re.y<0&&G.y>=0,we=re.z<0&&G.z>=0;this.startInfo.dragPointInCenterBottom=oe||Ae||we}if(H==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const re=new R.Vector3().subVectors(W,q),oe=re.x<0&&G.x>=0,Ae=re.y<0&&G.y>=0,we=re.z<0&&G.z>=0;this.startInfo.dragPointInCenterLeft=oe||Ae||we}const U=new R.Vector3().subVectors(W,B),Z=U.length();return Z>.3?(console.warn("offset.length() > 0.3, skipped",Z),Q):U},v=m("ew"),g=m("ns"),A=()=>{const H=v;this.helperObject3D.cornerPositions.forEach((Q,G)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterLeft?(G===0||G===3)&&Q.add(H):(G===1||G===2)&&Q.add(H)})},b=()=>{const H=g;this.helperObject3D.cornerPositions.forEach((Q,G)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterBottom?(G===0||G===1)&&Q.add(H):(G===2||G===3)&&Q.add(H)})};switch(d){case"ew":A();break;case"ns":b();break;case"nesw":case"nwse":A(),b()}const y=new R.Vector3().subVectors(r[1],r[0]).length()/h.length(),E=new R.Vector3().subVectors(r[3],r[0]).length()/u.length(),k=new R.Vector3(y,E,1),S=new I.Matrix4().scale(k);n.isCSS3DObjectPlus?n.applyScaleMatrix4(S):n.scale.applyMatrix4(S),o.position.copy(a);const C=new R.Vector3().addVectors(r[0],r[2]).divideScalar(2),j=new R.Vector3().subVectors(C,l),M=new I.Matrix4().setPosition(j);n.applyMatrix4(M),(X=this.helperObject3D.css3DInstance)==null||X.css3DObject.applyMatrix4(M),(J=this.helperObject3D.plane)==null||J.applyMatrix4(M),this.hooks.emit("applyObjectScale",{matrix:S}),this.hooks.emit("applyObjectPosition",{matrix:M}),this.render()}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render())}}class ZC extends JC{constructor(...e){super(...e);f(this,"name","CSS3DScaleController");this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(e=>{if(!e)return;const n=e.point,o=a=>this.dragStart(a,e),s=this.dragging.bind(this),r=this.dragEnd.bind(this);n.addEventListener("dragstart",o),n.addEventListener("drag",s),n.addEventListener("dragend",r)})}}class KC extends no{constructor(...e){super(...e);f(this,"name","BoundingBoxController")}}class $C extends pu{constructor(t){super(t)}}class eE extends no{constructor(...e){super(...e);f(this,"name","ScaleController")}setScale(e){var l,c,d;let n=1,o=1,s=1;typeof e=="number"?(n=e,o=e,s=e):typeof e=="object"&&(n=(l=e.x)!=null?l:1,o=(c=e.y)!=null?c:1,s=(d=e.z)!=null?d:1);const r=new I.Vector3(n,o,s);this.hooks.emit("wantToScale",r)||(this.originObject3D.scale.copy(r),this.hooks.emit("setObjectScale",r),this.hooks.emit("scale",r),this.render())}}const $r="Object3DHelperPlugin",Ps=$r,tE=()=>{console.error(`${Ps} is disposed`)},nE=()=>{console.warn(`${Ps} is disabled`)},iE=()=>{console.error(`${Ps} is disabled`)};class vu extends eo{constructor(e){super(e);f(this,"name",$r);f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"objectHelperMap",new Map);f(this,"css3DObjectParentMap",new Map);f(this,"css3DRender");this.five=e,this.css3DRender=new ti(this.five.scene),console.warn("Object3DHelper: 使用此插件,需要在初始化five时,设置five参数: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${$r.toUpperCase()}_DEBUG__`]:this})}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){if(this.state.disposed)return tE();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return iE();const o=F({},this.state);this.state=F(F({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:o})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,n={}){var m;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const o=new UC,s=[],r=(m=this.five.getElement())==null?void 0:m.parentElement,a=this.five.camera,{moveHelper:l=!0,rotateHelper:c=!0,scaleHelper:d=!0,boundingBoxHelper:h=!1}=n,u=new ze.Subscribe;if(l){const v=new TC(e),g=this.getConfig(n.moveHelper),A=new Oi(this.five,GC,e,v,g,u);o.addControllers({moveController:A.helperController}),s.push(()=>A.dispose())}if(c){const v=this.getConfig(n.rotateHelper),g=new _C(e,F({container:r},v)),A=new Oi(this.five,qC,e,g,v,u);o.addControllers({rotateController:A.helperController}),s.push(()=>A.dispose())}if(h){const v=new HC(e),g=new Oi(this.five,KC,e,v,void 0,u);o.addControllers({boundingBoxController:g.helperController})}if(d)if(e.isCSS3DObjectPlus&&r){const v=new QC(e,r,a,this.five.scene),g=new Oi(this.five,ZC,e,v,void 0,u);o.addControllers({scaleController:g.helperController}),s.push(()=>g.dispose()),xd(this.five).then(()=>{var A,b;if(e.isCSS3DObjectPlus){const y=e;if(!y||y.mode!=="front")return;const E=(A=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?A:Dd(this.five);E&&(this.css3DObjectParentMap.set(y,y.parent),y.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(E),(b=this.css3DRender.getBehindCSS3DObjectGroup())==null||b.add(y),this.css3DRender.render(this.five.camera))}})}else{const v=new $C(e),g=new Oi(this.five,eE,e,v,void 0,u);o.addControllers({scaleController:g.helperController}),s.push(()=>g.dispose())}return this.objectHelperMap.set(e,{helper:o,disposers:s}),o.controllers}removeObject3DHelper(e){if(!this.objectHelperMap.has(e))return;const{helper:n,disposers:o}=this.objectHelperMap.get(e);if(n){if(e.isCSS3DObjectPlus){const s=e,r=this.css3DObjectParentMap.get(s);r&&r.add(s),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),n.dispose(),o==null||o.forEach(s=>s==null?void 0:s())}}handleEnable(e,n=!0){e?(this.everyHelperDo(o=>o.enable()),this.hooks.emit("enable",{userAction:n})):(this.everyHelperDo(o=>o.disable()),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){e?(this.everyHelperDo(o=>o.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.everyHelperDo(o=>o.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}handleDispose(){this.objectHelperMap.forEach(({helper:e,disposers:n})=>{e.dispose(),n==null||n.forEach(o=>o==null?void 0:o())})}everyHelperDo(e){this.objectHelperMap.forEach(({helper:n,disposers:o})=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&nE()}getConfig(e){if(e&&typeof e!="boolean"&&e.enable)return e}}const oE=i=>new vu(i),sE=`
668
+ `;class Zr{constructor(t,e){f(this,"name","");f(this,"startTagContainer");f(this,"endTagContainer");f(this,"mesh");f(this,"five");f(this,"mode");f(this,"path",[]);f(this,"_curvePath",null);f(this,"_curvePoints",null);f(this,"_panoGroup",[]);f(this,"skippedPositions",null);f(this,"textureUrl","");f(this,"scale",1);f(this,"width",.5);f(this,"unitLength",.5);f(this,"_visibleFloorIndexes",null);f(this,"visible",null);f(this,"modeVisible",!1);f(this,"floorVisible",!0);f(this,"defaultVisible",!1);f(this,"inWalkAnimation",!1);f(this,"customVisible",null);f(this,"parent");f(this,"plugin");f(this,"textureHasLoaded",!1);f(this,"disposed",!1);f(this,"flowAnime",new os({progress:0}).to({progress:1}).duration(1500).repeat(1/0));f(this,"flickerAnime",ss(300).yoyo(!0).repeat(5));f(this,"cacheLengths",[]);f(this,"dispose",()=>{var t,e;this.disposed||(this.disposed=!0,this.parent.hooks.off("show",this.updateVisible),this.parent.hooks.off("hide",this.updateVisible),this.plugin.hooks.off("show",this.updateVisible),this.plugin.hooks.off("hide",this.updateVisible),this.plugin.hooks.off("enable",this.updateVisible),this.plugin.hooks.off("disable",this.updateVisible),this.five.off("modeChange",this.onFiveModeChange),this.five.off("modelShownFloorChange",this.onFiveModelShownFloorChange),this.doHide(),(t=this.startTagContainer)==null||t.plugin.dispose(),(e=this.endTagContainer)==null||e.plugin.dispose())});f(this,"onWalkAnimationStart",()=>{this.inWalkAnimation=!0,this.updateVisible()});f(this,"onWalkAnimationEnd",()=>{this.inWalkAnimation=!1,this.updateVisible()});f(this,"onFiveModeChange",t=>{this.modeVisible=this.mode==="panorama"?ta(t):Md(t),this.updateVisible()});f(this,"onFiveModelShownFloorChange",t=>{this.floorVisible=t===null||this.visibleFloorIndexes===null||this.visibleFloorIndexes.includes(t),this.updateVisible()});f(this,"updateVisible",()=>{const t=(()=>!this.parent.visible||!this.plugin.state.enabled||!this.plugin.state.visible?!1:this.customVisible!==null?this.customVisible:this.inWalkAnimation?!0:this.modeVisible&&this.textureHasLoaded&&this.defaultVisible&&this.floorVisible)();this.visible!==t&&(this.visible=t,t?this.doShow():this.doHide())});f(this,"onFlowAnimeUpdate",t=>{const{progress:e}=t;this.mesh.material.uniforms.vOffset.value=e,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0});f(this,"onFlickerAnimeUpdate",t=>{var o,s;const{progress:e}=t,n=1-e;this.mesh.material.uniforms.flicker.value=n,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0,this.startTagContainer.tag&&kr(this.startTagContainer.tag)&&((o=this.startTagContainer.app)==null||o.$set(ye(F({},this.startTagContainer.tag.data),{opacity:n,name:this.name,distance:Math.floor(this.curvePath.getLength())}))),this.endTagContainer.tag&&kr(this.endTagContainer.tag)&&((s=this.endTagContainer.app)==null||s.$set(ye(F({},this.endTagContainer.tag.data),{opacity:n})))});f(this,"logWarning",t=>aA("GuideLineModeItem: ",t));f(this,"logError",t=>Sh("GuideLineModeItem: ",t));var s,r;this.five=t,this.mode=e.mode,this.plugin=e.plugin,this.parent=e.parent,this.startTagContainer={tag:null,plugin:new ns(this.five)},this.endTagContainer={tag:null,plugin:new ns(this.five)};const n=new I.BufferGeometry,o=new I.ShaderMaterial({vertexShader:lC,fragmentShader:cC,transparent:!0,uniforms:{map:{value:null},useMapColor:{value:0},mapColor:{value:new I.Color},mapOpacity:{value:1},backgroundColor:{value:new I.Color},backgroundOpacity:{value:0},borderColor:{value:new I.Color},borderOpacity:{value:0},opacity:{value:1},flicker:{value:1},maxU:{value:0},vOffset:{value:0}}});this.mesh=new I.Mesh(n,o),this.mesh.name="GuideLineModeItem",this.mode==="panorama"&&(this.parent.hooks.on("walkStart",this.onWalkAnimationStart),this.parent.hooks.on("walkEnded",this.onWalkAnimationEnd)),this.updateVisible(),this.onFiveModeChange(this.five.getCurrentState().mode),this.onFiveModelShownFloorChange((r=(s=this.five.model)==null?void 0:s.shownFloor)!=null?r:null),this.flowAnime.onUpdate(this.onFlowAnimeUpdate),this.flickerAnime.onUpdate(this.onFlickerAnimeUpdate),this.parent.hooks.on("show",this.updateVisible),this.parent.hooks.on("hide",this.updateVisible),this.plugin.hooks.on("show",this.updateVisible),this.plugin.hooks.on("hide",this.updateVisible),this.plugin.hooks.on("enable",this.updateVisible),this.plugin.hooks.on("disable",this.updateVisible),this.plugin.hooks.on("dispose",this.dispose),this.five.on("modeChange",this.onFiveModeChange),this.five.on("modelShownFloorChange",this.onFiveModelShownFloorChange)}get panoGroup(){return this._panoGroup}get visibleFloorIndexes(){return this._visibleFloorIndexes}get curvePath(){return this._curvePath}get curvePoints(){return this._curvePoints}setCustomVisible(t){if(this.disposed)return this.logError("disposed");this.customVisible!==t&&(this.customVisible=t,this.updateVisible())}setDefaultVisible(t){if(this.disposed)return this.logError("disposed");this.defaultVisible!==t&&(this.defaultVisible=t,this.updateVisible())}setUnitSize(t,e){if(this.disposed)return this.logError("disposed");this.width=t,this.unitLength=e,this.setGeometryByPath(this.path,{width:t,unit_length:e})}setScale(t){if(this.disposed)return this.logError("disposed");this.scale=t,this.setGeometryByPath(this.path,{scale:t})}setGeometryByPanoGroup(t,e){if(this.disposed)return this.logError("disposed");if(!this.five.work)return this.logError("setPathByPanoGroup: work is not ready");const n=aC(t);if(this._panoGroup=n,(e==null?void 0:e.skipPanoGroup)!==void 0){const s=e.skipPanoGroup?n.map(r=>this.five.work.observers[r]).map(r=>r.standingPosition.clone()):null;this.skippedPositions=s}const o=this.getPathFromPanoGroup(n,this.five.work,e);this.path=o,this.setGeometryByPath(o,e)}setGeometryByPath(t,e){var d,h,u;if(this.disposed)return this.logError("disposed");const n=(d=e==null?void 0:e.scale)!=null?d:this.scale,o=(h=e==null?void 0:e.width)!=null?h:this.width,s=(u=e==null?void 0:e.unit_length)!=null?u:this.unitLength;this.path=t,this.scale=n,this.width=o,this.unitLength=s;const{geometry:r,maxU:a,curvePath:l,curvePoints:c}=kA({path:t,width:o*n,unitLength:s*n,skipPositions:this.skippedPositions});this._curvePath=l,this._curvePoints=c,this.mesh.geometry=r,this.mesh.material.needsUpdate=!0,this.mesh.material.uniforms.maxU.value=a,this.five.needsRender=!0}setMartial(t){var e;if(this.disposed)return this.logError("disposed");(t==null?void 0:t.visible)!==void 0&&this.setDefaultVisible(t.visible),(t==null?void 0:t.color)!==void 0&&this.setColor(t.color),(t==null?void 0:t.opacity)!==void 0&&this.setOpacity(t.opacity),((e=t==null?void 0:t.texture)==null?void 0:e.url)!==void 0&&this.setTextureUrl(t.texture.url),(t==null?void 0:t.background_color)!==void 0&&this.setBackgroundColor(t.background_color),(t==null?void 0:t.background_opacity)!==void 0&&this.setBackgroundOpacity(t.background_opacity),(t==null?void 0:t.border_color)!==void 0&&this.setBorderColor(t.border_color),(t==null?void 0:t.border_opacity)!==void 0&&this.setBorderOpacity(t.border_opacity)}setColor(t){if(this.disposed)return this.logError("disposed");t&&(this.mesh.material.uniforms.mapColor.value=new I.Color().set(t)),this.mesh.material.uniforms.useMapColor.value=t?1:0,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderColor(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderColor.value=new I.Color().set(t),this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBorderOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.borderOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundColor(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundColor.value=new I.Color().set(t),this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setBackgroundOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.backgroundOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.opacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setMapOpacity(t){if(this.disposed)return this.logError("disposed");this.mesh.material.uniforms.mapOpacity.value=t,this.mesh.material.uniformsNeedUpdate=!0,this.five.needsRender=!0}setTextureUrl(t){if(this.disposed)return this.logError("disposed");this.textureUrl=t,Ui(t).then(e=>{this.disposed||this.textureUrl===t&&(e.wrapT=I.RepeatWrapping,this.textureHasLoaded=!0,this.mesh.material.uniforms.map.value=e,this.mesh.material.uniformsNeedUpdate=!0,this.mesh.material.needsUpdate=!0,this.five.needsRender=!0,this.updateVisible())})}setVisibleFloorIndexes(t){var e,n;if(this.disposed)return this.logError("disposed");this._visibleFloorIndexes=t,this.onFiveModelShownFloorChange((n=(e=this.five.model)==null?void 0:e.shownFloor)!=null?n:null)}setStartTag(t){this.setTag("start",t)}setEndTag(t){this.setTag("end",t)}flicker(){if(this.disposed)return this.logError("disposed");this.flickerAnime.play()}getLengthByPanoGroupIndex(t){return this.disposed?this.logError("disposed"):this.cacheLengths.length!==0?this.cacheLengths[t]:(this.cacheLengths=this.getPanoGroupLengths(),this.cacheLengths[t])}getPanoGroupLengths(){const t=this.panoGroup.map(c=>this.five.work.observers[c]),e=this.curvePoints.length,n=this.curvePath.getLength(),o=e-1,s=n/o,r=this.curvePath.getLengths(o),a=[];let l=0;for(let c=0;c<e;c++){const d=this.curvePoints[c],h=t[l];if(!h)break;h.standingPosition.clone().setY(0).distanceTo(d.clone().setY(0))<s&&(a.push(r[c]),l+=1)}return a}setTag(t,e){const n=t==="start"?this.startTagContainer:this.endTagContainer;e||n.plugin.clearTags();const s=Ye({},{contentType:"Custom",stickType:"2DPoint",config:{visibleConfig:{visibleFiveMode:["Floorplan","Mapview"],followModelVisibility:!1}},style:{point:{enabled:!1}},data:{}},e);n.tag=s,kr(s)&&(n.tag.element=r=>{var c;(c=n.app)==null||c.$destroy();const a=t==="start"?ye(F({},s.data),{name:this.name,distance:Math.floor(this.curvePath.getLength()),i18n:this.plugin.config.i18n}):s.data,l=new rC({target:r,intro:!0,props:a});return n.app=l,()=>l.$destroy()}),n.plugin.load({tagList:[n.tag]})}doShow(){this.mode==="model"&&this.flowAnime.play(),this.five.scene.add(this.mesh),this.startTagContainer.plugin.show(),this.endTagContainer.plugin.show(),this.five.needsRender=!0}doHide(){this.mode==="model"&&this.flowAnime.stop(),this.five.scene.remove(this.mesh),this.startTagContainer.plugin.hide(),this.endTagContainer.plugin.hide(),this.five.needsRender=!0}getPathFromPanoGroup(t,e,n){if(t.length<2)return[];const s=t.map(r=>e.observers[r]).map(r=>r.standingPosition.toArray());return[F({type:"CatmullRomCurve3",points:s},n)]}}function kr(i){return i.contentType==="Custom"}const dC=Object.freeze(Object.defineProperty({__proto__:null,GuideLineModeItem:Zr},Symbol.toStringTag,{value:"Module"}));function pd(i){const t=Math.abs(Math.cos(i.latitude));return new I.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function hC(i,t){const e=pd(i),n=pd(t);return e.angleTo(n)}const uC=i=>Y(exports,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),Vo=Math.PI*2;function fC(i){return i>=0&&i<Vo?i:(i%Vo+Vo)%Vo}function mC(i){return{longitude:fC(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function pC(i,t,e,n){const o=-i/e,s=i;return o*n+s}function gC(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const cu="v1.0.6",du="CruisePlugin",ys=`${du}@${cu}`,gd=()=>{console.error(`${ys} is disposed`)},vC=()=>{console.warn(`${ys} is disabled`)},AC=()=>{console.error(`${ys} is disabled`)},xr=new Map;class to extends Mn{constructor(e,n){super(e,n);f(this,"state",{visible:!0,enabled:!0,disposed:!1,playing:!1,speed:1,config:{speedConfig:{rotateSpeed:.001,rotateSpeedUnit:"rad/ms",moveSpeed:.002,moveSpeedUnit:"m/ms"}}});f(this,"data");f(this,"config");f(this,"privateState",{playing:!1,currentPlayQueue:[],currentPlayKeyframe:null,broke:!1,disposers:[],modeChanging:!1});f(this,"GuideLine");this.config=n,Object.assign(window,{[`__${du}_DEBUG__`]:this});const o=this.setFiveLinearUpdateCamera.bind(this),s=this.setFiveOriginUpdateCamera.bind(this);this.hooks.on("play",o),this.hooks.on("broke",s),this.hooks.on("end",s),this.hooks.on("pause",s),this.privateState.disposers.push(()=>{this.hooks.off("play",o),this.hooks.off("broke",s),this.hooks.off("end",s),this.hooks.off("pause",s)})}load(e,n,o){return Y(this,null,function*(){var d,h,u,m,v,g;if(this.state.disposed)return gd();this.privateState.fiveOriginGetProgress||(h=(d=this.five.controller)==null?void 0:d.cameraMotion)!=null&&h.getProgress||(yield this.waitFiveLoaded(),this.privateState.fiveOriginGetProgress=(m=(u=this.five.controller)==null?void 0:u.cameraMotion)==null?void 0:m.getProgress),this.clear();const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.data=r,this.hooks.emit("dataChange",r,s);let a=[],l;const c=this.data.keyframes.filter(A=>A.data.panoIndex!==void 0);c.filter((A,b)=>{var y;return A.data.panoIndex!==((y=c[b-1])==null?void 0:y.data.panoIndex)}).map(A=>A.data.panoIndex).forEach(A=>{var y,E;const b=(y=this.five.work.observers[A])==null?void 0:y.floorIndex;if(b!==void 0)if(l===b){const k=a.length-1;a[k]=[...(E=a[k])!=null?E:[],A]}else{l=b;const k=a.length;a[k]=[A]}}),!this.GuideLine&&((v=this.config)==null?void 0:v.useGuideLine)!==!1&&r.useGuildLine!==!1&&(this.GuideLine=fu(this.five,this.config)),(g=this.GuideLine)==null||g.load({routes:a.map(A=>({panoIndexList:A})),config:r.guildPluginOptions}),this.setState({playing:!1}),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),this.changePlayState(this.state.playing),this.changeSpeed(this.state.speed),n&&this.setState(n,{userAction:o}),console.debug(`${ys} loaded`,r),this.hooks.emit("dataLoaded",r)})}play(e){this.setState({playing:!0},e)}playFrom(e){const{index:n,id:o,userAction:s}=e;this.state.playing&&this.setState({playing:!1},{userAction:s}),this.setState({playing:!0},{userAction:s,playFromIndex:n,playFromId:o})}playFromStart(e){return this.playFrom(ye(F({},e),{index:0}))}pause(e){this.setState({playing:!1},e)}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){var s;if(this.state.disposed)return gd();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return AC();const o=F({},this.state);this.state=F(F({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),e.playing!==void 0&&e.playing!==o.playing&&this.changePlayState(e.playing,n),e.speed!==void 0&&e.speed!==o.speed&&this.changeSpeed(e.speed,n==null?void 0:n.userAction),jt(o,this.state,{deep:!0})||this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0})}formatData(e){return Y(this,null,function*(){this.five.work||(yield this.waitFiveLoaded());const n=this.five.work.observers,o=(()=>{const s=e;return typeof s=="object"&&s!==null&&s.version&&s.data?s.data:s})();if(o.keyframes)return{keyframesId:dt(),keyframes:o.keyframes.map((s,r)=>{var c;const a=o.keyframes[r+1],l=(()=>!a||a.start===void 0||s.end===void 0?0:a.start-s.end)();return ye(F({id:(c=s.uuid)!=null?c:dt(),moveIndex:r,stay:l,index:r},s),{guildPluginOptions:o.guildPluginOptions})})};if(o.panoIndexList){let s=[];const{moveEffect:r,moveToFirstPanoEffect:a,moveToFirstPanoDuration:l}=o;return this.privateState.moveToFirstPanoEffect=a,this.privateState.moveToFirstPanoDuration=l,o.panoIndexList.forEach((c,d)=>{const h=(()=>{var A,b,y,E;const u=o.panoIndexList.slice(d).find(k=>k!==c);if(u===void 0)return;const m=(A=n[c])==null?void 0:A.position,v=(b=n[u])==null?void 0:b.position;if(!v||!m||((y=n[c])==null?void 0:y.floorIndex)!==((E=n[u])==null?void 0:E.floorIndex))return;const g=new I.Vector3().subVectors(v,m);return mC(g.normalize())})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:d,stay:o.stay,data:F({effect:"Move",panoIndex:c,moveEffect:r},h!=null?h:{})}):o.moveType==="moveAndRotate"&&(s.push({moveIndex:d,stay:o.stay,data:{effect:"Move",panoIndex:c,moveEffect:r}}),h&&s.push({moveIndex:d,stay:o.stay,data:F({effect:"Rotate",panoIndex:c},h)}))}),{keyframesId:dt(),keyframes:s.map((c,d)=>F({id:dt(),index:d},c)),guildPluginOptions:o.guildPluginOptions,useGuildLine:o.useGuildLine}}else throw new Error("format error: data no keyframes or no panoIndexList")})}handleEnable(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.enable(),this.hooks.emit("enable",{userAction:n})):((s=this.GuideLine)==null||s.disable(),this.changePlayState(!1,{userAction:n}),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){var o,s;e?((o=this.GuideLine)==null||o.show(),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):((s=this.GuideLine)==null||s.hide(),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}changePlayState(e,n){this.actionIfStateIsEnabled(()=>{var o;return this.hooks.emit("playStateChange",e?"playing":"pause",{userAction:(o=n==null?void 0:n.userAction)!=null?o:!0})}),e?this.handlePlay(n):this.handlePause(n),this.state.playing=e}handlePlay(e){return Y(this,null,function*(){var m;const{data:n,state:o,privateState:s,hooks:r}=this;if(s.playing||!(n!=null&&n.keyframes)||(n==null?void 0:n.keyframes.length)===0)return;const a=dt();s.playId=a,s.playing=!0,s.broke=!1;const l=n.keyframes,c=this.getPauseData();(e==null?void 0:e.notEmitEvent)!==!0&&r.emit("play",{userAction:(m=e==null?void 0:e.userAction)!=null?m:!0});let d=!1;const u=yield(()=>Y(this,null,function*(){var v,g;if((e==null?void 0:e.playFromIndex)!==void 0)return e.playFromIndex;if((e==null?void 0:e.playFromId)!==void 0)return(v=this.data)==null?void 0:v.keyframes.findIndex(A=>A.id===e.playFromId);if(c!=null&&c.keyframeId){const A=(g=this.data)==null?void 0:g.keyframes.find(b=>b.id===c.keyframeId);if(c!=null&&c.fiveState&&(yield this.move(c.fiveState,{moveEffect:s.moveToFirstPanoEffect,duration:s.moveToFirstPanoDuration})),A){if(A.data.effect==="Move")return A.index;if(A.data.effect==="Rotate"){const b=c.duration!==void 0?c.duration*(1-c.playedProgress):void 0;return yield this.playKeyframe(A,{duration:b}),d=!0,A.index+1}}}}))();this.clearPauseData();for(const v of l){if(s.broke||!o.playing||!s.playing||a!==s.playId)return;if(!(u!==void 0&&v.index<u))try{r.emit("playIndexChange",v.index,v),yield this.playKeyframe(v,{moveEffect:d===!1?s.moveToFirstPanoEffect:void 0,duration:d===!1&&typeof s.moveToFirstPanoDuration=="number"?s.moveToFirstPanoDuration:void 0}),v.stay&&(yield gC(v.stay)),d===!1&&(d=!0)}catch(g){return Promise.resolve("broke")}}o.playing&&a===s.playId&&(this.setState({playing:!1},{userAction:!1}),r.emit("end"),this.clearPauseData())})}handlePause(e){var r;const{state:n,privateState:o,hooks:s}=this;n.playing=!1,o.playing!==!1&&(o.playing=!1,this.setPauseData(),o.broke||this.forceInteruptUpdateCamera(),(e==null?void 0:e.notEmitEvent)!==!0&&s.emit("pause",{userAction:(r=e==null?void 0:e.userAction)!=null?r:!0}))}playKeyframe(e,n){return Y(this,null,function*(){var s;const{privateState:o}=this;return((s=this.privateState.currentPlayKeyframe)==null?void 0:s.keyframe.id)!==e.id&&(this.privateState.currentPlayKeyframe={keyframe:e}),o.currentPlayQueue.push(this.getPlayPromise(e,n)),this.actionPromiseQueue()})}addInterruptListener(e){const n=()=>{this.privateState.modeChanging||e()},o=e;return this.five.once("gesture",o),this.five.once("wantsChangeMode",n),()=>{this.five.off("gesture",o),this.five.once("wantsChangeMode",n)}}getPlayPromise(o){return Y(this,arguments,function*(e,n={}){var r;const s=e.data;if(n.duration=(r=n.duration)!=null?r:e.start!==void 0&&e.end!==void 0?e.end-e.start:void 0,!!s)return new Promise((a,l)=>{let c=!1;this.addInterruptListener(()=>{if(!c)return this.hooks.emit("broke"),this.privateState.broke=!0,this.setState({playing:!1}),c=!0,l(new Error("play is interupted"))});try{if(c)return;const d=()=>{a(),c=!0};switch(s.effect){case"Move":this.move(s,n).then(d);break;case"Rotate":this.rotate(s,n).then(d);break;default:this.rotate(s,n).then(d)}}catch(d){}})})}actionPromiseQueue(){return Y(this,null,function*(){const{privateState:e}=this;return new Promise((n,o)=>{if(e.currentPlayQueue.length===0){n();return}const s=e.currentPlayQueue.shift();if(!s){n();return}s.then(n,o)}).then(()=>e.currentPlayQueue.length===0?Promise.resolve():this.actionPromiseQueue())})}move(e,n){return Y(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode(e);else if(e.panoIndex!==this.five.panoIndex)yield this.changePano(e,n);else return Promise.resolve()})}rotate(e,n){return Y(this,null,function*(){if(e.mode&&e.mode!==this.five.currentMode)yield this.changeMode({mode:e.mode,panoIndex:e.panoIndex});else if(e.panoIndex&&e.panoIndex!==this.five.panoIndex)return yield this.changePano(e,n);yield this.updateCamera(e,n)})}updateCamera(o){return Y(this,arguments,function*(e,n={}){const{five:s,privateState:r,state:a}=this,l=(()=>{var m,v;const h=(m=a.config)==null?void 0:m.speedConfig,u=(v=e.rotateSpeed)!=null?v:h==null?void 0:h.rotateSpeed;if((h==null?void 0:h.rotateSpeedUnit)===void 0)return u;if(u!==void 0)return h.rotateSpeedUnit==="rad/ms"?u:u/1e3})(),c=(()=>{if(n.duration)return n.duration;if(l){const h=this.five.getCurrentState();return hC(h,e)/l}return 800})();r.currentPlayKeyframe&&(r.currentPlayKeyframe.originDuration=c);const d=this.getSpeededDuration(c);return new Promise(h=>{uC(()=>s.updateCamera(e,d)),setTimeout(()=>h(),d)})})}changePano(e,n){return Y(this,null,function*(){const{five:o,privateState:s,state:r}=this;if(typeof e.panoIndex!="number"||e.panoIndex===o.panoIndex)return;const a=o.getCurrentState().mode!=="Panorama";a&&(this.privateState.modeChanging=!0);const l=(()=>{var u,m;const d=(u=r.config)==null?void 0:u.speedConfig,h=(m=e.moveSpeed)!=null?m:d==null?void 0:d.moveSpeed;if((d==null?void 0:d.moveSpeedUnit)===void 0)return h;if(h!==void 0)return d.moveSpeedUnit==="m/ms"?h:h/1e3})(),c=(()=>{if(n!=null&&n.duration)return n.duration;if(l&&typeof o.panoIndex=="number"&&typeof e.panoIndex=="number"){const d=o.work.observers[o.panoIndex].position,h=o.work.observers[e.panoIndex].position;return d.distanceTo(h)/l}return 800})();s.currentPlayKeyframe&&(s.currentPlayKeyframe.originDuration=c),yield new Promise(d=>{var h,u,m;o.moveToPano(e.panoIndex,{latitude:e.latitude,longitude:e.longitude,fov:e.fov,duration:this.getSpeededDuration(c),effect:(m=(u=n==null?void 0:n.moveEffect)!=null?u:(h=this.state.config)==null?void 0:h.moveEffect)!=null?m:e.moveEffect,moveCancelCallback:()=>d(),moveEndCallback:()=>d()}),a&&o.once("panoArrived",()=>d())}),a&&(this.privateState.modeChanging=!1)})}changeSpeed(e,n=!0){const{state:o,privateState:s,hooks:r}=this,{currentPlayKeyframe:a}=s;if(r.emit("speedChange",e,{userAction:n}),o.playing&&a)try{const l=a.originDuration!==void 0?a.originDuration*(1-this.getProgress()):void 0,c=this.playKeyframe(a.keyframe,{duration:l});s.currentPlayQueue.push(c)}catch(l){}}getSpeededDuration(e){return e/this.state.speed}getProgress(){return this.five.controller.cameraMotion.progress}changeMode(e,n){return Y(this,null,function*(){e.mode&&e.mode!==this.five.currentMode&&(this.privateState.modeChanging=!0,yield this.five.changeMode(e.mode,e,n),this.privateState.modeChanging=!1)})}forceInteruptUpdateCamera(){this.five.updateCamera({},0)}getPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return xr.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return xr.set((n=this.data)==null?void 0:n.keyframesId,{keyframeId:(o=this.privateState.currentPlayKeyframe)==null?void 0:o.keyframe.id,fiveState:this.five.getCurrentState(),duration:(s=this.privateState.currentPlayKeyframe)==null?void 0:s.originDuration,playedProgress:this.getProgress()})}clearPauseData(){var e,n;if((e=this.data)!=null&&e.keyframesId)return xr.delete((n=this.data)==null?void 0:n.keyframesId)}clear(){this.clearPauseData(),this.privateState.currentPlayKeyframe=null}handleDispose(){var e,n;this.setState({playing:!1}),this.clearPauseData(),this.clear(),(e=this.GuideLine)==null||e.dispose(),this.GuideLine=void 0,(n=this.privateState.disposers)==null||n.forEach(o=>o==null?void 0:o())}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&vC()}waitFiveLoaded(){return Y(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}setFiveLinearUpdateCamera(){this.privateState.fiveOriginGetProgress&&(this.five.controller.cameraMotion.getProgress=e=>{const n=this.five.controller.cameraMotion,o=e-n.startTime;return o<0?0:o>=n.duration?1:1-pC(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){this.privateState.fiveOriginGetProgress&&(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}f(to,"PluginVersion",cu);const bC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),yC=i=>new to(i);class hu{constructor(t){f(this,"id");f(this,"renderID");f(this,"isGuideLine",!0);f(this,"panoramaItem");f(this,"modelItem");f(this,"hooks",new ze.Subscribe);f(this,"_visible",!0);f(this,"plugin");f(this,"five");f(this,"logError",t=>Sh("GuideLineItem: ",t));this.id=t.id,this.five=t.five,this.plugin=t.plugin,this.panoramaItem=new Zr(this.five,{mode:"panorama",plugin:this.plugin,parent:this}),this.modelItem=new Zr(this.five,{mode:"model",plugin:this.plugin,parent:this})}get visible(){return this._visible}setData(t){this.setDataByMode("panorama",t),this.setDataByMode("model",t)}setHeightOffset(t){this.modelItem.mesh.position.y=t,this.panoramaItem.mesh.position.y=t}setDataByMode(t,e){var l;const n=t==="panorama"?this.panoramaItem:this.modelItem,o=t==="panorama"?e.panorama_style:e.model_style,s=e.path,r=o,a=o;if(e.pano_group){const c=t==="panorama";n.setGeometryByPanoGroup(e.pano_group,F({skipPanoGroup:c},r))}else e.path&&n.setGeometryByPath(s,r);n.name=e.name,n.setMartial(a),n.setVisibleFloorIndexes((l=e.visible_floor_indexes)!=null?l:null),n.setStartTag(o==null?void 0:o.start_tag),n.setEndTag(o==null?void 0:o.end_tag)}show(){this._visible=!0,this.hooks.emit("show",{userAction:!0})}hide(){this._visible=!1,this.hooks.emit("hide",{userAction:!0})}dispose(){this.panoramaItem.dispose(),this.modelItem.dispose()}walk(t){return Y(this,null,function*(){if(!this.panoramaItem.panoGroup)return;const e=F({panoIndexList:this.panoramaItem.panoGroup},t);this.hooks.emit("walkStart",{userAction:!0});const[n]=yield ii(wC(this.five,e));if(this.hooks.emit("walkEnded",{userAction:!0}),n)return this.logError(n.message)})}}function wC(i,t){return Y(this,null,function*(){if(t.panoIndexList.length===0)return;const e=i.getCurrentState();e.mode!=="Panorama"&&(yield fa(i,["Panorama",{longitude:e.longitude,latitude:0,panoIndex:t.panoIndexList[0]}]));const n=new to(i,{useGuideLine:!1});yield n.load(t),yield new Promise((o,s)=>{const r=i.getCurrentState();let a=t.panoIndexList.slice();r.panoIndex===a[0]&&c(r.panoIndex),n.playFromStart();function l(m){if(m!=="Panorama")return h(new Error("mode not match"))}function c(m){const v=a[0];if(a=a.slice(1),m!==v)return h(new Error("panoIndex not match, wanted: "+v+", got: "+m));if(a.length===0)return u()}function d(){i.off("modeChange",l),i.off("panoArrived",c)}function h(m){d(),s(m)}function u(){d(),o()}i.on("modeChange",l),i.on("panoArrived",c)})})}const PC=Object.freeze(Object.defineProperty({__proto__:null,GuideLineItem:hu},Symbol.toStringTag,{value:"Module"})),uu="v1.1.0",Kr="GuideLinePlugin",vd=`${Kr}@${uu}`;class CC extends Mn{constructor(e,n){super(e,n);f(this,"version",uu);f(this,"name",Kr);f(this,"cruisePlugin");f(this,"itemMap",new Map);f(this,"state",{visible:!1,enabled:!0});f(this,"data");f(this,"heightOffset",0);f(this,"_config");f(this,"_disposed",!1);f(this,"disposedErrorLog",()=>{console.error(`${vd} is disposed`)});this._config=n!=null?n:{},this.cruisePlugin=new to(e,{useGuideLine:!1}),Object.assign(window,{[`__${Kr}_DEBUG__`]:this})}get config(){return this._config}get disposed(){return this._disposed}load(e,n,o=!0){return Y(this,null,function*(){var m,v,g,A,b,y,E;if(this.disposed)return;const s=this.data?JSON.parse(JSON.stringify(this.data)):void 0,r=yield this.formatData(e);this.hooks.emit("dataChange",r,s),this.data=r;const a=r.config,c={panorama_style:{visible:!!(!r.lines&&r.routes),unit_length:(m=a==null?void 0:a.unitHeight)!=null?m:.4,width:(v=a==null?void 0:a.unitWidth)!=null?v:.6,texture:{url:(g=a==null?void 0:a.arrowTextureUrl)!=null?g:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"}}},d=(b=(A=r.routes)==null?void 0:A.map(k=>{var S;return Ye({},c,{id:(S=k.id)!=null?S:Date.now(),pano_group:k.panoIndexList})}))!=null?b:[],h=(E=(y=r.lines)==null?void 0:y.map(k=>Ye({},c,k)))!=null?E:[],u=[...d,...h];yield this.waitFiveLoaded(),this.clear(),u.forEach(k=>{this.addGuideLineItem(k)}),this.updateTagsEnable(),this.handleVisible(this.state.visible),this.handleEnable(this.state.enabled),n&&this.setState(n,{userAction:o}),this.hooks.emit("dataLoaded",r),console.debug(`${vd} loaded`,r)})}formatData(e){return Y(this,null,function*(){return this.getDataWithoutVersion(e)})}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.disposed||(this.clear(),this.hooks.emit("dispose"))}setState(e,n){var s;if(this.disposed)return this.disposedErrorLog();const o=F({},this.state);this.state=F(F({},this.state),e),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible,n==null?void 0:n.userAction),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled,n==null?void 0:n.userAction),jt(o,this.state,{deep:!0})||(this.hooks.emit("stateChange",{state:this.state,prevState:o,userAction:(s=n==null?void 0:n.userAction)!=null?s:!0}),this.five.needsRender=!0)}addGuideLineItem(e){const n=e.render_id||e.id,o=this.itemMap.get(n);o&&this.removeGuideLineItem(o);const s=new hu({five:this.five,id:n,plugin:this});return this.itemMap.set(n,s),e&&s.setData(e),this.heightOffset+=1e-4,s.setHeightOffset(this.heightOffset),s}getGuideLineItemByID(e){return this.itemMap.get(e)}removeGuideLineItem(e){this.itemMap.delete(e.id),e.panoramaItem.dispose(),e.modelItem.dispose()}updateTagsEnable(){const e=[];function n(r){return Array.isArray(r)&&r.every(a=>typeof a=="number")}function o(r,a){return new I.Vector3().fromArray(r).distanceTo(new I.Vector3().fromArray(a))<.01}function s(r){var l;const a=(l=r.tag)==null?void 0:l.position;return n(a)?e.every(c=>{var d;return n((d=c.tag)==null?void 0:d.position)?!o(a,c.tag.position):!0}):!1}this.itemMap.forEach(r=>{const a=r.modelItem.startTagContainer,l=r.modelItem.endTagContainer,c=s(a);c&&e.push(a),a.plugin.setState({enabled:c},{});const d=s(l);d&&e.push(l),l.plugin.setState({enabled:d},{})})}clear(){this.itemMap.forEach(e=>{this.removeGuideLineItem(e)})}handleEnable(e,n=!0){this.hooks.emit(e?"enable":"disable",{userAction:n})}handleVisible(e,n=!0){this.state.enabled&&this.hooks.emit(e?"show":"hide",{userAction:n})}waitFiveLoaded(){return Y(this,null,function*(){return new Promise(e=>{if(this.five.work){e();return}this.five.once("loaded",()=>{e()})})})}getDataWithoutVersion(e){return typeof e=="object"&&e!==null&&e.version&&e.data?e.data:e}}const fu=(i,t)=>new CC(i,t);function mu(i,t,e){if(e){const o=new I.Vector3().subVectors(i.position,e).applyQuaternion(i.quaternion.clone().inverse()).applyQuaternion(t).add(e);i.position.copy(o)}i.quaternion.copy(t)}class EC extends R.Object3D{constructor(){super()}add(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.add(...e)}remove(...t){if(t.length===0)return this;const e=t.filter(Boolean);return super.remove(...e)}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}}class ws extends EC{constructor(e,n){var o;super();f(this,"originObject3D");f(this,"onRender");this.originObject3D=e,this.onRender=(o=n==null?void 0:n.onRender)!=null?o:()=>{}}get helperObject(){return this}render(){this.onRender()}enable(){this.parent.children.includes(this)||this.parent.add(this)}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,n=[]){return e.intersectObject(this,!0,n)}initialPosition(){this.position.add(this.originObject3D.position)}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,n){this.scale.applyMatrix4(e)}setHelperQuaternion(e,n){mu(this,e,n)}applyHelperQuaternion(e,n){if(n){const o=new R.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class IC extends ws{}class kC extends ws{}class xC extends ws{}class pu extends ws{}class DC extends pu{}class MC extends I.Group{constructor(e){super();f(this,"direction");this.direction=e||"x"}}class Ad extends I.Mesh{constructor(e,n,o){super(e,n);f(this,"direction");this.direction=o||"x"}}function SC(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new I.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function Ia(i,t,e){if(!t||!e||!i)return;const n=SC(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new I.Raycaster;return o.setFromCamera(n,i),o}function LC(i,t){return!(Math.abs(i.x-t.x)>1e-5||Math.abs(i.y-t.y)>1e-5||Math.abs(i.z-t.z)>1e-5)}class Dr extends MC{constructor(e){var d;super(e.direction);f(this,"line");f(this,"arrow");f(this,"lineHeight",.4);f(this,"arrowHeight",.1);this.name="ArrowGroup";const n=new I.Color((d=e.color)!=null?d:16214315),o=new I.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:I.DoubleSide}),s=new I.ConeGeometry(.04,.1,32),r=new Ad(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new I.CylinderGeometry(a,a,.4,32),c=new Ad(l,o.clone(),e.direction);c.name=`line-${e.direction}`,this.line=c,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const Mr={X:15618642,Y:4765519,Z:4227839};class ei{static get X(){return new I.Color(Mr.X).convertSRGBToLinear().clone()}static get Y(){return new I.Color(Mr.Y).convertSRGBToLinear().clone()}static get Z(){return new I.Color(Mr.Z).convertSRGBToLinear().clone()}}class TC extends IC{constructor(e){super(e);f(this,"xArrow",new Dr({direction:"x",color:ei.X}));f(this,"yArrow",new Dr({direction:"y",color:ei.Y}));f(this,"zArrow",new Dr({direction:"z",color:ei.Z}));this.add(this.xArrow),this.add(this.yArrow),this.add(this.zArrow)}show(){super.show(),this.xArrow.visible=!0,this.yArrow.visible=!0,this.zArrow.visible=!0}showDraggingHelper(e){this.xArrow.visible=e.includes("x"),this.yArrow.visible=e.includes("y"),this.zArrow.visible=e.includes("z")}dispose(){this.remove(this.xArrow,this.yArrow,this.zArrow)}}function En(i,t){return zC(document.createElement(t!=null?t:"div"),i)}function zC(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function _C(i){const t=En(F({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"99999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},i)),e=()=>{t.style.display!=="block"&&t.style.top&&t.style.left&&(t.style.display="block")};return{element:t,show:e,hide:()=>{t.style.display="none",t.style.top="",t.style.left=""},setLeftTop:(s,r)=>{t.style.left=s,t.style.top=r,e()}}}class VC extends xC{constructor(e,n){super(e);f(this,"xCircle");f(this,"yCircle");f(this,"zCircle");f(this,"children",[]);f(this,"angleTips");f(this,"container");(n==null?void 0:n.yzCircleEnable)!==!1&&(this.xCircle=new Sr({direction:"x",color:ei.X})),(n==null?void 0:n.xzCircleEnable)!==!1&&(this.yCircle=new Sr({direction:"y",color:ei.Y})),(n==null?void 0:n.xyCircleEnable)!==!1&&(this.zCircle=new Sr({direction:"z",color:ei.Z})),n!=null&&n.container&&(n==null?void 0:n.angleTipsEnable)!==!1&&(this.container=n==null?void 0:n.container,this.angleTips=_C({display:"none"}),this.container.appendChild(this.angleTips.element)),this.add(...[this.xCircle,this.yCircle,this.zCircle].filter(Boolean)),this.show()}hide(){this.children.forEach(e=>e.hide())}show(){var e;this.children.forEach(n=>n.showCircle()),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var n;this.hide(),this.children.filter(o=>e.includes(o.direction)).forEach(o=>o.showRing()),(n=this.angleTips)==null||n.show()}dispose(){var e,n;this.removeFromParent(),(n=(e=this.angleTips)==null?void 0:e.element)==null||n.remove()}}class Sr extends I.Group{constructor(e){super();f(this,"direction");f(this,"circle");f(this,"ring");f(this,"angleSector");this.direction=e.direction,this.circle=new jC(e),this.ring=new OC(e),this.angleSector=new BC(e),this.add(this.circle,this.ring,this.angleSector),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}showCircle(){this.add(this.circle),this.remove(this.ring,this.angleSector)}showRing(){this.add(this.ring,this.angleSector),this.remove(this.circle)}hide(){this.remove(this.ring,this.angleSector,this.circle)}}class jC extends I.Mesh{constructor(e){var n;super();f(this,"direction");f(this,"gapAngle",.02);f(this,"geometry",new I.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new I.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:I.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}}class OC extends I.Group{constructor(e){super();f(this,"direction");this.direction=e.direction;const n=.015,o=new Array(8).fill(null).map((s,r)=>{const a=new I.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new I.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),c=new I.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...o)}}class BC extends I.Mesh{constructor(e){var o;super();f(this,"direction");f(this,"baseAxes");f(this,"angleDirection");switch(e.direction){case"x":this.baseAxes=new I.Vector3(0,0,1);break;case"y":this.baseAxes=new I.Vector3(1,0,0);break;case"z":this.baseAxes=new I.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new I.CircleGeometry(n,48,0,1e-4),this.material=new I.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:I.DoubleSide}),this.direction=e.direction,this.angleDirection=this.direction==="z"?1:-1}}function RC(){const i=En({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=En({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=En({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});i.appendChild(t),t.appendChild(e);const n="-4px",o={direction:"nesw",element:en({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:en({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:en({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:en({cursor:"ew-resize",right:n})},l={direction:"nesw",element:en({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:en({cursor:"ns-resize",top:n})},d={direction:"nwse",element:en({cursor:"nwse-resize",left:n,top:n})},h={direction:"ew",element:en({cursor:"ew-resize",left:n})};return new Array(s,a,c,h,o,r,l,d).forEach(m=>t.appendChild(m.element)),{container:i,squares:[o,s,r,a,l,c,d,h]}}function en(i){const t=En(F({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=En({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=En({width:"15px",height:"15px",cursor:i==null?void 0:i.cursor,pointerEvents:"auto",background:"transparent"});return n.draggable=!0,e.appendChild(n),t.appendChild(e),t}class QC extends DC{constructor(e,n,o,s){super(e);f(this,"points",[]);f(this,"cornerPositions",[]);f(this,"css3DInstance");f(this,"plane");f(this,"css3DRenderer",new ti);f(this,"camera");f(this,"scene");f(this,"container");f(this,"enabled",!1);this.camera=o,this.scene=s,this.container=n,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}applyMatrix4(e){var n;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(n=this.plane)==null||n.applyMatrix4(e),this.cornerPositions.forEach(o=>o.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,n){var o;(o=this.plane)==null||o.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((n,o)=>{n.position.copy(e[o])})}applyHelperQuaternion(e,n){var s;const o=(s=this.css3DInstance)==null?void 0:s.css3DObject;if(o){const r=new I.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new I.Vector3().subVectors(this.plane.position,n).applyQuaternion(e).add(n);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new I.Vector3().subVectors(r,n).applyQuaternion(e).add(n);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;this.enabled&&(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}initRectangleScaleHelper(){var a,l;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const n=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!n)return;this.css3DInstance=n,n.appendToElement(this.container);const o=n.css3DObject.container,{container:s,squares:r}=RC();this.points=r.map((c,d)=>({direction:c.direction,point:c.element,position:this.calculatePointPosition(e)[d]})),o.insertBefore(s,(a=o.children[0])!=null?a:null),this.helperObject.position.copy(this.originObject3D.position),(l=this.plane)==null||l.position.copy(this.originObject3D.position)}getCornerPositions(){const{originObject3D:e}=this;if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("当前物体暂时不支持 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}function gu(i){const t=new I.Box3,e=new I.Vector3;if(i.traverse(n=>{var s;if(n.name==="shadow")return;const o=n.geometry;if(o!==void 0)if((s=o==null?void 0:o.attributes)!=null&&s.position){const r=o.attributes.position;for(let a=0,l=r.count;a<l;a++)e.fromBufferAttribute(r,a).applyMatrix4(n.matrix),t.expandByPoint(e)}else o.vertices.forEach(r=>{const a=r.clone().applyMatrix4(n.matrix);t.expandByPoint(a)})}),!t.isEmpty())return t}class HC extends kC{constructor(e){super(e);f(this,"box");f(this,"outline");f(this,"originObject");f(this,"positionAttribute");this.originObject=e,this.positionAttribute=new I.BufferAttribute(new Float32Array(8*3),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}raycasterIntersectObject(e,n){return e.intersectObject(this,!1,n)}raycast(e,n){this.box.raycast(e,n)}update(){const e=gu(this.originObject);if(!e)return;const{min:n,max:o}=e;this.positionAttribute.setXYZ(0,o.x,o.y,o.z),this.positionAttribute.setXYZ(1,n.x,o.y,o.z),this.positionAttribute.setXYZ(2,n.x,n.y,o.z),this.positionAttribute.setXYZ(3,o.x,n.y,o.z),this.positionAttribute.setXYZ(4,o.x,o.y,n.z),this.positionAttribute.setXYZ(5,n.x,o.y,n.z),this.positionAttribute.setXYZ(6,n.x,n.y,n.z),this.positionAttribute.setXYZ(7,o.x,n.y,n.z),this.positionAttribute.needsUpdate=!0}createOutline(){const e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.LineBasicMaterial({color:64767,linewidth:1,opacity:1,depthTest:!1,transparent:!0,toneMapped:!1}),s=new I.LineSegments(n,o);return s.matrixAutoUpdate=!1,s}createBox(){const e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),n=new I.BufferGeometry;n.setIndex(new I.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new I.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new I.Mesh(n,o)}}class no{constructor(t,e){f(this,"originObject3D");f(this,"hooks");f(this,"disposers",[]);f(this,"helperObject3D");f(this,"camera");f(this,"model");f(this,"scene");f(this,"container");f(this,"domEvents");f(this,"isDragging",!1);f(this,"enabled",!1);f(this,"name","BaseController");f(this,"boundingBox");f(this,"offset");f(this,"onRender");f(this,"onWantsTapGesture",t=>{if(this.getIntersectObject(t))return!1});var c,d;this.hooks=(c=t.sharedHooks)!=null?c:new li,this.camera=t.camera,this.model=t.model,this.originObject3D=t.originObject3D,this.helperObject3D=t.helperObject3D,this.container=t.container,this.scene=t.scene,this.domEvents=new Me(t.camera,t.container),this.onRender=(d=t.onRender)!=null?d:()=>{},this.offset=e==null?void 0:e.offset,this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable();const n=(...h)=>this.onSetOriginObjectScale(...h),o=(...h)=>this.onSetOriginObjectRotate(...h),s=(...h)=>this.onSetOriginObjectPosition(...h),r=(...h)=>this.onApplyOriginObjectScale(...h),a=(...h)=>this.onApplyOriginObjectRotate(...h),l=(...h)=>this.onApplyOriginObjectPosition(...h);this.hooks.on("setObjectScale",n),this.hooks.on("setObjectRotate",o),this.hooks.on("setObjectPosition",s),this.hooks.on("applyObjectPosition",l),this.hooks.on("applyObjectRotate",a),this.hooks.on("applyObjectScale",r),this.disposers.push(()=>{this.hooks.off("setObjectScale",n),this.hooks.off("setObjectRotate",o),this.hooks.off("setObjectPosition",s),this.hooks.off("applyObjectPosition",l),this.hooks.off("applyObjectRotate",a),this.hooks.off("applyObjectScale",r)})}initialHelperPosition(){this.helperObject3D.position.add(this.calculateOffset(this.offset)),this.helperObject3D.initialPosition()}initialHelperQuaternion(){this.helperObject3D.initQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.helperObject3D.enable(),this.render())}disable(){this.enabled&&(this.enabled=!1,this.helperObject3D.disable(),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){var t;(t=this.disposers)==null||t.forEach(e=>e==null?void 0:e()),this.helperObject3D.dispose(),this.render()}applyHelperMatrix4(t){this.helperObject3D.applyMatrix4(t)}applyHelperQuaternion(t,e){this.helperObject3D.applyHelperQuaternion(t,e)}applyHelperScaleMatrix4(t,e){this.helperObject3D.applyHelperScaleMatrix4(t,e)}onWantsGesture(t,e,n){if(this.isDragging)return!1}onIntersectionOnModelUpdate(t){}onApplyOriginObjectScale(t){this.applyHelperScaleMatrix4(t.matrix,t.origin)}onApplyOriginObjectRotate(t){this.applyHelperQuaternion(t.quaternion,t.origin)}onApplyOriginObjectPosition(t){this.applyHelperMatrix4(t.matrix)}onSetOriginObjectScale(t){this.helperObject3D.scale.copy(t),this.updateOffsetByScale(t)}onSetOriginObjectRotate(t,e){this.helperObject3D.setHelperQuaternion(t,e)}onSetOriginObjectPosition(t){this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.offset)))}render(){this.onRender()}updateOffsetByScale(t){if(this.boundingBox&&this.offset){const e=this.originObject3D.position,n=new I.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),o=new I.Vector3().subVectors(this.boundingBox.min,e).multiply(t).add(e),s=this.calculateOffset(this.offset,{min:o,max:n});this.helperObject3D.position.copy(s),this.helperObject3D.initialPosition()}}hoverListener(t,e=16777215,n=1){const o=(Array.isArray(t)?t:[t]).filter(ci),s=[];for(const r of o)if(r instanceof I.Mesh||r instanceof I.Group){const a=r instanceof I.Group?r.children.filter(u=>u instanceof I.Mesh):[r];a.forEach(u=>{u.__originalColor__=u.material.color.clone(),u.__originalOpacity__=u.material.opacity});const l=()=>{a.forEach(u=>{u.material.color.set(e),u.material.opacity=n}),this.render()},c=()=>{a.forEach(u=>{u.material.color.copy(u.__originalColor__),u.material.opacity=u.__originalOpacity__}),this.render()},d=()=>{this.isDragging||l()},h=()=>{this.isDragging||c()};for(const u of a)this.domEvents.addEventListener(u,"mouseover",d),this.domEvents.addEventListener(u,"mouseout",h),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",c),this.hooks.on("rotateEnd",c),s.push(()=>{this.domEvents.removeEventListener(u,"mouseover",d),this.domEvents.removeEventListener(u,"mouseout",h),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",c),this.hooks.off("rotateEnd",c)})}return()=>s.forEach(r=>r==null?void 0:r())}getIntersectObject(t){const e=this.camera.position,n=this.helperObject3D;if(!n)return;const o=this.helperObject3D.raycasterIntersectObject(t)[0];if(!o)return;const s=o;if(s.object=n,this.model.intersectRaycaster){const r=this.model.intersectRaycaster(t)[0];if(r&&r.point.distanceTo(e)<s.point.distanceTo(e))return}return s.object}calculateOffset(t,e){const n=this.originObject3D,o=new I.Vector3(0,0,0);if(!t)return o;const s=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=gu(n),this.boundingBox));if(typeof t.x=="number")o.setX(t.x);else if(typeof t.x=="object"){const r=s();o.setX((r.max.x-r.min.x)*t.x.percents)}if(typeof t.y=="number")o.setY(t.y);else if(typeof t.y=="object"){const r=s();o.setY((r.max.y-r.min.y)*t.y.percents)}if(typeof t.z=="number")o.setZ(t.z);else if(typeof t.z=="object"){const r=s();o.setZ((r.max.z-r.min.z)*t.z.percents)}return o}}class GC extends no{constructor(...e){super(...e);f(this,"name","MoveController");f(this,"startInfo");f(this,"_moveByMouseEnable",!1);f(this,"mouseInfo");f(this,"mousedownEventListenerDisposer");const n=this.helperObject3D;this.hoverListener([n.xArrow,n.yArrow,n.zArrow]);const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("rotateStart",l),this.hooks.on("rotateEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("rotateStart",l),this.hooks.off("rotateEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}),this.moveByMouseEnable&&this.moveByMouse()}get moveByMouseEnable(){return this._moveByMouseEnable}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(n=>n==null?void 0:n())}moveByMouse(){this._moveByMouseEnable=!0;const e=this.handleMouseDown.bind(this),n=this.handleMouseUp.bind(this);this.hooks.emit("moveByMouseEnable"),setTimeout(()=>{this.container.addEventListener("mousedown",e),this.container.addEventListener("mouseup",n)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener("mousedown",e),this.container.removeEventListener("mouseup",n)}}disableMoveByMouse(){var e;this._moveByMouseEnable=!1,this.hooks.emit("moveByMouseDisable"),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){!this.moveByMouseEnable||this.hooks.emit("wantToMove",e.point)||(this.originObject3D.position.copy(e.point),this.hooks.emit("setObjectPosition",e.point),this.hooks.emit("move",e.point))}onApplyOriginObjectScale(e){}handleMouseDown(e){const{x:n,y:o}=e;this.mouseInfo={x:n,y:o,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;const{x:n,y:o}=e;this.mouseInfo.x===n&&this.mouseInfo.y===o&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}dragStart(e){if(this._moveByMouseEnable||this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=new I.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new I.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new I.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),l=(()=>{switch(o){case"x":return s;case"y":return r;case"z":return a}})(),c=(()=>{switch(o){case"x":case"y":return a;case"z":return s}})(),d=n.point.clone(),h=new I.Plane;h.setFromNormalAndCoplanarPoint(c,d),this.startInfo={startVectorProject:d.clone().projectOnVector(l),directionVector:l,plane:h},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("moveStart"),this.isDragging=!0}dragging(e){if(!this.isDragging||!this.startInfo)return;const n=Ia(this.camera,e,this.container);return n?(this.move(n),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:n,directionVector:o,startVectorProject:s}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(n,new I.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new I.Matrix4;d.setPosition(c);const h=r.position.clone().applyMatrix4(d);this.hooks.emit("wantToMove",h)||(r.applyMatrix4(d),s.copy(l),this.hooks.emit("applyObjectPosition",{matrix:d}),this.hooks.emit("move",h))}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Oi{constructor(t,e,n,o,s,r){f(this,"helperController");f(this,"five");f(this,"onFiveWantsTapGesture",t=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(t);return this.five.needsRender=!0,e});f(this,"onFiveWantsGesture",(...t)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...t);return this.five.needsRender=!0,e});f(this,"onFiveIntersectionOnModelUpdate",(...t)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...t)});const{camera:a,model:l,scene:c}=t,d=t.getElement();if(this.five=t,!a||!l||!d||!c)return;const h=()=>{t.needsRender=!0};this.helperController=new e({camera:a,model:l,originObject3D:n,helperObject3D:o,container:d,scene:c,onRender:h,sharedHooks:r},s),t.on("wantsTapGesture",this.onFiveWantsTapGesture),t.on("wantsGesture",this.onFiveWantsGesture),t.on("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate)}dispose(){var t;this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("wantsGesture",this.onFiveWantsGesture),this.five.off("intersectionOnModelUpdate",this.onFiveIntersectionOnModelUpdate),(t=this.helperController)==null||t.dispose()}}const FC="v1.0.1",WC="Object3DHelper",ka=`${WC}@${FC}`,NC=()=>{console.error(`${ka} is disposed`)},XC=()=>{console.warn(`${ka} is disabled`)},YC=()=>{console.error(`${ka} is disabled`)};class UC{constructor(t){f(this,"controllers",{});f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"hooks",new li);f(this,"eventListener",{});t&&this.addControllers(t),this.setState(this.state)}show(t){return Y(this,null,function*(){this.setState({visible:!0},t)})}hide(t){return Y(this,null,function*(){this.setState({visible:!1},t)})}enable(t){this.setState({enabled:!0},t)}disable(t){this.setState({enabled:!1},t)}dispose(){this.setState({disposed:!0})}setState(t,e){if(this.state.disposed)return NC();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return YC();const n=F({},this.state);this.state=F(F({},this.state),t),t.disposed!==void 0&&t.disposed!==n.disposed&&t.disposed&&this.handleDispose(),t.visible!==void 0&&this.handleVisible(t.visible),t.enabled!==void 0&&this.handleEnable(t.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}addControllers(t){this.controllers=F(F({},this.controllers),t),this.setState(this.state)}getCurrentState(){return this.state}handleEnable(t,e=!0){t?(this.everyControllerDo(n=>{n.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(n=>{n.disable()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=t}handleVisible(t,e=!0){t?(this.everyControllerDo(n=>{n.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(n=>{n.hide()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=t}everyControllerDo(t){Object.values(this.controllers).forEach(e=>{e&&t(e)})}handleDispose(){var t,e;Object.values(this.controllers).forEach(n=>{n==null||n.dispose()});for(const n in this.controllers){if(!n)continue;const o=n;(e=(t=this.eventListener)[o])==null||e.call(t)}}actionIfStateIsEnabled(t,e){if(this.state.enabled)return t();e!=null&&e.warnLog&&XC()}}function Lr(i){return i*Math.PI/180}class qC extends no{constructor(...e){var c,d,h;super(...e);f(this,"name","RotateController");f(this,"startInfo");f(this,"removeListener");const n=this.helperObject3D;this.hoverListener([(c=n.xCircle)==null?void 0:c.circle,(d=n.yCircle)==null?void 0:d.circle,(h=n.zCircle)==null?void 0:h.circle].filter(Boolean));const o=this.dragStart.bind(this),s=this.dragging.bind(this),r=this.dragEnd.bind(this),a=this.show.bind(this),l=this.hide.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",o),document.addEventListener("mousemove",s),document.addEventListener("mouseup",r),this.hooks.on("moveStart",l),this.hooks.on("moveEnd",a),this.hooks.on("moveByMouseEnable",l),this.hooks.on("moveByMouseDisable",a),this.removeListener=()=>{this.domEvents.removeEventListener(this.helperObject3D,"mousedown",o),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),this.hooks.off("moveStart",l),this.hooks.off("moveEnd",a),this.hooks.off("moveByMouseEnable",l),this.hooks.off("moveByMouseDisable",a)}}get rotateCenter(){return this.helperObject3D.position.clone()}initialHelperQuaternion(){this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}setRotateAngle(e){const{x:n=0,y:o=0,z:s=0}=e,r=new I.Euler(Lr(n),Lr(o),Lr(s)),a=new I.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:d}=this;mu(c,a,d),this.hooks.emit("setObjectRotate",a,d),this.hooks.emit("rotate",a),this.render()}dispose(){this.removeListener(),super.dispose()}onApplyOriginObjectRotate(e){this.isDragging||super.onApplyOriginObjectRotate(e)}onApplyOriginObjectScale(e){}dragStart(e){if(this.isDragging)return;const n=e==null?void 0:e.intersect;if(!n)return this.dragEnd();const o=(n==null?void 0:n.object).direction;if(!o)return this.dragEnd();const s=n.point,r=this.getAngleHelper(o);this.setTipsAngle(0);const a=s.clone();a.y+=.2,this.setTipsPosition(a);const l=(()=>{if(o==="x")return new I.Vector3(1,0,0).applyQuaternion(this.originObject3D.quaternion);if(o==="y")return new I.Vector3(0,1,0).applyQuaternion(this.originObject3D.quaternion);if(o==="z")return new I.Vector3(0,0,1).applyQuaternion(this.originObject3D.quaternion)})(),c=new I.Plane().setFromNormalAndCoplanarPoint(l,s),h=c.projectPoint(s.clone(),new I.Vector3).clone().sub(this.rotateCenter),u=h.angleTo(r.baseAxes.clone().applyQuaternion(this.originObject3D.quaternion));this.setAngleHelperStart(o,u),this.setAngleHelperLength(o,0),this.startInfo={direction:o,startVector:h,plane:c,angleHelper:r,angle:0,objectQuaternion:this.originObject3D.quaternion.clone()},this.helperObject3D.showDraggingHelper([o]),this.hooks.emit("rotateStart"),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const n=Ia(this.camera,e,this.container);return n?(this.rotate(n),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:n,plane:o,angleHelper:s,direction:r,objectQuaternion:a}=this.startInfo,{originObject3D:l}=this,c=e.ray.intersectPlane(o,new I.Vector3);if(!c)return;const d=this.rotateCenter.clone(),u=o.projectPoint(c.clone(),new I.Vector3).clone().sub(d);if(n.angleTo(u)===0)return;const m=new I.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize()),v=l.quaternion.clone().premultiply(m);if(this.hooks.emit("wantToRotate",v))return;const b=new I.Euler().setFromQuaternion(new I.Quaternion().setFromUnitVectors(n.clone().normalize().applyQuaternion(a.clone().inverse()),u.clone().normalize().applyQuaternion(a.clone().inverse())),`${r.toUpperCase()}${"XZY".replace(r.toUpperCase(),"")}`)[r]*s.angleDirection;if(this.startInfo.angle+=b,this.setAngleHelperLength(r,this.startInfo.angle),this.setTipsAngle(lh(this.startInfo.angle)),d){const y=new I.Vector3().subVectors(l.position,d).applyQuaternion(m).add(d);l.position.copy(y)}l.applyQuaternion(m),this.hooks.emit("applyObjectRotate",{quaternion:m,origin:d}),this.hooks.emit("rotate",l.quaternion),this.startInfo.startVector=u}dragEnd(){this.isDragging&&(this.hooks.emit("setObjectRotate",this.originObject3D.quaternion,this.rotateCenter),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){var n,o,s;switch(e){case"x":return(n=this.helperObject3D.xCircle)==null?void 0:n.angleSector;case"y":return(o=this.helperObject3D.yCircle)==null?void 0:o.angleSector;case"z":return(s=this.helperObject3D.zCircle)==null?void 0:s.angleSector}}setAngleHelperStart(e,n){const o=this.getAngleHelper(e);if(!o){console.warn("angleHelper is undefined");return}if(o instanceof I.Mesh&&o.geometry instanceof I.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new I.CircleGeometry(s,r,n,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,n){const s=n>=0?Math.max(n,.001):Math.min(n,-.001),r=this.getAngleHelper(e);if(r instanceof I.Mesh&&r.geometry instanceof I.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new I.CircleGeometry(a,c,l,s)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var o;const n=(o=this.helperObject3D.angleTips)==null?void 0:o.element;n&&(n.innerText=`${e.toFixed(0)}°`)}setTipsPosition(e){const n=this.helperObject3D.angleTips;if(!n)return;const o=e.project(this.camera),{x:s,y:r,z:a}=o;if(a>1)return;const l=(s+1)/2*100+"%",c=(-r+1)/2*100+"%";n.setLeftTop(l,c)}}class JC extends no{constructor(...e){super(...e);f(this,"startInfo");f(this,"name","RectangleScaleController")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}onApplyOriginObjectPosition(e){this.isDragging||super.onApplyOriginObjectPosition(e)}onApplyOriginObjectScale(e){this.helperObject3D.applyHelperScaleMatrix4(e.matrix,e.origin)}getDragPlane(){const e=new I.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new R.Vector3),n[0]):e.setFromCoplanarPoints(n[0],n[1],n[2]),e}dragStart(e,n){var s,r;(r=(s=this.helperObject3D).updatePoints)==null||r.call(s);const o=this.getDragPlane();if(!o)return this.dragEnd();this.startInfo={startPoint:{position:n.position.clone(),direction:n.direction},plane:o},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0}dragging(e){if(!this.isDragging)return;const n=Ia(this.camera,e,this.container);if(!n)return this.dragEnd();this.scale(n)}scale(e){var X,J;if(!this.startInfo)return;const n=this.originObject3D,{startPoint:o,plane:s}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(s,new R.Vector3);if(!a||LC(a,this.camera.position))return;const l=new R.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=o,h=new R.Vector3().subVectors(r[1],r[0]),u=new R.Vector3().subVectors(r[3],r[0]),m=H=>{const Q=new R.Vector3(0,0,0);if(!this.startInfo)return Q;const G=(H==="ew"?h:u).clone(),B=c.clone().projectOnVector(G),W=a.clone().projectOnVector(G),q=l.clone().projectOnVector(G);if(W.equals(B))return Q;if(H==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const re=new R.Vector3().subVectors(W,q),oe=re.x<0&&G.x>=0,Ae=re.y<0&&G.y>=0,we=re.z<0&&G.z>=0;this.startInfo.dragPointInCenterBottom=oe||Ae||we}if(H==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const re=new R.Vector3().subVectors(W,q),oe=re.x<0&&G.x>=0,Ae=re.y<0&&G.y>=0,we=re.z<0&&G.z>=0;this.startInfo.dragPointInCenterLeft=oe||Ae||we}const U=new R.Vector3().subVectors(W,B),Z=U.length();return Z>.3?(console.warn("offset.length() > 0.3, skipped",Z),Q):U},v=m("ew"),g=m("ns"),A=()=>{const H=v;this.helperObject3D.cornerPositions.forEach((Q,G)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterLeft?(G===0||G===3)&&Q.add(H):(G===1||G===2)&&Q.add(H)})},b=()=>{const H=g;this.helperObject3D.cornerPositions.forEach((Q,G)=>{var B;(B=this.startInfo)!=null&&B.dragPointInCenterBottom?(G===0||G===1)&&Q.add(H):(G===2||G===3)&&Q.add(H)})};switch(d){case"ew":A();break;case"ns":b();break;case"nesw":case"nwse":A(),b()}const y=new R.Vector3().subVectors(r[1],r[0]).length()/h.length(),E=new R.Vector3().subVectors(r[3],r[0]).length()/u.length(),k=new R.Vector3(y,E,1),S=new I.Matrix4().scale(k);n.isCSS3DObjectPlus?n.applyScaleMatrix4(S):n.scale.applyMatrix4(S),o.position.copy(a);const C=new R.Vector3().addVectors(r[0],r[2]).divideScalar(2),_=new R.Vector3().subVectors(C,l),M=new I.Matrix4().setPosition(_);n.applyMatrix4(M),(X=this.helperObject3D.css3DInstance)==null||X.css3DObject.applyMatrix4(M),(J=this.helperObject3D.plane)==null||J.applyMatrix4(M),this.hooks.emit("applyObjectScale",{matrix:S}),this.hooks.emit("applyObjectPosition",{matrix:M}),this.render()}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render())}}class ZC extends JC{constructor(...e){super(...e);f(this,"name","CSS3DScaleController");this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(e=>{if(!e)return;const n=e.point,o=a=>this.dragStart(a,e),s=this.dragging.bind(this),r=this.dragEnd.bind(this);n.addEventListener("dragstart",o),n.addEventListener("drag",s),n.addEventListener("dragend",r)})}}class KC extends no{constructor(...e){super(...e);f(this,"name","BoundingBoxController")}}class $C extends pu{constructor(t){super(t)}}class eE extends no{constructor(...e){super(...e);f(this,"name","ScaleController")}setScale(e){var l,c,d;let n=1,o=1,s=1;typeof e=="number"?(n=e,o=e,s=e):typeof e=="object"&&(n=(l=e.x)!=null?l:1,o=(c=e.y)!=null?c:1,s=(d=e.z)!=null?d:1);const r=new I.Vector3(n,o,s);this.hooks.emit("wantToScale",r)||(this.originObject3D.scale.copy(r),this.hooks.emit("setObjectScale",r),this.hooks.emit("scale",r),this.render())}}const $r="Object3DHelperPlugin",Ps=$r,tE=()=>{console.error(`${Ps} is disposed`)},nE=()=>{console.warn(`${Ps} is disabled`)},iE=()=>{console.error(`${Ps} is disabled`)};class vu extends eo{constructor(e){super(e);f(this,"name",$r);f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"objectHelperMap",new Map);f(this,"css3DObjectParentMap",new Map);f(this,"css3DRender");this.five=e,this.css3DRender=new ti(this.five.scene),console.warn("Object3DHelper: 使用此插件,需要在初始化five时,设置five参数: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${$r.toUpperCase()}_DEBUG__`]:this})}show(e){return Y(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return Y(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,n){if(this.state.disposed)return tE();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return iE();const o=F({},this.state);this.state=F(F({},this.state),e),e.disposed!==void 0&&e.disposed!==o.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==o.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==o.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:o})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,n={}){var m;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const o=new UC,s=[],r=(m=this.five.getElement())==null?void 0:m.parentElement,a=this.five.camera,{moveHelper:l=!0,rotateHelper:c=!0,scaleHelper:d=!0,boundingBoxHelper:h=!1}=n,u=new ze.Subscribe;if(l){const v=new TC(e),g=this.getConfig(n.moveHelper),A=new Oi(this.five,GC,e,v,g,u);o.addControllers({moveController:A.helperController}),s.push(()=>A.dispose())}if(c){const v=this.getConfig(n.rotateHelper),g=new VC(e,F({container:r},v)),A=new Oi(this.five,qC,e,g,v,u);o.addControllers({rotateController:A.helperController}),s.push(()=>A.dispose())}if(h){const v=new HC(e),g=new Oi(this.five,KC,e,v,void 0,u);o.addControllers({boundingBoxController:g.helperController})}if(d)if(e.isCSS3DObjectPlus&&r){const v=new QC(e,r,a,this.five.scene),g=new Oi(this.five,ZC,e,v,void 0,u);o.addControllers({scaleController:g.helperController}),s.push(()=>g.dispose()),xd(this.five).then(()=>{var A,b;if(e.isCSS3DObjectPlus){const y=e;if(!y||y.mode!=="front")return;const E=(A=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?A:Dd(this.five);E&&(this.css3DObjectParentMap.set(y,y.parent),y.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(E),(b=this.css3DRender.getBehindCSS3DObjectGroup())==null||b.add(y),this.css3DRender.render(this.five.camera))}})}else{const v=new $C(e),g=new Oi(this.five,eE,e,v,void 0,u);o.addControllers({scaleController:g.helperController}),s.push(()=>g.dispose())}return this.objectHelperMap.set(e,{helper:o,disposers:s}),o.controllers}removeObject3DHelper(e){if(!this.objectHelperMap.has(e))return;const{helper:n,disposers:o}=this.objectHelperMap.get(e);if(n){if(e.isCSS3DObjectPlus){const s=e,r=this.css3DObjectParentMap.get(s);r&&r.add(s),this.css3DRender.render(this.five.camera)}this.objectHelperMap.delete(e),n.dispose(),o==null||o.forEach(s=>s==null?void 0:s())}}handleEnable(e,n=!0){e?(this.everyHelperDo(o=>o.enable()),this.hooks.emit("enable",{userAction:n})):(this.everyHelperDo(o=>o.disable()),this.hooks.emit("disable",{userAction:n})),this.state.enabled=e}handleVisible(e,n=!0){e?(this.everyHelperDo(o=>o.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:n}))):(this.everyHelperDo(o=>o.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:n}))),this.state.visible=e}handleDispose(){this.objectHelperMap.forEach(({helper:e,disposers:n})=>{e.dispose(),n==null||n.forEach(o=>o==null?void 0:o())})}everyHelperDo(e){this.objectHelperMap.forEach(({helper:n,disposers:o})=>{n&&e(n)})}actionIfStateIsEnabled(e,n){if(this.state.enabled)return e();n!=null&&n.warnLog&&nE()}getConfig(e){if(e&&typeof e!="boolean"&&e.enable)return e}}const oE=i=>new vu(i),sE=`
669
669
  varying vec2 vUv;
670
670
  void main() {
671
671
  vUv = uv;
@@ -685,4 +685,4 @@ void main() {
685
685
  float match = (1.0 - step(0.5, abs(uv.x - 0.5))) * (1.0 - step(0.5, abs(uv.y - 0.5))) * (transX < transY ? transX : transY);
686
686
  gl_FragColor = vec4(texture2D(map, uv).xyz, match);
687
687
  }
688
- `;function aE(i){const t=Math.PI*2;let e=-Math.atan2(i.x,-i.z);e=(e%t+t)%t;const n=-Math.asin(i.y/1);return{longitude:e,latitude:n}}class bd{constructor(t,e){f(this,"_id");f(this,"url");f(this,"five");f(this,"panoIndex");f(this,"observer");f(this,"origin");f(this,"video");f(this,"videoMesh");f(this,"_enabled",!0);f(this,"_disposed",!1);f(this,"videoDataLoaded",!1);f(this,"hasVideoEverPlayed",!1);f(this,"renderFiveDisposer");f(this,"uv2Position",(t,e)=>{var m;const o=Math.PI,s=Math.PI*2,r=t,a=1-e,l=new R.Vector3(-1*Math.cos(s*r)*Math.sin(o*a),1*Math.cos(o*a),1*Math.sin(s*r)*Math.sin(o*a));l.setX(-l.x);const c=(m=this.five.work)==null?void 0:m.observers[this.panoIndex];if(!c)return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);const d=c.position.clone(),h=c.quaternion.clone(),u=l.clone();return u.applyAxisAngle(new R.Vector3(0,1,0),Math.PI/2),u.applyQuaternion(h),u.add(d),u});f(this,"onFiveDataLoaded",()=>{var l;const t=(l=this.five.work)==null?void 0:l.observers[this.panoIndex];if(!t)return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);this.observer=t;const{x:e,y:n,z:o,w:s}=t.quaternion,r=new R.Quaternion(e,n,o,s),a=t.position;this.videoMesh.position.fromArray([a.x,a.y,a.z]),this.videoMesh.quaternion.set(0,0,0,1),this.videoMesh.rotateOnAxis(new R.Vector3(0,1,0),Math.PI/2),this.videoMesh.applyQuaternion(r)});f(this,"onFiveWantsMoveToPano",t=>{t===this.panoIndex&&(this.hasVideoEverPlayed||this.video.play().catch(e=>{console.error("🐶 ==> error:",e)}))});f(this,"onFivePanoArrived",t=>{if(this.disposed)return this.logWarning("实例已被销毁");this.enabled&&this.panoIndex===t&&this.mount()});f(this,"onFivePanoWillArrive",t=>{if(t!==this.panoIndex)return this.unmount();this.panoIndex!==t&&this.unmount()});f(this,"onFiveModeChange",t=>{t!=="Panorama"&&this.hide()});f(this,"onFiveInitAnimationEnded",()=>{const t=this.five.getCurrentState();t.mode==="Panorama"&&t.panoIndex===this.panoIndex&&this.mount()});f(this,"onFiveWantsTapGesture",t=>{if(!this.five.scene.children.includes(this.videoMesh))return;if(this.disposed)return this.logWarning("实例已被销毁");if(!this.enabled)return this.logWarning("实例已被禁用");const[e]=t.intersectObject(this.videoMesh);if(!e)return;if(this.checkIntersectionInBounding(this.origin,e))return this.video.muted=!this.video.muted,!1});f(this,"onVideoDataLoaded",()=>{this.videoDataLoaded=!0,this.video.paused===!1&&this.video.src!==""&&this.onVideoPlayingAndLoaded()});f(this,"onVideoPlaying",()=>{this.hasVideoEverPlayed=!0,this.video.src!==""&&this.videoDataLoaded&&this.onVideoPlayingAndLoaded()});f(this,"onVideoPlayingAndLoaded",()=>{if(!this.videoDataLoaded)return this.logWarning("视频数据未加载");if(this.video.paused===!0)return this.logWarning("视频已暂停");this.video.addEventListener("timeupdate",()=>{this.video.src!==""&&this.panoIndex===this.five.getCurrentState().panoIndex&&this.five.getCurrentState().mode==="Panorama"&&(this.renderFiveDisposer||(this.renderFiveDisposer=$i(()=>{this.five.needsRender=!0},30)),this.five.scene.add(this.videoMesh))},{once:!0})});f(this,"onVideoPaused",()=>{var t;(t=this.renderFiveDisposer)==null||t.call(this),this.renderFiveDisposer=void 0});var l,c;this.five=t,this.panoIndex=e.panoIndex,this._id=e.renderID,this.url=e.url,this.origin=e.origin.slice(),this._enabled=(c=(l=e.initialState)==null?void 0:l.enabled)!=null?c:!0;const n=document.createElement("video");n.crossOrigin="anonymous",n.autoplay=!1,n.muted=!0,n.loop=!0,n.playsInline=!0,this.video=n;const o=new R.VideoTexture(this.video);o.minFilter=R.LinearFilter,o.magFilter=R.LinearFilter;const s=new R.ShaderMaterial({vertexShader:sE,fragmentShader:rE,uniforms:{map:{value:o},size:{value:new R.Vector4(this.origin[0],1-this.origin[1]-this.origin[3],this.origin[2],this.origin[3])}},depthTest:!0,transparent:!0}),r=new R.SphereBufferGeometry(1,64,64);r.scale(-1,1,1);const a=new R.Mesh(r,s);a.name="pano-video",this.videoMesh=a,this.five.work&&this.onFiveDataLoaded(),this.enabled&&this.addEventListeners(),this.mountIfNeeded()}get renderID(){return this._id}get disposed(){return this._disposed}get enabled(){return this._enabled}dispose(){this.disposed||(this.disable(),this._disposed=!0)}enable(){this.disposed||this.enabled||(this._enabled=!0,this.addEventListeners(),this.mountIfNeeded())}disable(){this.disposed||this.enabled&&(this._enabled=!1,this.removeEventListeners(),this.unmount())}lookAtVideo(){if(!this.observer)return;const t=this.getUVCenter();if(!t)return;const e=this.uv2Position(t[0],t[1]);if(!e)return;const n=new R.Vector3().subVectors(e,this.observer.position).normalize(),{longitude:o,latitude:s}=aE(n);this.five.setState({panoIndex:this.panoIndex,longitude:o,latitude:s}),this.onFiveWantsMoveToPano(this.panoIndex)}getUVCenter(){if(!this.origin)return;const t=this.origin[0]+this.origin[2]/2,e=this.origin[1]+this.origin[3]/2;return[t,e]}addEventListeners(){this.five.on("loaded",this.onFiveDataLoaded),this.five.on("modeChange",this.onFiveModeChange),this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("wantsMoveToPano",this.onFiveWantsMoveToPano),this.five.on("wantsTapGesture",this.onFiveWantsTapGesture),this.five.on("initAnimationEnded",this.onFiveInitAnimationEnded),this.video.addEventListener("canplaythrough",this.onVideoDataLoaded),this.video.addEventListener("playing",this.onVideoPlaying),this.video.addEventListener("pause",this.onVideoPaused)}removeEventListeners(){this.five.off("loaded",this.onFiveDataLoaded),this.five.off("modeChange",this.onFiveModeChange),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("wantsMoveToPano",this.onFiveWantsMoveToPano),this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("initAnimationEnded",this.onFiveInitAnimationEnded),this.video.removeEventListener("canplaythrough",this.onVideoDataLoaded),this.video.removeEventListener("playing",this.onVideoPlaying),this.video.removeEventListener("pause",this.onVideoPaused)}mountIfNeeded(){const t=this.five.getCurrentState();t.mode==="Panorama"&&t.panoIndex===this.panoIndex&&this.enabled&&this.mount()}mount(){if(this.disposed)return this.logWarning("插件已经销毁,无法挂载。");if(this.url==="")return this.logWarning("视频资源不存在。");this.video.src!==this.url&&(this.video.src=this.url),this.video.paused&&this.video.play().catch(t=>{this.logWarning(t instanceof Error?t.message:"视频播放失败。"),this.five.once("gesture",()=>{this.video.play().catch(e=>{this.logWarning(e instanceof Error?e.message:"自动播放视频失败。")})})})}unmount(){this.video.pause(),this.video.src!==""&&(this.video.src=""),this.five.scene.remove(this.videoMesh)}hide(){this.video.pause(),this.five.scene.remove(this.videoMesh)}logWarning(t){console.warn("⛔ ==> [VideoMeshController]:",t)}checkIntersectionInBounding(t,e){if(!e.uv)return!1;const[n,o]=e.uv.toArray(),[s,r,a,l]=t,c=1-r-l,d=s+a,h=c+l;return n>=s&&n<=d&&o>=c&&o<=h}}class lE extends eo{constructor(e){super(e);f(this,"enabled",!0);f(this,"controllerMap",new Map);f(this,"_disposed",!1);this.five=e}get state(){return{enabled:this.enabled}}get disposed(){return this._disposed}load(e,n){var o;if(this.disposed)return this.logWarning("插件已被销毁");typeof((o=n==null?void 0:n.initialState)==null?void 0:o.enabled)!="undefined"&&n.initialState.enabled!==this.enabled&&(n.initialState.enabled?this.enable():this.disable()),e.list.forEach(s=>{const r=s.pano_index,a=s.render_id;s.video_list.forEach(l=>{this.controllerMap.set(l.render_id,new bd(this.five,ye(F({},l),{panoIndex:r,renderID:a,initialState:{enabled:this.enabled}})))})})}enable(e){var o;if(this.disposed)return this.logWarning("插件已被销毁");if(this.enabled)return;this.enabled=!0,Array.from(this.controllerMap.values()).forEach(s=>s.enable());const n=(o=e==null?void 0:e.userAction)!=null?o:!0;this.hooks.emit("enable",{userAction:n})}disable(e){var o;if(this.disposed)return this.logWarning("插件已被销毁");if(!this.enabled)return;this.enabled=!1,Array.from(this.controllerMap.values()).forEach(s=>s.disable());const n=(o=e==null?void 0:e.userAction)!=null?o:!0;this.hooks.emit("disable",{userAction:n})}lookAtVideoItemByRenderID(e){if(this.disposed)return this.logWarning("插件已被销毁");const n=this.controllerMap.get(e);if(!n)return this.logWarning(`ID 为 ${e} 的点位视频不存在`);n.lookAtVideo()}add(e,n){if(this.disposed)return this.logWarning("插件已被销毁");n.forEach(o=>{if(this.controllerMap.get(o.render_id))return this.logWarning(`ID 为 ${o.render_id} 的点位视频已存在`);const s=o.render_id;this.controllerMap.set(o.render_id,new bd(this.five,ye(F({},o),{panoIndex:e,renderID:s,initialState:{enabled:this.enabled}})))})}removeByRenderID(e){if(this.disposed)return this.logWarning("插件已被销毁");const n=this.controllerMap.get(e);if(!n)return this.logWarning(`ID 为 ${e} 的点位视频不存在`);n.dispose(),this.controllerMap.delete(e)}clear(){if(this.disposed)return this.logWarning("插件已被销毁");Array.from(this.controllerMap.values()).forEach(e=>e.dispose()),this.controllerMap.clear()}dispose(){if(this.disposed)return this.logWarning("插件已被销毁");this._disposed=!0,Array.from(this.controllerMap.values()).forEach(e=>e.dispose()),this.controllerMap.clear()}logWarning(e){console.warn("⛔ ==> [PanoVideoPluginController]:",e)}}const cE=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),dE=i=>new lE(i);ku();Iu();exports.CSS3DRender=ti;exports.CSS3DRenderPlugin=ia;exports.CameraMovementEffect=ph;exports.CameraMovementPlugin=Bg;exports.ContentType=au;exports.CruisePlugin=yC;exports.CruisePluginController=to;exports.CruisePluginTypes=bC;exports.DIRECTION=qn;exports.DISPLAY_STRATEGY_TYPE=Pn;exports.DimensionType=lu;exports.FLOOR_PLAN_ATTACHED_TO=nn;exports.FLOOR_TYPE_MAP=Dg;exports.GuideLineItem=PC;exports.GuideLineModeItem=dC;exports.GuideLinePlugin=fu;exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Cn;exports.ItemLabelPlugin=Y0;exports.Magnifier=bh;exports.MapviewFloorplanPlugin=rg;exports.ModelChassisCompassPlugin=Lg;exports.ModelEntryDoorGuidePlugin=jg;exports.ModelFloorplanPlugin=ng;exports.ModelItemLabelPlugin=x0;exports.ModelRoomLabelPlugin=mm;exports.ModelTVVideoPlugin=S0;exports.ModelViewPlugin=Gu;exports.Object3DHelperController=vu;exports.Object3DHelperPlugin=oE;exports.PLUGIN=Ps;exports.PaintBrush=Hu;exports.PaintBrushTypeEnum=Xt;exports.PanoCompassPlugin=sv;exports.PanoCursorRaycasterPlugin=If;exports.PanoDoorLabelPlugin=rA;exports.PanoFloorplanRadarPlugin=kg;exports.PanoMeasurePlugin=e0;exports.PanoMeasurePluginLine=Sn;exports.PanoMeasurePluginModel=ms;exports.PanoMeasurePluginPoint=Dt;exports.PanoMeasurePluginPolyline=Ji;exports.PanoRulerPlugin=Fg;exports.PanoRulerProPlugin=ev;exports.PanoSpatialTagPlugin=p0;exports.PanoTagPlugin=nC;exports.PanoTagPluginController=ns;exports.PanoVideoPlugin=dE;exports.PanoVideoPluginType=cE;exports.PointType=ru;exports.ROOM_FETILE_TYPE_MAP=xg;exports.ROOM_TYPE_MAP=Mg;exports.Rotation=_t;exports.TopviewFloorplanPlugin=lg;exports.Util=Cf;exports.itemLabelPluginServerParams=U0;exports.modelItemLabelPluginServerParams=D0;exports.modelRoomLabelPluginServerParams=pm;exports.pluginFlag=tC;
688
+ `;function aE(i){const t=Math.PI*2;let e=-Math.atan2(i.x,-i.z);e=(e%t+t)%t;const n=-Math.asin(i.y/1);return{longitude:e,latitude:n}}class bd{constructor(t,e){f(this,"_id");f(this,"url");f(this,"five");f(this,"panoIndex");f(this,"observer");f(this,"origin");f(this,"video");f(this,"videoMesh");f(this,"_enabled",!0);f(this,"_disposed",!1);f(this,"videoDataLoaded",!1);f(this,"hasVideoEverPlayed",!1);f(this,"renderFiveDisposer");f(this,"uv2Position",(t,e)=>{var m;const o=Math.PI,s=Math.PI*2,r=t,a=1-e,l=new R.Vector3(-1*Math.cos(s*r)*Math.sin(o*a),1*Math.cos(o*a),1*Math.sin(s*r)*Math.sin(o*a));l.setX(-l.x);const c=(m=this.five.work)==null?void 0:m.observers[this.panoIndex];if(!c)return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);const d=c.position.clone(),h=c.quaternion.clone(),u=l.clone();return u.applyAxisAngle(new R.Vector3(0,1,0),Math.PI/2),u.applyQuaternion(h),u.add(d),u});f(this,"onFiveDataLoaded",()=>{var l;const t=(l=this.five.work)==null?void 0:l.observers[this.panoIndex];if(!t)return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);this.observer=t;const{x:e,y:n,z:o,w:s}=t.quaternion,r=new R.Quaternion(e,n,o,s),a=t.position;this.videoMesh.position.fromArray([a.x,a.y,a.z]),this.videoMesh.quaternion.set(0,0,0,1),this.videoMesh.rotateOnAxis(new R.Vector3(0,1,0),Math.PI/2),this.videoMesh.applyQuaternion(r)});f(this,"onFiveWantsMoveToPano",t=>{t===this.panoIndex&&(this.hasVideoEverPlayed||this.video.play().catch(e=>{console.error("🐶 ==> error:",e)}))});f(this,"onFivePanoArrived",t=>{if(this.disposed)return this.logWarning("实例已被销毁");this.enabled&&this.panoIndex===t&&this.mount()});f(this,"onFivePanoWillArrive",t=>{if(t!==this.panoIndex)return this.unmount();this.panoIndex!==t&&this.unmount()});f(this,"onFiveModeChange",t=>{t!=="Panorama"&&this.hide()});f(this,"onFiveInitAnimationEnded",()=>{const t=this.five.getCurrentState();t.mode==="Panorama"&&t.panoIndex===this.panoIndex&&this.mount()});f(this,"onFiveWantsTapGesture",t=>{if(!this.five.scene.children.includes(this.videoMesh))return;if(this.disposed)return this.logWarning("实例已被销毁");if(!this.enabled)return this.logWarning("实例已被禁用");const[e]=t.intersectObject(this.videoMesh);if(!e)return;if(this.checkIntersectionInBounding(this.origin,e))return this.video.muted=!this.video.muted,!1});f(this,"onVideoDataLoaded",()=>{this.videoDataLoaded=!0,this.video.paused===!1&&this.video.src!==""&&this.onVideoPlayingAndLoaded()});f(this,"onVideoPlaying",()=>{this.hasVideoEverPlayed=!0,this.video.src!==""&&this.videoDataLoaded&&this.onVideoPlayingAndLoaded()});f(this,"onVideoPlayingAndLoaded",()=>{if(!this.videoDataLoaded)return this.logWarning("视频数据未加载");if(this.video.paused===!0)return this.logWarning("视频已暂停");this.video.addEventListener("timeupdate",()=>{this.video.src!==""&&this.panoIndex===this.five.getCurrentState().panoIndex&&this.five.getCurrentState().mode==="Panorama"&&(this.renderFiveDisposer||(this.renderFiveDisposer=$i(()=>{this.five.needsRender=!0},30)),this.five.scene.add(this.videoMesh))},{once:!0})});f(this,"onVideoPaused",()=>{var t;(t=this.renderFiveDisposer)==null||t.call(this),this.renderFiveDisposer=void 0});var l,c;this.five=t,this.panoIndex=e.panoIndex,this._id=e.renderID,this.url=e.url,this.origin=e.origin.slice(),this._enabled=(c=(l=e.initialState)==null?void 0:l.enabled)!=null?c:!0;const n=document.createElement("video");n.crossOrigin="anonymous",n.autoplay=!1,n.muted=!0,n.loop=!0,n.playsInline=!0,this.video=n;const o=new R.VideoTexture(this.video);o.minFilter=R.LinearFilter,o.magFilter=R.LinearFilter;const s=new R.ShaderMaterial({vertexShader:sE,fragmentShader:rE,uniforms:{map:{value:o},size:{value:new R.Vector4(this.origin[0],1-this.origin[1]-this.origin[3],this.origin[2],this.origin[3])}},depthTest:!0,transparent:!0}),r=new R.SphereBufferGeometry(1,64,64);r.scale(-1,1,1);const a=new R.Mesh(r,s);a.name="pano-video",this.videoMesh=a,this.five.work&&this.onFiveDataLoaded(),this.enabled&&this.addEventListeners(),this.mountIfNeeded()}get renderID(){return this._id}get disposed(){return this._disposed}get enabled(){return this._enabled}dispose(){this.disposed||(this.disable(),this._disposed=!0)}enable(){this.disposed||this.enabled||(this._enabled=!0,this.addEventListeners(),this.mountIfNeeded())}disable(){this.disposed||this.enabled&&(this._enabled=!1,this.removeEventListeners(),this.unmount())}lookAtVideo(){if(!this.observer)return;const t=this.getUVCenter();if(!t)return;const e=this.uv2Position(t[0],t[1]);if(!e)return;const n=new R.Vector3().subVectors(e,this.observer.position).normalize(),{longitude:o,latitude:s}=aE(n);this.five.setState({panoIndex:this.panoIndex,longitude:o,latitude:s}),this.onFiveWantsMoveToPano(this.panoIndex)}getUVCenter(){if(!this.origin)return;const t=this.origin[0]+this.origin[2]/2,e=this.origin[1]+this.origin[3]/2;return[t,e]}addEventListeners(){this.five.on("loaded",this.onFiveDataLoaded),this.five.on("modeChange",this.onFiveModeChange),this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("wantsMoveToPano",this.onFiveWantsMoveToPano),this.five.on("wantsTapGesture",this.onFiveWantsTapGesture),this.five.on("initAnimationEnded",this.onFiveInitAnimationEnded),this.video.addEventListener("canplaythrough",this.onVideoDataLoaded),this.video.addEventListener("playing",this.onVideoPlaying),this.video.addEventListener("pause",this.onVideoPaused)}removeEventListeners(){this.five.off("loaded",this.onFiveDataLoaded),this.five.off("modeChange",this.onFiveModeChange),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("wantsMoveToPano",this.onFiveWantsMoveToPano),this.five.off("wantsTapGesture",this.onFiveWantsTapGesture),this.five.off("initAnimationEnded",this.onFiveInitAnimationEnded),this.video.removeEventListener("canplaythrough",this.onVideoDataLoaded),this.video.removeEventListener("playing",this.onVideoPlaying),this.video.removeEventListener("pause",this.onVideoPaused)}mountIfNeeded(){const t=this.five.getCurrentState();t.mode==="Panorama"&&t.panoIndex===this.panoIndex&&this.enabled&&this.mount()}mount(){if(this.disposed)return this.logWarning("插件已经销毁,无法挂载。");if(this.url==="")return this.logWarning("视频资源不存在。");this.video.src!==this.url&&(this.video.src=this.url),this.video.paused&&this.video.play().catch(t=>{this.logWarning(t instanceof Error?t.message:"视频播放失败。"),this.five.once("gesture",()=>{this.video.play().catch(e=>{this.logWarning(e instanceof Error?e.message:"自动播放视频失败。")})})})}unmount(){this.video.pause(),this.video.src!==""&&(this.video.src=""),this.five.scene.remove(this.videoMesh)}hide(){this.video.pause(),this.five.scene.remove(this.videoMesh)}logWarning(t){console.warn("⛔ ==> [VideoMeshController]:",t)}checkIntersectionInBounding(t,e){if(!e.uv)return!1;const[n,o]=e.uv.toArray(),[s,r,a,l]=t,c=1-r-l,d=s+a,h=c+l;return n>=s&&n<=d&&o>=c&&o<=h}}class lE extends eo{constructor(e){super(e);f(this,"enabled",!0);f(this,"controllerMap",new Map);f(this,"_disposed",!1);this.five=e}get state(){return{enabled:this.enabled}}get disposed(){return this._disposed}load(e,n){var o;if(this.disposed)return this.logWarning("插件已被销毁");typeof((o=n==null?void 0:n.initialState)==null?void 0:o.enabled)!="undefined"&&n.initialState.enabled!==this.enabled&&(n.initialState.enabled?this.enable():this.disable()),e.list.forEach(s=>{const r=s.pano_index,a=s.render_id;s.video_list.forEach(l=>{this.controllerMap.set(l.render_id,new bd(this.five,ye(F({},l),{panoIndex:r,renderID:a,initialState:{enabled:this.enabled}})))})})}enable(e){var o;if(this.disposed)return this.logWarning("插件已被销毁");if(this.enabled)return;this.enabled=!0,Array.from(this.controllerMap.values()).forEach(s=>s.enable());const n=(o=e==null?void 0:e.userAction)!=null?o:!0;this.hooks.emit("enable",{userAction:n})}disable(e){var o;if(this.disposed)return this.logWarning("插件已被销毁");if(!this.enabled)return;this.enabled=!1,Array.from(this.controllerMap.values()).forEach(s=>s.disable());const n=(o=e==null?void 0:e.userAction)!=null?o:!0;this.hooks.emit("disable",{userAction:n})}lookAtVideoItemByRenderID(e){if(this.disposed)return this.logWarning("插件已被销毁");const n=this.controllerMap.get(e);if(!n)return this.logWarning(`ID 为 ${e} 的点位视频不存在`);n.lookAtVideo()}add(e,n){if(this.disposed)return this.logWarning("插件已被销毁");n.forEach(o=>{if(this.controllerMap.get(o.render_id))return this.logWarning(`ID 为 ${o.render_id} 的点位视频已存在`);const s=o.render_id;this.controllerMap.set(o.render_id,new bd(this.five,ye(F({},o),{panoIndex:e,renderID:s,initialState:{enabled:this.enabled}})))})}removeByRenderID(e){if(this.disposed)return this.logWarning("插件已被销毁");const n=this.controllerMap.get(e);if(!n)return this.logWarning(`ID 为 ${e} 的点位视频不存在`);n.dispose(),this.controllerMap.delete(e)}clear(){if(this.disposed)return this.logWarning("插件已被销毁");Array.from(this.controllerMap.values()).forEach(e=>e.dispose()),this.controllerMap.clear()}dispose(){if(this.disposed)return this.logWarning("插件已被销毁");this._disposed=!0,Array.from(this.controllerMap.values()).forEach(e=>e.dispose()),this.controllerMap.clear()}logWarning(e){console.warn("⛔ ==> [PanoVideoPluginController]:",e)}}const cE=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),dE=i=>new lE(i);ku();Iu();exports.CSS3DRender=ti;exports.CSS3DRenderPlugin=ia;exports.CameraMovementEffect=ph;exports.CameraMovementPlugin=Bg;exports.ContentType=au;exports.CruisePlugin=yC;exports.CruisePluginController=to;exports.CruisePluginTypes=bC;exports.DIRECTION=qn;exports.DISPLAY_STRATEGY_TYPE=Pn;exports.DimensionType=lu;exports.FLOOR_PLAN_ATTACHED_TO=nn;exports.FLOOR_TYPE_MAP=Dg;exports.GuideLineItem=PC;exports.GuideLineModeItem=dC;exports.GuideLinePlugin=fu;exports.ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE=Cn;exports.ItemLabelPlugin=Y0;exports.Magnifier=bh;exports.MapviewFloorplanPlugin=rg;exports.ModelChassisCompassPlugin=Lg;exports.ModelEntryDoorGuidePlugin=_g;exports.ModelFloorplanPlugin=ng;exports.ModelItemLabelPlugin=x0;exports.ModelRoomLabelPlugin=mm;exports.ModelTVVideoPlugin=S0;exports.ModelViewPlugin=Gu;exports.Object3DHelperController=vu;exports.Object3DHelperPlugin=oE;exports.PLUGIN=Ps;exports.PaintBrush=Hu;exports.PaintBrushTypeEnum=Xt;exports.PanoCompassPlugin=sv;exports.PanoCursorRaycasterPlugin=If;exports.PanoDoorLabelPlugin=rA;exports.PanoFloorplanRadarPlugin=kg;exports.PanoMeasurePlugin=e0;exports.PanoMeasurePluginLine=Sn;exports.PanoMeasurePluginModel=ms;exports.PanoMeasurePluginPoint=Dt;exports.PanoMeasurePluginPolyline=Ji;exports.PanoRulerPlugin=Fg;exports.PanoRulerProPlugin=ev;exports.PanoSpatialTagPlugin=p0;exports.PanoTagPlugin=nC;exports.PanoTagPluginController=ns;exports.PanoVideoPlugin=dE;exports.PanoVideoPluginType=cE;exports.PointType=ru;exports.ROOM_FETILE_TYPE_MAP=xg;exports.ROOM_TYPE_MAP=Mg;exports.Rotation=Vt;exports.TopviewFloorplanPlugin=lg;exports.Util=Cf;exports.itemLabelPluginServerParams=U0;exports.modelItemLabelPluginServerParams=D0;exports.modelRoomLabelPluginServerParams=pm;exports.pluginFlag=tC;