@realsee/dnalogel 2.20.0-dev.11 → 2.20.0-dev.13

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 (309) hide show
  1. package/dist/index.cjs.js +23 -23
  2. package/dist/index.js +78 -78
  3. package/dist/index.umd.js +4 -4
  4. package/docs/classes/CSS3DRender.html +3 -3
  5. package/docs/classes/CruisePluginController.html +3 -3
  6. package/docs/classes/GuideLineItem.GuideLineItem.html +3 -3
  7. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +3 -3
  8. package/docs/classes/Magnifier.html +3 -3
  9. package/docs/classes/ModelRoomLabelController.html +3 -3
  10. package/docs/classes/Object3DHelperController.html +3 -3
  11. package/docs/classes/PaintBrush.html +3 -3
  12. package/docs/classes/PanoMeasurePluginLine.html +3 -3
  13. package/docs/classes/PanoMeasurePluginModel.html +3 -3
  14. package/docs/classes/PanoMeasurePluginPoint.html +3 -3
  15. package/docs/classes/PanoMeasurePluginPolyline.html +3 -3
  16. package/docs/classes/PanoTagPluginController.html +3 -3
  17. package/docs/classes/Util.BetterTween.html +3 -3
  18. package/docs/classes/Util.FivePointSelector.html +3 -3
  19. package/docs/classes/Util.Interval.html +3 -3
  20. package/docs/classes/Util.Magnifier.html +3 -3
  21. package/docs/classes/Util.PointDomHelper.html +3 -3
  22. package/docs/classes/Util.PointHelper.html +3 -3
  23. package/docs/classes/Util.Rectangle.html +3 -3
  24. package/docs/enums/CameraMovementEffect.html +3 -3
  25. package/docs/enums/ContentType.html +3 -3
  26. package/docs/enums/DIRECTION.html +3 -3
  27. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +3 -3
  28. package/docs/enums/DimensionType.html +3 -3
  29. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +3 -3
  30. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +3 -3
  31. package/docs/enums/PaintBrushTypeEnum.html +3 -3
  32. package/docs/enums/PointType.html +3 -3
  33. package/docs/enums/Rotation.html +3 -3
  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 +3 -3
  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 +3 -3
  60. package/docs/functions/Util.getCoordsFromElement.html +3 -3
  61. package/docs/functions/Util.getFrameTime.html +3 -3
  62. package/docs/functions/Util.getIntersectFromRelativePosition.html +3 -3
  63. package/docs/functions/Util.getRaycasterFromFivePointer.html +3 -3
  64. package/docs/functions/Util.isAbsoluteURL.html +3 -3
  65. package/docs/functions/Util.isModelLike.html +3 -3
  66. package/docs/functions/Util.isNil.html +3 -3
  67. package/docs/functions/Util.isPanoramaLike.html +3 -3
  68. package/docs/functions/Util.nextFrame.html +3 -3
  69. package/docs/functions/Util.notNil.html +3 -3
  70. package/docs/functions/Util.requestAnimationFrameInterval.html +3 -3
  71. package/docs/functions/Util.tweenProgress.html +3 -3
  72. package/docs/functions/Util.uuid.html +3 -3
  73. package/docs/functions/pluginFlag.html +3 -3
  74. package/docs/index.html +4 -4
  75. package/docs/interfaces/AddTagConfig.html +3 -3
  76. package/docs/interfaces/CSS3DRenderPluginEventMap.html +3 -3
  77. package/docs/interfaces/CSS3DRenderPluginState.html +3 -3
  78. package/docs/interfaces/CameraMovementPluginExportType.html +3 -3
  79. package/docs/interfaces/CruisePluginTypes.Config.html +3 -3
  80. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +3 -3
  81. package/docs/interfaces/CruisePluginTypes.EventMap.html +3 -3
  82. package/docs/interfaces/CruisePluginTypes.MoveAction.html +3 -3
  83. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +3 -3
  84. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +3 -3
  85. package/docs/interfaces/CruisePluginTypes.PluginData.html +3 -3
  86. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +3 -3
  87. package/docs/interfaces/CruisePluginTypes.PluginState.html +3 -3
  88. package/docs/interfaces/EventMap.html +3 -3
  89. package/docs/interfaces/FloorplanBounding.html +3 -3
  90. package/docs/interfaces/FloorplanData.html +3 -3
  91. package/docs/interfaces/FloorplanEntrance.html +3 -3
  92. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  93. package/docs/interfaces/FloorplanExtraObject3D.html +3 -3
  94. package/docs/interfaces/FloorplanFloorData.html +3 -3
  95. package/docs/interfaces/FloorplanImagePosition.html +3 -3
  96. package/docs/interfaces/FloorplanObserver.html +3 -3
  97. package/docs/interfaces/FloorplanOutlineItem.html +3 -3
  98. package/docs/interfaces/FloorplanPosition.html +3 -3
  99. package/docs/interfaces/FloorplanRoomItem.html +3 -3
  100. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  101. package/docs/interfaces/FloorplanServerBounding.html +3 -3
  102. package/docs/interfaces/FloorplanServerComputedData.html +3 -3
  103. package/docs/interfaces/FloorplanServerData.html +3 -3
  104. package/docs/interfaces/FloorplanServerDoorItem.html +3 -3
  105. package/docs/interfaces/FloorplanServerDoorPosition.html +3 -3
  106. package/docs/interfaces/FloorplanServerEntrance.html +3 -3
  107. package/docs/interfaces/FloorplanServerFloorData.html +3 -3
  108. package/docs/interfaces/FloorplanServerImagePosition.html +3 -3
  109. package/docs/interfaces/FloorplanServerObserver.html +3 -3
  110. package/docs/interfaces/FloorplanServerOutlineItem.html +3 -3
  111. package/docs/interfaces/FloorplanServerPosition.html +3 -3
  112. package/docs/interfaces/FloorplanServerRoomItem.html +3 -3
  113. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  114. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +3 -3
  115. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +3 -3
  116. package/docs/interfaces/GuideLinePluginType.EventMap.html +3 -3
  117. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +3 -3
  118. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +3 -3
  119. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +3 -3
  120. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +3 -3
  121. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +3 -3
  122. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +3 -3
  123. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +3 -3
  124. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +3 -3
  125. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +3 -3
  126. package/docs/interfaces/GuideLinePluginType.PluginState.html +3 -3
  127. package/docs/interfaces/GuideLinePluginType.Route.html +3 -3
  128. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +3 -3
  129. package/docs/interfaces/HelperOffset.html +3 -3
  130. package/docs/interfaces/ImagePlaneGroup.html +3 -3
  131. package/docs/interfaces/ItemLabelPluginData.html +3 -3
  132. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +3 -3
  133. package/docs/interfaces/ItemLabelPluginParametersType.html +3 -3
  134. package/docs/interfaces/MinMax.html +3 -3
  135. package/docs/interfaces/ModelChassisCompassPluginData.html +3 -3
  136. package/docs/interfaces/ModelChassisCompassPluginExportType.html +3 -3
  137. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +3 -3
  138. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +3 -3
  139. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +3 -3
  140. package/docs/interfaces/ModelItemLabelPluginData.html +3 -3
  141. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +3 -3
  142. package/docs/interfaces/ModelItemLabelPluginParametersType.html +3 -3
  143. package/docs/interfaces/ModelRoomLabelPluginData.html +3 -3
  144. package/docs/interfaces/ModelTVVideoPluginData.html +3 -3
  145. package/docs/interfaces/ModelTVVideoPluginExportType.html +3 -3
  146. package/docs/interfaces/ModelTVVideoPluginParameterType.html +3 -3
  147. package/docs/interfaces/ModelViewPluginExportType.html +3 -3
  148. package/docs/interfaces/Object3DHelperState.html +3 -3
  149. package/docs/interfaces/ObjectHelperControllers.html +3 -3
  150. package/docs/interfaces/PaintBrushAction.html +3 -3
  151. package/docs/interfaces/PaintBrushConfigs.html +3 -3
  152. package/docs/interfaces/PaintBrushState.html +3 -3
  153. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +3 -3
  154. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +3 -3
  155. package/docs/interfaces/PanoMeasureParameterType.html +3 -3
  156. package/docs/interfaces/PanoMeasurePluginLineJson.html +3 -3
  157. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +3 -3
  158. package/docs/interfaces/PanoMeasurePluginPointJson.html +3 -3
  159. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +3 -3
  160. package/docs/interfaces/PanoRulerPluginExportType.html +3 -3
  161. package/docs/interfaces/PanoRulerPluginOptions.html +3 -3
  162. package/docs/interfaces/PanoRulerPluginParameterType.html +3 -3
  163. package/docs/interfaces/PanoRulerProPluginExportType.html +3 -3
  164. package/docs/interfaces/PanoRulerProPluginOptions.html +3 -3
  165. package/docs/interfaces/PanoRulerProPluginParameterType.html +3 -3
  166. package/docs/interfaces/PanoRulerProPluginState.html +3 -3
  167. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +3 -3
  168. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +3 -3
  169. package/docs/interfaces/PanoSpatialTagPluginData.html +3 -3
  170. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +3 -3
  171. package/docs/interfaces/PanoSpatialTagPluginExportType.html +3 -3
  172. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +3 -3
  173. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +3 -3
  174. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +3 -3
  175. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +3 -3
  176. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +3 -3
  177. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +3 -3
  178. package/docs/interfaces/PanoVideoPluginType.PluginData.html +3 -3
  179. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +3 -3
  180. package/docs/interfaces/PanoVideoPluginType.PluginState.html +3 -3
  181. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +3 -3
  182. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +3 -3
  183. package/docs/interfaces/Point.html +3 -3
  184. package/docs/interfaces/Room.html +3 -3
  185. package/docs/interfaces/RoomInfo.html +3 -3
  186. package/docs/interfaces/RoomLabel.html +3 -3
  187. package/docs/interfaces/RoomRules.html +3 -3
  188. package/docs/interfaces/Rooms.html +3 -3
  189. package/docs/interfaces/Scissor.html +3 -3
  190. package/docs/interfaces/State.html +3 -3
  191. package/docs/interfaces/TagCacheInterface.html +3 -3
  192. package/docs/interfaces/TagConfig.html +3 -3
  193. package/docs/interfaces/TagGLTFObjectGroup.html +3 -3
  194. package/docs/interfaces/TagIconUrl.html +3 -3
  195. package/docs/interfaces/TagObjectGroup.html +3 -3
  196. package/docs/interfaces/TagStyle.html +3 -3
  197. package/docs/interfaces/Tags.html +3 -3
  198. package/docs/interfaces/TemporaryState.html +3 -3
  199. package/docs/interfaces/Util.MagnifierParameter.html +3 -3
  200. package/docs/interfaces/Util.MouseGroupParameter.html +3 -3
  201. package/docs/modules/CruisePluginTypes.html +3 -3
  202. package/docs/modules/GuideLineItem.html +3 -3
  203. package/docs/modules/GuideLineModeItem.html +3 -3
  204. package/docs/modules/GuideLinePluginType.html +3 -3
  205. package/docs/modules/PanoVideoPluginType.html +3 -3
  206. package/docs/modules/Util.html +3 -3
  207. package/docs/modules.html +4 -4
  208. package/docs/types/ArrayPosition.html +3 -3
  209. package/docs/types/AudioAppearance.html +3 -3
  210. package/docs/types/AudioTagTypeConfigKey.html +3 -3
  211. package/docs/types/CSS3DRenderExportType.html +3 -3
  212. package/docs/types/CSS3DRenderPluginExportType.html +3 -3
  213. package/docs/types/CSS3DRenderPluginParameterType.html +3 -3
  214. package/docs/types/ClassFunctionParameters.html +3 -3
  215. package/docs/types/Color.html +3 -3
  216. package/docs/types/ContentTypeConfigKey.html +3 -3
  217. package/docs/types/ContentTypeConfigKeySplit.html +3 -3
  218. package/docs/types/ContentTypeMap.html +3 -3
  219. package/docs/types/Create3DDomContainerReturnType.html +3 -3
  220. package/docs/types/Create3DElementReturnType.html +3 -3
  221. package/docs/types/CruisePluginExportType.html +3 -3
  222. package/docs/types/CruisePluginTypes.CruiseData.html +3 -3
  223. package/docs/types/CruisePluginTypes.MoveEffect.html +3 -3
  224. package/docs/types/DeprecatedMediaPlaneProperty.html +3 -3
  225. package/docs/types/DeprecatedTagProperty.html +3 -3
  226. package/docs/types/Direction-1.html +3 -3
  227. package/docs/types/Direction4.html +3 -3
  228. package/docs/types/ElementRenderer.html +3 -3
  229. package/docs/types/FloorplanRuleLabels.html +3 -3
  230. package/docs/types/FloorplanServerRuleLabels.html +3 -3
  231. package/docs/types/GuideLinePluginExportType.html +3 -3
  232. package/docs/types/GuideLinePluginType.GuideLineItem.html +3 -3
  233. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +3 -3
  234. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +3 -3
  235. package/docs/types/GuideLinePluginType.GuideLineStyle.html +3 -3
  236. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +3 -3
  237. package/docs/types/GuideLinePluginType.PathItem.html +3 -3
  238. package/docs/types/GuideLinePluginType.PluginData.html +3 -3
  239. package/docs/types/HelperEventMap.html +3 -3
  240. package/docs/types/LoadTagConfig.html +3 -3
  241. package/docs/types/MapviewFloorplanPluginParameterType.html +3 -3
  242. package/docs/types/MapviewFloorplanPluginReturnType.html +3 -3
  243. package/docs/types/MediaData.html +3 -3
  244. package/docs/types/MediaStore.html +3 -3
  245. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +3 -3
  246. package/docs/types/ModelFloorplanPluginParameterType.html +3 -3
  247. package/docs/types/ModelFloorplanPluginReturnType.html +3 -3
  248. package/docs/types/ModelRoomLabelPluginParameters.html +3 -3
  249. package/docs/types/ModelRoomLabelPluginReturnType.html +3 -3
  250. package/docs/types/MoveArgs.html +3 -3
  251. package/docs/types/MoveOpts.html +3 -3
  252. package/docs/types/Object3DHelperEventMap.html +3 -3
  253. package/docs/types/ObjectFit.html +3 -3
  254. package/docs/types/PaintBrushEventMap.html +3 -3
  255. package/docs/types/PanoCompassPluginData.html +3 -3
  256. package/docs/types/PanoCompassPluginExportType.html +3 -3
  257. package/docs/types/PanoCompassPluginParameterType.html +3 -3
  258. package/docs/types/PanoFloorplanRadarPluginParameterType.html +3 -3
  259. package/docs/types/PanoFloorplanRadarPluginReturnType.html +3 -3
  260. package/docs/types/PanoIndex.html +3 -3
  261. package/docs/types/PanoMeasurePluginEvent.html +3 -3
  262. package/docs/types/PanoMeasureReturnType.html +3 -3
  263. package/docs/types/PanoSpatialTagPluginId.html +3 -3
  264. package/docs/types/PanoTagPluginExportInterface.html +3 -3
  265. package/docs/types/PanoTagPluginParamsInterface.html +3 -3
  266. package/docs/types/PanoVideoPluginParameterType.html +3 -3
  267. package/docs/types/PanoVideoPluginReturnType.html +3 -3
  268. package/docs/types/PartialObjectDeep.html +3 -3
  269. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +3 -3
  270. package/docs/types/PlaneTag.html +3 -3
  271. package/docs/types/Point2DTag.html +3 -3
  272. package/docs/types/Point3DTag.html +3 -3
  273. package/docs/types/PointTag.html +3 -3
  274. package/docs/types/PointTagInstance.html +3 -3
  275. package/docs/types/Position.html +3 -3
  276. package/docs/types/RotateArgs.html +3 -3
  277. package/docs/types/RotateOpts.html +3 -3
  278. package/docs/types/RuleLabelsKey.html +3 -3
  279. package/docs/types/RuleLabelsValue.html +3 -3
  280. package/docs/types/StickType.html +3 -3
  281. package/docs/types/Tag.html +3 -3
  282. package/docs/types/Tag2D.html +3 -3
  283. package/docs/types/Tag3D.html +3 -3
  284. package/docs/types/TagContentType.html +3 -3
  285. package/docs/types/TagDimensionType.html +3 -3
  286. package/docs/types/TagElement.html +3 -3
  287. package/docs/types/TagEvents.html +3 -3
  288. package/docs/types/TagGLTFObject.html +3 -3
  289. package/docs/types/TagHooks.html +3 -3
  290. package/docs/types/TagId.html +3 -3
  291. package/docs/types/TagInstance.html +3 -3
  292. package/docs/types/TagPointType.html +3 -3
  293. package/docs/types/TagRendererMap.html +3 -3
  294. package/docs/types/TopviewFloorplanPluginParameterType.html +3 -3
  295. package/docs/types/TopviewFloorplanPluginReturnType.html +3 -3
  296. package/docs/types/WorkCode.html +3 -3
  297. package/docs/variables/FLOOR_TYPE_MAP.html +3 -3
  298. package/docs/variables/PLUGIN.html +3 -3
  299. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +3 -3
  300. package/docs/variables/ROOM_TYPE_MAP.html +3 -3
  301. package/docs/variables/itemLabelPluginServerParams.html +3 -3
  302. package/docs/variables/modelItemLabelPluginServerParams.html +3 -3
  303. package/docs/variables/modelRoomLabelPluginServerParams.html +3 -3
  304. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +56 -56
  305. package/libs/PanoTagPlugin/Components/TagItem.js +111 -111
  306. package/libs/base/BasePlugin.js +1 -1
  307. package/libs/shared-utils/Object3DHelper/Helper/HTML/tipsDom.js +1 -1
  308. package/libs/shared-utils/logger.js +1 -1
  309. package/package.json +1 -1
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(ee,ve){typeof exports=="object"&&typeof module!="undefined"?ve(exports,require("@realsee/five"),require("three"),require("three/examples/jsm/renderers/CSS3DRenderer"),require("hammerjs"),require("@realsee/five/line"),require("three/examples/jsm/loaders/FBXLoader"),require("animejs"),require("@realsee/five/gltf-loader")):typeof define=="function"&&define.amd?define(["exports","@realsee/five","three","three/examples/jsm/renderers/CSS3DRenderer","hammerjs","@realsee/five/line","three/examples/jsm/loaders/FBXLoader","animejs","@realsee/five/gltf-loader"],ve):(ee=typeof globalThis!="undefined"?globalThis:ee||self,ve(ee.dnalogel={},ee.FiveSDK,ee.THREE,ee.CSS3DRenderer,ee.Hammer,ee.Line,ee.FBXLoader,ee.anime,ee.GLTFLoader))})(this,function(ee,ve,O,Vn,Kt,lo,co,_n,Gt){"use strict";var $C=Object.defineProperty,eI=Object.defineProperties;var tI=Object.getOwnPropertyDescriptors;var Au=Object.getOwnPropertySymbols;var nI=Object.prototype.hasOwnProperty,iI=Object.prototype.propertyIsEnumerable;var Ta=(ee,ve,O)=>ve in ee?$C(ee,ve,{enumerable:!0,configurable:!0,writable:!0,value:O}):ee[ve]=O,N=(ee,ve)=>{for(var O in ve||(ve={}))nI.call(ve,O)&&Ta(ee,O,ve[O]);if(Au)for(var O of Au(ve))iI.call(ve,O)&&Ta(ee,O,ve[O]);return ee},Pe=(ee,ve)=>eI(ee,tI(ve));var f=(ee,ve,O)=>(Ta(ee,typeof ve!="symbol"?ve+"":ve,O),O);var Y=(ee,ve,O)=>new Promise((Vn,Kt)=>{var lo=Gt=>{try{_n(O.next(Gt))}catch(Ii){Kt(Ii)}},co=Gt=>{try{_n(O.throw(Gt))}catch(Ii){Kt(Ii)}},_n=Gt=>Gt.done?Vn(Gt.value):Promise.resolve(Gt.value).then(lo,co);_n((O=O.apply(ee,ve)).next())});function Ii(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 E=Ii(O);function bu(){console.info("%c %c@realsee/dnalogel %cv2.20.0-dev.11",["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 yu(){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 za(){}const ja=()=>Promise.resolve(),Va={__queue:Promise.resolve()};function wu(i=ja){Va.__queue=Va.__queue.then(i).catch(ja)}function ho(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 Ms(i,t,e){const{x:n,y:o}=i,s=n*t,r=o*e;return{x:s,y:r}}function uo(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 Pu(i,t,e=za){new Promise(n=>{setTimeout(()=>{e(),n(!0)},t*i)})}const Cu=window,_a=window.requestAnimationFrame||Cu.webkitRequestAnimationFrame||(i=>setTimeout(i,16));function fo(i,t=0){t<=0?_a(i):_a(()=>fo(i,t-1))}var Ct=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-Ct.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?Ct.Bounce.In(i*2)*.5:Ct.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}}}}),On=function(){return performance.now()},Oa=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=On()),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}(),gn={Linear:function(i,t){var e=i.length-1,n=e*t,o=Math.floor(n),s=gn.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=gn.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=gn.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=gn.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}}},Ss=function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i}(),Ls=new Oa,mo=function(){function i(t,e){e===void 0&&(e=Ls),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=Ct.Linear.None,this._interpolationFunction=gn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Ss.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=On()),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=On()),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=On()),!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=Ls),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=Ct.Linear.None),this._easingFunction=t,this},i.prototype.interpolation=function(t){return t===void 0&&(t=gn.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=On()),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}(),Iu="20.0.3",Eu=Ss.nextId,Tt=Ls,ku=Tt.getAll.bind(Tt),xu=Tt.removeAll.bind(Tt),Du=Tt.add.bind(Tt),Ba=Tt.remove.bind(Tt),Mu=Tt.update.bind(Tt),Qa={Easing:Ct,Group:Oa,Interpolation:gn,now:On,Sequence:Ss,nextId:Eu,Tween:mo,VERSION:Iu,getAll:ku,removeAll:xu,add:Du,remove:Ba,update:Mu};function Su(i,t,e,n=Ct.Linear.None){const o=new mo(i).to(t,e).easing(n).start();function s(r){o.update(r)&&requestAnimationFrame(s)}return requestAnimationFrame(s),o}var Ft=(i=>(i.Drawline="Drawline",i.Undo="Undo",i.Exit="Exit",i))(Ft||{});const Ei=Symbol("$$PAINT_BRUSH_EVENT$$");function po(i){return i[Ei]||(i[Ei]={}),i[Ei]}function Lu(i){i[Ei]||delete i[Ei]}let Tu=class{hasListener(t){const e=po(this);return e&&e[t]&&e[t].length>0}on(t,e,n){const o=po(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){Lu(this);return}const n=po(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=po(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 lt(){return($t()+$t()+"-"+$t()+"-4"+$t().substr(0,3)+"-"+$t()+"-"+$t()+$t()+$t()).toLowerCase()}const zu=`
1
+ (function(ee,ve){typeof exports=="object"&&typeof module!="undefined"?ve(exports,require("@realsee/five"),require("three"),require("three/examples/jsm/renderers/CSS3DRenderer"),require("hammerjs"),require("@realsee/five/line"),require("three/examples/jsm/loaders/FBXLoader"),require("animejs"),require("@realsee/five/gltf-loader")):typeof define=="function"&&define.amd?define(["exports","@realsee/five","three","three/examples/jsm/renderers/CSS3DRenderer","hammerjs","@realsee/five/line","three/examples/jsm/loaders/FBXLoader","animejs","@realsee/five/gltf-loader"],ve):(ee=typeof globalThis!="undefined"?globalThis:ee||self,ve(ee.dnalogel={},ee.FiveSDK,ee.THREE,ee.CSS3DRenderer,ee.Hammer,ee.Line,ee.FBXLoader,ee.anime,ee.GLTFLoader))})(this,function(ee,ve,O,Vn,Kt,lo,co,_n,Gt){"use strict";var $C=Object.defineProperty,eI=Object.defineProperties;var tI=Object.getOwnPropertyDescriptors;var Au=Object.getOwnPropertySymbols;var nI=Object.prototype.hasOwnProperty,iI=Object.prototype.propertyIsEnumerable;var Ta=(ee,ve,O)=>ve in ee?$C(ee,ve,{enumerable:!0,configurable:!0,writable:!0,value:O}):ee[ve]=O,N=(ee,ve)=>{for(var O in ve||(ve={}))nI.call(ve,O)&&Ta(ee,O,ve[O]);if(Au)for(var O of Au(ve))iI.call(ve,O)&&Ta(ee,O,ve[O]);return ee},Pe=(ee,ve)=>eI(ee,tI(ve));var f=(ee,ve,O)=>(Ta(ee,typeof ve!="symbol"?ve+"":ve,O),O);var Y=(ee,ve,O)=>new Promise((Vn,Kt)=>{var lo=Gt=>{try{_n(O.next(Gt))}catch(Ii){Kt(Ii)}},co=Gt=>{try{_n(O.throw(Gt))}catch(Ii){Kt(Ii)}},_n=Gt=>Gt.done?Vn(Gt.value):Promise.resolve(Gt.value).then(lo,co);_n((O=O.apply(ee,ve)).next())});function Ii(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 E=Ii(O);function bu(){console.info("%c %c@realsee/dnalogel %cv2.20.0-dev.13",["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 yu(){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 za(){}const ja=()=>Promise.resolve(),Va={__queue:Promise.resolve()};function wu(i=ja){Va.__queue=Va.__queue.then(i).catch(ja)}function ho(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 Ms(i,t,e){const{x:n,y:o}=i,s=n*t,r=o*e;return{x:s,y:r}}function uo(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 Pu(i,t,e=za){new Promise(n=>{setTimeout(()=>{e(),n(!0)},t*i)})}const Cu=window,_a=window.requestAnimationFrame||Cu.webkitRequestAnimationFrame||(i=>setTimeout(i,16));function fo(i,t=0){t<=0?_a(i):_a(()=>fo(i,t-1))}var Ct=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-Ct.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?Ct.Bounce.In(i*2)*.5:Ct.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}}}}),On=function(){return performance.now()},Oa=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=On()),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}(),gn={Linear:function(i,t){var e=i.length-1,n=e*t,o=Math.floor(n),s=gn.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=gn.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=gn.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=gn.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}}},Ss=function(){function i(){}return i.nextId=function(){return i._nextId++},i._nextId=0,i}(),Ls=new Oa,mo=function(){function i(t,e){e===void 0&&(e=Ls),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=Ct.Linear.None,this._interpolationFunction=gn.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Ss.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=On()),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=On()),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=On()),!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=Ls),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=Ct.Linear.None),this._easingFunction=t,this},i.prototype.interpolation=function(t){return t===void 0&&(t=gn.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=On()),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}(),Iu="20.0.3",Eu=Ss.nextId,Tt=Ls,ku=Tt.getAll.bind(Tt),xu=Tt.removeAll.bind(Tt),Du=Tt.add.bind(Tt),Ba=Tt.remove.bind(Tt),Mu=Tt.update.bind(Tt),Qa={Easing:Ct,Group:Oa,Interpolation:gn,now:On,Sequence:Ss,nextId:Eu,Tween:mo,VERSION:Iu,getAll:ku,removeAll:xu,add:Du,remove:Ba,update:Mu};function Su(i,t,e,n=Ct.Linear.None){const o=new mo(i).to(t,e).easing(n).start();function s(r){o.update(r)&&requestAnimationFrame(s)}return requestAnimationFrame(s),o}var Ft=(i=>(i.Drawline="Drawline",i.Undo="Undo",i.Exit="Exit",i))(Ft||{});const Ei=Symbol("$$PAINT_BRUSH_EVENT$$");function po(i){return i[Ei]||(i[Ei]={}),i[Ei]}function Lu(i){i[Ei]||delete i[Ei]}let Tu=class{hasListener(t){const e=po(this);return e&&e[t]&&e[t].length>0}on(t,e,n){const o=po(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){Lu(this);return}const n=po(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=po(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 lt(){return($t()+$t()+"-"+$t()+"-4"+$t().substr(0,3)+"-"+$t()+"-"+$t()+$t()+$t()).toLowerCase()}const zu=`
2
2
  <style type="text/css">
3
3
 
4
4
  #_gl_paintBrush {
@@ -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 Tm extends de{constructor(t){super(),ce(this,t,Lm,Sm,le,{content:0},Mm)}}function zm(i){me(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function jm(i){let t,e;return t=new Dm({props:{url:i[1].url}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Vm(i){let t,e;return t=new Tm({props:{content:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function _m(i){let t,e,n,o;const s=[Vm,jm],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=V("div"),n&&n.c(),w(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){_(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&&(he(),L(r[d],1,1,()=>{r[d]=null}),ue()),~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&&j(t),~e&&r[e].d()}}}function Om(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 zl extends de{constructor(t){super(),ce(this,t,Om,_m,le,{floorIndex:2,floorplanData:3},zm)}}function Bm(i){me(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 Qm(i){let t,e=i[8].outerHTML+"",n;return{c(){t=new ko(!1),n=Ee(),t.a=n},m(o,s){t.m(e,o,s),_(o,n,s)},p(o,s){s&256&&e!==(e=o[8].outerHTML+"")&&t.p(e)},d(o){o&&j(n),o&&t.d()}}}function Rm(i){let t,e,n=i[1]&&jl(i),o=i[0]&&Vl(i);return{c(){n&&n.c(),t=se(),o&&o.c(),e=Ee()},m(s,r){n&&n.m(s,r),_(s,t,r),o&&o.m(s,r),_(s,e,r)},p(s,r){s[1]?n?n.p(s,r):(n=jl(s),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),s[0]?o?o.p(s,r):(o=Vl(s),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(s){n&&n.d(s),s&&j(t),o&&o.d(s),s&&j(e)}}}function jl(i){let t,e=i[2].name+"",n;return{c(){t=V("span"),n=Be(e),w(t,"class","floorplan-plugin__room-name")},m(o,s){_(o,t,s),B(t,n)},p(o,s){s&4&&e!==(e=o[2].name+"")&&Re(n,e)},d(o){o&&j(t)}}}function Vl(i){let t,e;return{c(){t=V("span"),e=Be(i[7]),w(t,"class","floorplan-plugin__room-size svelte-12pzct5")},m(n,o){_(n,t,o),B(t,e)},p(n,o){o&128&&Re(e,n[7])},d(n){n&&j(t)}}}function Gm(i){let t,e,n;function o(a,l){if(a[3]===void 0)return Rm;if(a[8])return Qm}let s=o(i),r=s&&s(i);return{c(){t=V("div"),r&&r.c(),w(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),z(t,"left",i[9]),z(t,"top",i[10]),z(t,"font-size",i[11]),z(t,"opacity",i[6]?"1":"0")},m(a,l){_(a,t,l),r&&r.m(t,null),e||(n=[Wt(ei.call(null,t)),ke(t,"clientWidth",i[19]),ke(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&&z(t,"opacity",a[6]?"1":"0")},i:K,o:K,d(a){a&&j(t),r&&r.d(),e=!1,et(n)}}}function Fm(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 Wm(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(R,F){if(F.width===0||F.height===0)return()=>!1;const Q=R.path.map(({x:Ce,y:Ae})=>[Ce,Ae]),W=R.roomLabel.position,{x:q,y:U}=W,{width:Z,height:ae}=F,oe=Z/2,ye=ae/2;return function(Ae){const Ve=q*Ae,be=U*Ae,Ne=Q.map(([we,Te])=>[we*Ae,Te*Ae]);return[[Ve+oe,be-ye],[Ve-oe,be-ye],[Ve-oe,be+ye],[Ve+oe,be+ye]].every(we=>Fm(we,Ne))}}const b=document.body.clientWidth,y=document.body.clientHeight,C=h.roomLabel,k=C.positionInImage.x*100+"%",S=C.positionInImage.y*100+"%",I=(b<500||y<500?10:14)+"px";let T=0,D=0,X=!1;u.subscribe(function(F){e(16,X=!!F&&F.id===h.id)});const J=R=>{e(4,T=R.detail)},G=R=>{e(5,D=R.detail)};return i.$$set=R=>{"pxmm"in R&&e(12,l=R.pxmm),"roomAreaEnable"in R&&e(0,c=R.roomAreaEnable),"roomNameEnable"in R&&e(1,d=R.roomNameEnable),"room"in R&&e(2,h=R.room),"hoveredRoom"in R&&e(13,u=R.hoveredRoom),"getRoomAreaText"in R&&e(14,m=R.getRoomAreaText),"getLabelElement"in R&&e(3,v=R.getLabelElement),"adaptiveRoomLabelVisibleEnable"in R&&e(15,g=R.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:T,height:D}),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,T,D,a,o,n,k,S,I,l,u,m,g,X,r,s,J,G]}class Nm extends de{constructor(t){super(),ce(this,t,Wm,Gm,le,{pxmm:12,roomAreaEnable:0,roomNameEnable:1,room:2,hoveredRoom:13,getRoomAreaText:14,getLabelElement:3,adaptiveRoomLabelVisibleEnable:15},Bm)}}function Hm(i){me(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 _l(i,t,e){const n=i.slice();return n[12]=t[e],n}function Ol(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=_l(i,a,c),h=l(d);n.set(h,e[c]=Bl(h,d))}return{c(){t=V("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){_(c,t,d);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);o=!0,s||(r=[Wt(ei.call(null,t)),ke(t,"clientWidth",i[11])],s=!0)},p(c,d){d&447&&(a=c[8],he(),e=xt(e,d,l,1,c,a,n,t,an,Bl,null,_l),ue())},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&&j(t);for(let d=0;d<e.length;d+=1)e[d].d();s=!1,et(r)}}}function Bl(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=qe(r,s[a]);return n=new Nm({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){_(a,e,l),te(n,a,l),o=!0},p(a,l){t=a;const c=l&447?nt(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&&j(e),ne(n,a)}}}function Xm(i){let t,e,n=i[8]&&Ol(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[8]?n?(n.p(o,s),s&256&&x(n,1)):(n=Ol(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function Ym(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 Um extends de{constructor(t){super(),ce(this,t,Ym,Xm,le,{floorIndex:9,roomAreaEnable:0,roomNameEnable:1,floorplanData:10,hoveredRoom:2,getRoomAreaText:3,getLabelElement:4,adaptiveRoomLabelVisibleEnable:5},Hm)}}function qm(i){me(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 Ql(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function Rl(i,t,e){const n=i.slice();return n[14]=t[e],n}function Gl(i){let t;return{c(){t=V("div"),w(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),z(t,"left",i[14].left*100+"%"),z(t,"bottom",i[14].bottom*100+"%")},m(e,n){_(e,t,n)},p:K,d(e){e&&j(t)}}}function Fl(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=V("div"),n=V("div"),s=Be(o),r=se(),w(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),$(n,"is-row",t[2]),w(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),z(e,"left",t[11].left*100+"%"),z(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){_(a,e,l),B(e,n),B(n,s),B(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&Re(s,o)},d(a){a&&j(e)}}}function Jm(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]=Gl(Rl(i,d,v));let u=i[4];const m=v=>v[13];for(let v=0;v<u.length;v+=1){let g=Ql(i,u,v),A=m(g);l.set(A,a[v]=Fl(A,g))}return{c(){t=V("div"),e=V("div"),n=se(),o=V("div");for(let v=0;v<h.length;v+=1)h[v].c();s=se(),r=V("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]),z(t,"width",i[2]?"100%":1/16+"rem"),z(t,"height",i[2]?1/16+"rem":"100%")},m(v,g){_(v,t,g),B(t,e),B(t,n),B(t,o);for(let A=0;A<h.length;A+=1)h[A]&&h[A].m(o,null);B(t,s),B(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=Rl(v,d,A);h[A]?h[A].p(b,g):(h[A]=Gl(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=xt(a,g,m,1,v,u,l,r,Us,Fl,null,Ql)),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&&j(t),Nt(h,v);for(let g=0;g<a.length;g+=1)a[g].d()}}}const oi=1e3,si=180;function Zm(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-(oi-si)*2,c=s.max.y-s.min.y-(oi-si)*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-oi+si)/l:0,A=a?0:(v-s.min.y-oi+si)/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,C=a?(y-s.min.x-oi+si)/l:0,k=a?0:(y-s.min.y-oi+si)/c;return{left:C,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 Km extends de{constructor(t){super(),ce(this,t,Zm,Jm,le,{type:0,data:5,bounding:6,getRuleDistanceText:1},qm)}}function $m(i){me(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function Wl(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function Nl(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=qe(r,s[a]);return n=new Km({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){_(a,e,l),te(n,a,l),o=!0},p(a,l){t=a;const c=l&19?nt(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&&j(e),ne(n,a)}}}function ep(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=Wl(i,s,a),c=r(l);n.set(c,e[a]=Nl(c,l))}return{c(){t=V("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),z(t,"width",i[3]),z(t,"height",i[2])},m(a,l){_(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],he(),e=xt(e,l,r,1,a,s,n,t,an,Nl,null,Wl),ue()),l&8&&z(t,"width",a[3]),l&4&&z(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&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const Hl=1e3,Xl=180;function tp(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-(Hl-Xl)*2),i.$$.dirty&2&&e(8,d=n.max.y-n.min.y-(Hl-Xl)*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 np extends de{constructor(t){super(),ce(this,t,tp,ep,le,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},$m)}}function Qo(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 Yl({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function ip(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 op(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 sp(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function rp(i){let t;return{c(){t=ze("path"),w(t,"d",i[0]),w(t,"fill","#2F313A")},m(e,n){_(e,t,n)},p(e,[n]){n&1&&w(t,"d",e[0])},i:K,o:K,d(e){e&&j(t)}}}function ap(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=Qo(o,{needZ:!0}))},[n,o]}class lp extends de{constructor(t){super(),ce(this,t,ap,rp,le,{path:1})}}function cp(i){let t,e,n,o,s,r;return{c(){t=ze("defs"),e=ze("pattern"),n=ze("rect"),o=ze("path"),s=se(),r=ze("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){_(a,t,l),B(t,e),B(e,n),B(e,o),_(a,s,l),_(a,r,l)},p(a,[l]){l&1&&w(r,"d",a[0])},i:K,o:K,d(a){a&&j(t),a&&j(s),a&&j(r)}}}const Ks=6;function dp(i,t,e){let n,{path:o}=t;const s=Ks*2,r=`M0 ${Ks} h ${s} M${Ks} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=Qo(o,{needZ:!0}))},[n,s,r,o]}class hp extends de{constructor(t){super(),ce(this,t,dp,cp,le,{path:3})}}function up(i){let t,e,n,o,s,r,a,l,c,d,h;return{c(){t=ze("defs"),e=ze("pattern"),n=ze("rect"),o=ze("pattern"),s=ze("rect"),r=se(),a=ze("path"),l=se(),c=ze("path"),d=se(),h=ze("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){_(u,t,m),B(t,e),B(e,n),B(t,o),B(o,s),_(u,r,m),_(u,a,m),_(u,l,m),_(u,c,m),_(u,d,m),_(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&&j(t),u&&j(r),u&&j(a),u&&j(l),u&&j(c),u&&j(d),u&&j(h)}}}function fp(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=Qo(o,{needZ:!0}))},[n,o]}class mp extends de{constructor(t){super(),ce(this,t,fp,up,le,{path:1})}}function pp(i){me(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 Ul(i,t,e){const n=i.slice();return n[5]=t[e],n}function gp(i){let t,e;return t=new hp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function vp(i){let t,e;return t=new mp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Ap(i){let t,e;return t=new lp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function ql(i){let t,e,n,o;const s=[Ap,vp,gp],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=ze("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){_(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):(he(),L(r[d],1,1,()=>{r[d]=null}),ue(),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&&j(t),r[e].d()}}}function bp(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=ql(Ul(i,n,r));const s=r=>L(o[r],1,1,()=>{o[r]=null});return{c(){t=V("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){_(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=Ul(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=ql(c),o[l].c(),x(o[l],1),o[l].m(t,null))}for(he(),l=n.length;l<o.length;l+=1)s(l);ue()}},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&&j(t),Nt(o,r)}}}function yp(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=>Pe(N({},l),{path:l.path.map(c=>Yl(c,s.bounding))})))},[n,r,a,o,s]}class wp extends de{constructor(t){super(),ce(this,t,yp,bp,le,{floorIndex:3,floorplanData:4},pp)}}function Pp(i){me(i,"svelte-qq2273","path.svelte-qq2273{--opacity:0;opacity:var(--opacity)}path.svelte-qq2273:hover{opacity:calc(var(--opacity) + 0.1)}")}function Cp(i){let t,e,n,o;return{c(){t=ze("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){_(s,t,r),n||(o=[ke(t,"mouseenter",i[3]),ke(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&&j(t),n=!1,et(o)}}}function Ip(i,t,e){let n,o,{room:s}=t,{floorIndex:r}=t,{floorplanData:a}=t,{hoveredRoom:l}=t,{highlightData:c}=t;function d(){l.set(s)}function h(){l.set(void 0)}const{bounding:u}=a,m=Qo(s.path,{needZ:!0,format:v=>Yl(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),"hoveredRoom"in v&&e(7,l=v.hoveredRoom),"highlightData"in v&&e(8,c=v.highlightData)},i.$$.update=()=>{i.$$.dirty&259&&e(9,n=c[`${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 Ep extends de{constructor(t){super(),ce(this,t,Ip,Cp,le,{room:0,floorIndex:1,floorplanData:6,hoveredRoom:7,highlightData:8},Pp)}}function kp(i){me(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 Jl(i,t,e){const n=i.slice();return n[6]=t[e],n}function Zl(i,t){let e,n,o;const s=[{room:t[6],floorplanData:t[1],hoveredRoom:t[2],floorIndex:t[0],highlightData:t[3]}];let r={};for(let a=0;a<s.length;a+=1)r=qe(r,s[a]);return n=new Ep({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){_(a,e,l),te(n,a,l),o=!0},p(a,l){t=a;const c=l&15?nt(s,[{room:t[6],floorplanData:t[1],hoveredRoom:t[2],floorIndex:t[0],highlightData:t[3]}]):{};n.$set(c)},i(a){o||(x(n.$$.fragment,a),o=!0)},o(a){L(n.$$.fragment,a),o=!1},d(a){a&&j(e),ne(n,a)}}}function xp(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=Jl(i,r,l),d=a(c);o.set(d,n[l]=Zl(d,c))}return{c(){t=V("div"),e=ze("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){_(l,t,c),B(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,he(),n=xt(n,c,a,1,l,r,o,e,an,Zl,null,Jl),ue())},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&&j(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function Dp(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t,{highlightData: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),"hoveredRoom"in c&&e(2,s=c.hoveredRoom),"highlightData"in c&&e(3,r=c.highlightData)},[n,o,s,r,a,l]}class Kl extends de{constructor(t){super(),ce(this,t,Dp,xp,le,{floorIndex:0,floorplanData:1,hoveredRoom:2,highlightData:3},kp)}}function Mp(i){me(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 $l(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=qe(o,n[s]);return t=new Kl({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&24834?nt(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){ne(t,s)}}}function ec(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=qe(o,n[s]);return t=new Um({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&22370?nt(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){ne(t,s)}}}function tc(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=qe(o,n[s]);return t=new np({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&2306?nt(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){ne(t,s)}}}function Sp(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=qe(h,d[b]);e=new wp({props:h});let u=(i[2]||i[3])&&$l(i);const m=[{floorplanData:i[8],floorIndex:i[1]}];let v={};for(let b=0;b<m.length;b+=1)v=qe(v,m[b]);s=new zl({props:v});let g=i[4]&&ec(i),A=i[7]&&tc(i);return{c(){t=V("div"),ie(e.$$.fragment),n=se(),u&&u.c(),o=se(),ie(s.$$.fragment),r=se(),g&&g.c(),a=se(),A&&A.c(),w(t,"class",l=Oe(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(b,y){_(b,t,y),te(e,t,null),B(t,n),u&&u.m(t,null),B(t,o),te(s,t,null),B(t,r),g&&g.m(t,null),B(t,a),A&&A.m(t,null),c=!0},p(b,[y]){const C=y&258?nt(d,[{floorIndex:b[1],floorplanData:b[8]}]):{};e.$set(C),b[2]||b[3]?u?(u.p(b,y),y&12&&x(u,1)):(u=$l(b),u.c(),x(u,1),u.m(t,o)):u&&(he(),L(u,1,1,()=>{u=null}),ue());const k=y&258?nt(m,[{floorplanData:b[8],floorIndex:b[1]}]):{};s.$set(k),b[4]?g?(g.p(b,y),y&16&&x(g,1)):(g=ec(b),g.c(),x(g,1),g.m(t,a)):g&&(he(),L(g,1,1,()=>{g=null}),ue()),b[7]?A?(A.p(b,y),y&128&&x(A,1)):(A=tc(b),A.c(),x(A,1),A.m(t,null)):A&&(he(),L(A,1,1,()=>{A=null}),ue()),(!c||y&1&&l!==(l=Oe(`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&&j(t),ne(e),u&&u.d(),ne(s),g&&g.d(),A&&A.d()}}}function Lp(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=Zs(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 Tp=class extends de{constructor(t){super(),ce(this,t,Lp,Sp,le,{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},Mp)}};function zp(i){me(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function nc(i,t,e){const n=i.slice();return n[21]=t[e],n}function ic(i){let t,e,n,o,s,r=i[13].floorDatas,a=[];for(let h=0;h<r.length;h+=1)a[h]=oc(nc(i,r,h));const l=h=>L(a[h],1,1,()=>{a[h]=null});let c=i[5]&&sc(i),d=i[8]&&rc(i);return{c(){t=V("div");for(let h=0;h<a.length;h+=1)a[h].c();e=se(),c&&c.c(),n=se(),d&&d.c(),w(t,"class","floorplan-main svelte-86bqav")},m(h,u){_(h,t,u);for(let m=0;m<a.length;m+=1)a[m]&&a[m].m(t,null);B(t,e),c&&c.m(t,null),B(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=nc(i,r,m);a[m]?(a[m].p(v,u),x(a[m],1)):(a[m]=oc(v),a[m].c(),x(a[m],1),a[m].m(t,e))}for(he(),m=r.length;m<a.length;m+=1)l(m);ue()}i[5]?c?(c.p(i,u),u&32&&x(c,1)):(c=sc(i),c.c(),x(c,1),c.m(t,n)):c&&(he(),L(c,1,1,()=>{c=null}),ue()),i[8]?d?(d.p(i,u),u&256&&x(d,1)):(d=rc(i),d.c(),x(d,1),d.m(t,null)):d&&(he(),L(d,1,1,()=>{d=null}),ue())},i(h){if(!s){for(let u=0;u<r.length;u+=1)x(a[u]);x(c),x(d),o||tt(()=>{o=An(t,bn,{duration:i[0],easing:tn}),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&&j(t),Nt(a,h),c&&c.d(),d&&d.d()}}}function oc(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=qe(o,n[s]);return t=new Tp({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&2047696?nt(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){ne(t,s)}}}function sc(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=qe(o,n[s]);return t=new vm({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&57352?nt(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){ne(t,s)}}}function rc(i){let t,e;return t=new Im({props:{floorplanData:i[13],northDesc:i[2]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function jp(i){let t,e,n=i[1]&&ic(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=ic(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function Vp(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:C}=t,{getLabelElement:k}=t,{getRuleDistanceText:S}=t,{adaptiveRoomLabelVisibleEnable:I}=t,{highlightData:T}=t;return i.$$set=D=>{"duration"in D&&e(0,n=D.duration),"visible"in D&&e(1,o=D.visible),"northDesc"in D&&e(2,s=D.northDesc),"panoIndex"in D&&e(3,r=D.panoIndex),"floorIndex"in D&&e(4,a=D.floorIndex),"cameraEnable"in D&&e(5,l=D.cameraEnable),"hoverEnable"in D&&e(6,c=D.hoverEnable),"highlightEnable"in D&&e(7,d=D.highlightEnable),"compassEnable"in D&&e(8,h=D.compassEnable),"roomLabelsEnable"in D&&e(9,u=D.roomLabelsEnable),"roomAreaEnable"in D&&e(10,m=D.roomAreaEnable),"roomNameEnable"in D&&e(11,v=D.roomNameEnable),"ruleLabelsEnable"in D&&e(12,g=D.ruleLabelsEnable),"floorplanData"in D&&e(13,A=D.floorplanData),"lastPanoramaLongitude"in D&&e(14,b=D.lastPanoramaLongitude),"cameraImageUrl"in D&&e(15,y=D.cameraImageUrl),"getRoomAreaText"in D&&e(16,C=D.getRoomAreaText),"getLabelElement"in D&&e(17,k=D.getLabelElement),"getRuleDistanceText"in D&&e(18,S=D.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in D&&e(19,I=D.adaptiveRoomLabelVisibleEnable),"highlightData"in D&&e(20,T=D.highlightData)},[n,o,s,r,a,l,c,d,h,u,m,v,g,A,b,y,C,k,S,I,T]}let $s=class extends de{constructor(t){super(),ce(this,t,Vp,jp,le,{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},zp)}};const _p="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 Op(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 Bp(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 Qp(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Bp),rules:i.rules}}function Rp(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function Gp(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 dn(i){return Y(this,null,function*(){const t=yield Op(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Qp),o=i.computed_data.entrance?Gp(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(Rp)}})}function Fp(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:_p,width:45,height:48},a=sp(s,t),l=ip(s,e),c=op(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function Wp(i,t){return t(i),i}function Ro(i,t){return Wp({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function ac(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 er(i,t,e=ln.BOUNDING_CENTER){const n=ac(i,t),o=ac(i,t+1);return e===ln.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===ln.CEILING?o:n}function tr(i,t,e,n){const o=er(i,e,n==null?void 0:n.attachedTo),s=new E.Vector3(0,o,0),r=new E.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 zi=class{constructor(t,e){f(this,"VERSION","2.20.0-dev.11");f(this,"five");f(this,"hooks",new Bn);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 _s(t)?t:`${this.staticPrefix}${t}`}},yn=class extends zi{};var vt=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(vt||{});const lc=500,Np=80;function nr(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function ir(i,t){return Y(this,null,function*(){const[e]=yield ti(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(!Hp(n,o))throw new Error("pose 与预期不符")})}function Hp(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"?nr(n,o,2):n===o})}function or(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!(!nr(e,s,2)||!nr(n,r,2)||o!==a)}function cc(i,t,e=!0){return Y(this,null,function*(){if(or(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[d]=yield ti(ir(i,[t.mode,t,void 0,e]));if(d)throw new Error(vt.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 ti(i.updateCamera(t,l,e));if(c)throw new Error(vt.UpdateCameraError)})}function ri(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 Xp(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 Yp(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 Up=class extends yn{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||!or(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=tr(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,vt.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(vt.ModelNotLoaded);if(!this.data)throw new Error(vt.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},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 ti(cc(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(vt.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,h=o.immediately?0:lc;ri(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,vt.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);ri(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||Yp(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();Xp(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:Np/((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:cn,attachedTo:ln.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"㎡",getRuleDistanceText:l=>l.toString()},s=n?Ro(n,["selector","scale"]):{},r=N(N({},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 dn(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 dn(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=Pe(N(N({},this.state),e),{config:s}),!zt(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=Pe(N({},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 $s({target:this.container,intro:!0,props:n})}};const qp=(i,t)=>new Up(i,t);function Jp(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 Zp(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 Kp=class extends yn{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||!or(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=tr(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,vt.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(vt.ModelNotLoaded);if(!this.data)throw new Error(vt.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},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 ti(cc(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(vt.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,h=o.immediately?0:lc;ri(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,vt.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);ri(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(),Jp(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:(Zp(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:cn,attachedTo:ln.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"㎡",getRuleDistanceText:a=>a.toString()},s=n?Ro(n,["selector","scale"]):{},r=N(N({},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 dn(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=er(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.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 dn(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=Pe(N(N({},this.state),e),{config:s}),!zt(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=Pe(N({},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 $s({target:this.container,intro:!0,props:n})}};const $p=(i,t)=>new Kp(i,t);let eg=class extends yn{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=tr(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:cn,attachedTo:ln.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"㎡",getRuleDistanceText:a=>a.toString()},s=n?Ro(n,["selector","scale"]):{},r=N(N({},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 dn(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=er(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.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 dn(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 ir(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;ri(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;ri(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?N(N({},o.config),e.config):o.config;this.state=Pe(N(N({},this.state),e),{config:s}),!zt(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=Pe(N({},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 $s({target:this.container,intro:!0,props:n})}};const tg=(i,t)=>new eg(i,t);function sr(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function ng(i){me(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 ig(i){let t,e,n;return{c(){t=V("div"),e=V("div"),n=V("div"),w(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),z(n,"background-image","url("+(i[0]||cn)+")"),z(n,"transform",i[1]),w(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),z(e,"transform",i[2]),w(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){_(o,t,s),B(t,e),B(e,n)},p(o,[s]){s&1&&z(n,"background-image","url("+(o[0]||cn)+")"),(s&1||s&3)&&z(n,"transform",o[1]),s&4&&z(e,"transform",o[2])},i:K,o:K,d(o){o&&j(t)}}}function og(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function sg(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,C=(A.max.y-A.min.y)*r,k=Math.floor(b.positionInImage.x*y),S=Math.floor(b.positionInImage.y*C);return`translate(${k}px, ${S}px)`}function u(v){e(6,c=v)}const m=sr(v=>{e(7,d=v.longitude)},1e3/60);return kt(()=>(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=og(d))},[l,o,n,s,r,a,c,d]}class rg extends de{constructor(t){super(),ce(this,t,sg,ig,le,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},ng)}}function ag(i){me(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 dc(i,t,e){const n=i.slice();return n[1]=t[e],n}function hc(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=V("div"),n=V("div"),r=se(),w(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),z(n,"background-image",`url(${t[1].icon.url})`),z(n,"width",o),z(n,"height",s),w(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),z(e,"top",a),z(e,"left",l),this.first=e},m(c,d){_(c,e,d),B(e,n),B(e,r)},p(c,d){t=c,d&1&&z(n,"background-image",`url(${t[1].icon.url})`);const h=d&1;h&&z(n,"width",o),h&&z(n,"height",s),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&z(e,"top",a),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&z(e,"left",l)},d(c){c&&j(e)}}}function lg(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=dc(i,o,r),l=s(a);n.set(l,e[r]=hc(l,a))}return{c(){t=V("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){_(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=xt(e,a,s,1,r,o,n,t,Us,hc,null,dc))},i:K,o:K,d(r){r&&j(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function cg(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class dg extends de{constructor(t){super(),ce(this,t,cg,lg,le,{extraObjects:0},ag)}}function uc(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[7],highlightData:i[5]}];let o={};for(let s=0;s<n.length;s+=1)o=qe(o,n[s]);return t=new Kl({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&183?nt(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[7],highlightData:s[5]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){ne(t,s)}}}function hg(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=qe(l,a[d]);t=new zl({props:l}),n=new dg({props:{extraObjects:i[6]}});let c=i[3]&&uc(i);return{c(){ie(t.$$.fragment),e=se(),ie(n.$$.fragment),o=se(),c&&c.c(),s=Ee()},m(d,h){te(t,d,h),_(d,e,h),te(n,d,h),_(d,o,h),c&&c.m(d,h),_(d,s,h),r=!0},p(d,[h]){const u=h&20?nt(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=uc(d),c.c(),x(c,1),c.m(s.parentNode,s)):c&&(he(),L(c,1,1,()=>{c=null}),ue())},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){ne(t,d),d&&j(e),ne(n,d),d&&j(o),c&&c.d(d),d&&j(s)}}}function ug(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 fg extends de{constructor(t){super(),ce(this,t,ug,hg,le,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:8,highlightData:5})}}function mg(i){me(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 fc(i){let t,e,n,o,s=i[7]!==0&&mc(i);return{c(){t=V("div"),s&&s.c(),w(t,"class","plugin-floorplan-radar svelte-1mvqyqq")},m(r,a){_(r,t,a),s&&s.m(t,null),e=!0,n||(o=[Wt(ei.call(null,t)),ke(t,"clientWidth",i[13]),ke(t,"clientHeight",i[14])],n=!0)},p(r,a){r[7]!==0?s?(s.p(r,a),a&128&&x(s,1)):(s=mc(r),s.c(),x(s,1),s.m(t,null)):s&&(he(),L(s,1,1,()=>{s=null}),ue())},i(r){e||(x(s),e=!0)},o(r){L(s),e=!1},d(r){r&&j(t),s&&s.d(),n=!1,et(o)}}}function mc(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=qe(c,l[u]);e=new fg({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=qe(h,d[u]);return o=new rg({props:h}),{c(){t=V("div"),ie(e.$$.fragment),n=se(),ie(o.$$.fragment),w(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),z(t,"width",s),z(t,"height",r)},m(u,m){_(u,t,m),te(e,t,null),B(t,n),te(o,t,null),a=!0},p(u,m){const v=m&3181?nt(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?nt(d,[{pxmm:u[10],five:u[0],floorplanData:u[3],cameraImageUrl:u[4]}]):{};o.$set(g),m&512&&s!==(s=`${u[9]}px`)&&z(t,"width",s),m&4096&&r!==(r=`${u[12]}px`)&&z(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&&j(t),ne(e),ne(o)}}}function pg(i){let t,e,n=i[1]&&fc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=fc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function gg(i,t,e){var C,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=(C=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:C.floorIndex)!=null?k:0,u=0,m=0,v=0,g=0;function A(S){e(11,h=n.work.observers[S].floorIndex)}kt(()=>(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:I,min:T}=r.bounding,D=I.x-T.x,X=I.y-T.y,J=function(){return D>X?[S,S/D*X]:[S/X*D,S]}();e(9,v=J[0]),e(12,g=J[1]),e(10,d=v/D)}},[n,o,s,r,a,l,c,u,m,v,d,h,g,b,y]}class vg extends de{constructor(t){super(),ce(this,t,gg,pg,le,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6},mg)}}let Ag=class extends yn{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:cn},s=n!=null&&n.configs?n.configs:{},r=N(N({},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 dn(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=Fp(e,this.five,this.data),this.render())}formatData(e){return Y(this,null,function*(){return yield dn(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=N(N({},this.state),e),!zt(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=Pe(N({},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 vg({target:this.wrapper,props:e})}};const bg=(i,t)=>new Ag(i,t),yg=[{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:"和室"}],wg=[{type:0,description:"木质地板"},{type:1,description:"瓷砖地面"},{type:2,description:"户外地面"},{type:3,description:"卫生间地面"},{type:4,description:"阳台地面"},{type:5,description:"车库地面"}],Pg=[{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:"写字楼"}],rr=(i,t,e)=>{const n=new E.Matrix4,o=new E.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},Cg=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(rr(o,0,0)),s&&i.applyMatrix4(rr(0,s,0)),r&&i.applyMatrix4(rr(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function pc(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=N({map:o.material.map||{}},t);o.material=new O.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const Ig=(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(this,null,function*(){var R;const u=(h==null?void 0:h.fbx_url)||e,m=(R=h==null?void 0:h.north_rad)!=null?R: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),C=yield new co.FBXLoader().loadAsync(u);pc(C,{transparent:!0,side:E.DoubleSide,blending:E.AdditiveBlending});const k=[0,m-Math.PI/2,0],{model:{bounding:{max:{x:S,z:I},min:{x:T,y:D,z:X}}}}=i;o.yBase=D;const J={x:(S+T)/2,y:D-1.6,z:(I+X)/2},G=.0045*b;return Cg(C,{position:J,rotation:k,scale:G}),o.object=C,!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 Eg(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 O.CanvasTexture(a)}const kg=({x:i,y:t,z:e})=>new O.Vector3(i,t,e),xg=(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(this,null,function*(){var J,G,R,F,Q,W,q,U;const C=(J=y==null?void 0:y.position)!=null?J:o;if(!C)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const k=kg(C),S=(G=y==null?void 0:y.rad)!=null?G:s,I=(R=y==null?void 0:y.fbx_url)!=null?R:r;if(e.rad=S,S===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${S}`));const T=yield new co.FBXLoader().loadAsync(I);T.position.copy(k),T.rotation.z=S,T.scale.set(.8,.8,.8),pc(T,{transparent:!0,side:E.DoubleSide});const D=(q=(W=(Q=(F=T.children)==null?void 0:F[0])==null?void 0:Q.children)==null?void 0:W[3])==null?void 0:q.clone();if(!D)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${D}`));const X=(U=t.name)!=null?U:"入户门";return D.material=new O.MeshBasicMaterial({transparent:!0,map:Eg(X)}),D.renderOrder=3,T.children[0].add(D),e.object=T,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,C=new O.AnimationMixer(e.object);a.push(C);const k=C.clipAction(e.object.animations[0]);k.timeScale=y;let S;const I=()=>{let J=0,G=0;const R=1e3/30,F=Q=>{J=requestAnimationFrame(F);const W=Q-G;W<R||(G=Q,a.forEach(q=>q.update(W/1e3)),i.needsRender=!0)};return J=requestAnimationFrame(F),()=>{cancelAnimationFrame(J)}},X={play:()=>{S||(k.play(),S=I(),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)}},Dg=Ct;function Mg(i,t,e,n=Dg.Linear.None){const o=new mo(i).to(t,e).easing(n);wo(()=>o.start(0));const s=Si(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 Sg(i,t){return Mg({progress:0},{progress:1},i,t)}var gc=(i=>(i.Move="Move",i.Rotate="Rotate",i))(gc||{}),jt=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(jt||{});const Go=Math.PI*2;function vc(i){return(i%Go+Go)%Go}function Ac(i){return i%Go}function ar(i,t,e){return i+(t-i)*e}const lr=(i,t,e)=>{const n=Math.PI,o=n*2;let s=vc(i),r=vc(t);return e===jt.Anticlockwise&&s<r&&(s+=o),e===jt.Clockwise&&r<s&&(r+=o),e===jt.Loop&&r-s>n?lr(s,r,jt.Anticlockwise):e===jt.Loop&&s-r>n?lr(s,r,jt.Clockwise):{from:s,to:r}},Lg=i=>{const t={},e=(l,c,...d)=>Y(this,[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,N({duration:r,moveEndCallback:()=>h(!0),moveCancelCallback:()=>u(new Error("move canceled"))},s)):u(new Error("unexpected error"))})}),n=s=>{const r=i.state,a=Ac(r.latitude),l=Ac(s.latitude),{from:c,to:d}=lr(r.longitude,s.longitude,s.rotation||jt.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(this,[l,c,...d],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==ve.Five.Mode.Panorama&&(yield i.changeMode(ve.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:C})=>{const k={};k.longitude=ar(h.longitude,u.longitude,C),k.latitude=ar(h.latitude,u.latitude,C),k.fov=ar(h.fov,u.fov,C),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=Sg(b,Ct.Linear.None).onUpdate(v).onComplete(g).onDestroy(A);s.rotation===jt.Loop&&y.repeat(1/0).yoyo(!0),t.interruptCallback=(C=!0)=>{y.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),m(C)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function bc(i,t){return i.x===t.x&&i.y===t.y}function yc(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function Fo(i,t){return(t.y-i.y)/(t.x-i.x)}function wc(i,t,e){const n=Fo(i[1],i[0]),o=Fo(t[1],t[0]);if(isNaN(n)||isNaN(o)||yc(n,o))return!1;if(Wo(i[0],t))return i[0];if(Wo(i[1],t))return i[1];if(Wo(t[0],i))return t[0];if(Wo(t[1],i))return t[1];if(e&&!Tg(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 Wo(i,t){return bc(i,t[0])||bc(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&&yc(Fo(t[0],i),Fo(i,t[1]))}function No(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function Tg(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)&&No(t[0],i[1],i[0])*No(i[1],t[1],i[0])>0&&No(i[0],t[1],t[0])*No(t[1],i[1],t[0])>0?1:0}function Pc(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>Pc(i,t-1))}const zg=`<style type="text/css">
194
+ `;return i.$$set=s=>{"content"in s&&e(0,n=s.content)},[n,o]}class Tm extends de{constructor(t){super(),ce(this,t,Lm,Sm,le,{content:0},Mm)}}function zm(i){me(i,"svelte-ozpg4a",".floorplan-plugin__base-image.svelte-ozpg4a{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}")}function jm(i){let t,e;return t=new Dm({props:{url:i[1].url}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Vm(i){let t,e;return t=new Tm({props:{content:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function _m(i){let t,e,n,o;const s=[Vm,jm],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=V("div"),n&&n.c(),w(t,"class","floorplan-plugin__base-image svelte-ozpg4a")},m(l,c){_(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&&(he(),L(r[d],1,1,()=>{r[d]=null}),ue()),~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&&j(t),~e&&r[e].d()}}}function Om(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 zl extends de{constructor(t){super(),ce(this,t,Om,_m,le,{floorIndex:2,floorplanData:3},zm)}}function Bm(i){me(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 Qm(i){let t,e=i[8].outerHTML+"",n;return{c(){t=new ko(!1),n=Ee(),t.a=n},m(o,s){t.m(e,o,s),_(o,n,s)},p(o,s){s&256&&e!==(e=o[8].outerHTML+"")&&t.p(e)},d(o){o&&j(n),o&&t.d()}}}function Rm(i){let t,e,n=i[1]&&jl(i),o=i[0]&&Vl(i);return{c(){n&&n.c(),t=se(),o&&o.c(),e=Ee()},m(s,r){n&&n.m(s,r),_(s,t,r),o&&o.m(s,r),_(s,e,r)},p(s,r){s[1]?n?n.p(s,r):(n=jl(s),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),s[0]?o?o.p(s,r):(o=Vl(s),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null)},d(s){n&&n.d(s),s&&j(t),o&&o.d(s),s&&j(e)}}}function jl(i){let t,e=i[2].name+"",n;return{c(){t=V("span"),n=Be(e),w(t,"class","floorplan-plugin__room-name")},m(o,s){_(o,t,s),B(t,n)},p(o,s){s&4&&e!==(e=o[2].name+"")&&Re(n,e)},d(o){o&&j(t)}}}function Vl(i){let t,e;return{c(){t=V("span"),e=Be(i[7]),w(t,"class","floorplan-plugin__room-size svelte-12pzct5")},m(n,o){_(n,t,o),B(t,e)},p(n,o){o&128&&Re(e,n[7])},d(n){n&&j(t)}}}function Gm(i){let t,e,n;function o(a,l){if(a[3]===void 0)return Rm;if(a[8])return Qm}let s=o(i),r=s&&s(i);return{c(){t=V("div"),r&&r.c(),w(t,"class","floorplan-plugin__room-label-item svelte-12pzct5"),z(t,"left",i[9]),z(t,"top",i[10]),z(t,"font-size",i[11]),z(t,"opacity",i[6]?"1":"0")},m(a,l){_(a,t,l),r&&r.m(t,null),e||(n=[Wt(ei.call(null,t)),ke(t,"clientWidth",i[19]),ke(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&&z(t,"opacity",a[6]?"1":"0")},i:K,o:K,d(a){a&&j(t),r&&r.d(),e=!1,et(n)}}}function Fm(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 Wm(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(R,F){if(F.width===0||F.height===0)return()=>!1;const Q=R.path.map(({x:Ce,y:Ae})=>[Ce,Ae]),W=R.roomLabel.position,{x:q,y:U}=W,{width:Z,height:ae}=F,oe=Z/2,ye=ae/2;return function(Ae){const Ve=q*Ae,be=U*Ae,Ne=Q.map(([we,Te])=>[we*Ae,Te*Ae]);return[[Ve+oe,be-ye],[Ve-oe,be-ye],[Ve-oe,be+ye],[Ve+oe,be+ye]].every(we=>Fm(we,Ne))}}const b=document.body.clientWidth,y=document.body.clientHeight,C=h.roomLabel,k=C.positionInImage.x*100+"%",S=C.positionInImage.y*100+"%",I=(b<500||y<500?10:14)+"px";let T=0,D=0,X=!1;u.subscribe(function(F){e(16,X=!!F&&F.id===h.id)});const J=R=>{e(4,T=R.detail)},G=R=>{e(5,D=R.detail)};return i.$$set=R=>{"pxmm"in R&&e(12,l=R.pxmm),"roomAreaEnable"in R&&e(0,c=R.roomAreaEnable),"roomNameEnable"in R&&e(1,d=R.roomNameEnable),"room"in R&&e(2,h=R.room),"hoveredRoom"in R&&e(13,u=R.hoveredRoom),"getRoomAreaText"in R&&e(14,m=R.getRoomAreaText),"getLabelElement"in R&&e(3,v=R.getLabelElement),"adaptiveRoomLabelVisibleEnable"in R&&e(15,g=R.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:T,height:D}),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,T,D,a,o,n,k,S,I,l,u,m,g,X,r,s,J,G]}class Nm extends de{constructor(t){super(),ce(this,t,Wm,Gm,le,{pxmm:12,roomAreaEnable:0,roomNameEnable:1,room:2,hoveredRoom:13,getRoomAreaText:14,getLabelElement:3,adaptiveRoomLabelVisibleEnable:15},Bm)}}function Hm(i){me(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 _l(i,t,e){const n=i.slice();return n[12]=t[e],n}function Ol(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=_l(i,a,c),h=l(d);n.set(h,e[c]=Bl(h,d))}return{c(){t=V("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){_(c,t,d);for(let h=0;h<e.length;h+=1)e[h]&&e[h].m(t,null);o=!0,s||(r=[Wt(ei.call(null,t)),ke(t,"clientWidth",i[11])],s=!0)},p(c,d){d&447&&(a=c[8],he(),e=xt(e,d,l,1,c,a,n,t,an,Bl,null,_l),ue())},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&&j(t);for(let d=0;d<e.length;d+=1)e[d].d();s=!1,et(r)}}}function Bl(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=qe(r,s[a]);return n=new Nm({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){_(a,e,l),te(n,a,l),o=!0},p(a,l){t=a;const c=l&447?nt(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&&j(e),ne(n,a)}}}function Xm(i){let t,e,n=i[8]&&Ol(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[8]?n?(n.p(o,s),s&256&&x(n,1)):(n=Ol(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function Ym(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 Um extends de{constructor(t){super(),ce(this,t,Ym,Xm,le,{floorIndex:9,roomAreaEnable:0,roomNameEnable:1,floorplanData:10,hoveredRoom:2,getRoomAreaText:3,getLabelElement:4,adaptiveRoomLabelVisibleEnable:5},Hm)}}function qm(i){me(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 Ql(i,t,e){const n=i.slice();return n[11]=t[e],n[13]=e,n}function Rl(i,t,e){const n=i.slice();return n[14]=t[e],n}function Gl(i){let t;return{c(){t=V("div"),w(t,"class","floorplan-plugin__rule-scale svelte-djlmk4"),z(t,"left",i[14].left*100+"%"),z(t,"bottom",i[14].bottom*100+"%")},m(e,n){_(e,t,n)},p:K,d(e){e&&j(t)}}}function Fl(i,t){let e,n,o=t[1](t[11].distance)+"",s,r;return{key:i,first:null,c(){e=V("div"),n=V("div"),s=Be(o),r=se(),w(n,"class","floorplan-plugin__rule-text svelte-djlmk4"),$(n,"is-row",t[2]),w(e,"class","floorplan-plugin__rule-text-item svelte-djlmk4"),z(e,"left",t[11].left*100+"%"),z(e,"bottom",t[11].bottom*100+"%"),this.first=e},m(a,l){_(a,e,l),B(e,n),B(n,s),B(e,r)},p(a,l){t=a,l&2&&o!==(o=t[1](t[11].distance)+"")&&Re(s,o)},d(a){a&&j(e)}}}function Jm(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]=Gl(Rl(i,d,v));let u=i[4];const m=v=>v[13];for(let v=0;v<u.length;v+=1){let g=Ql(i,u,v),A=m(g);l.set(A,a[v]=Fl(A,g))}return{c(){t=V("div"),e=V("div"),n=se(),o=V("div");for(let v=0;v<h.length;v+=1)h[v].c();s=se(),r=V("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]),z(t,"width",i[2]?"100%":1/16+"rem"),z(t,"height",i[2]?1/16+"rem":"100%")},m(v,g){_(v,t,g),B(t,e),B(t,n),B(t,o);for(let A=0;A<h.length;A+=1)h[A]&&h[A].m(o,null);B(t,s),B(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=Rl(v,d,A);h[A]?h[A].p(b,g):(h[A]=Gl(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=xt(a,g,m,1,v,u,l,r,Us,Fl,null,Ql)),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&&j(t),Nt(h,v);for(let g=0;g<a.length;g+=1)a[g].d()}}}const oi=1e3,si=180;function Zm(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-(oi-si)*2,c=s.max.y-s.min.y-(oi-si)*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-oi+si)/l:0,A=a?0:(v-s.min.y-oi+si)/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,C=a?(y-s.min.x-oi+si)/l:0,k=a?0:(y-s.min.y-oi+si)/c;return{left:C,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 Km extends de{constructor(t){super(),ce(this,t,Zm,Jm,le,{type:0,data:5,bounding:6,getRuleDistanceText:1},qm)}}function $m(i){me(i,"svelte-1mzj9p3",".floorplan-plugin__rule-labels-wrapper.svelte-1mzj9p3{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}")}function Wl(i,t,e){const n=i.slice();return n[13]=t[e][0],n[14]=t[e][1],n}function Nl(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=qe(r,s[a]);return n=new Km({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){_(a,e,l),te(n,a,l),o=!0},p(a,l){t=a;const c=l&19?nt(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&&j(e),ne(n,a)}}}function ep(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=Wl(i,s,a),c=r(l);n.set(c,e[a]=Nl(c,l))}return{c(){t=V("div");for(let a=0;a<e.length;a+=1)e[a].c();w(t,"class","floorplan-plugin__rule-labels-wrapper svelte-1mzj9p3"),z(t,"width",i[3]),z(t,"height",i[2])},m(a,l){_(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],he(),e=xt(e,l,r,1,a,s,n,t,an,Nl,null,Wl),ue()),l&8&&z(t,"width",a[3]),l&4&&z(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&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}const Hl=1e3,Xl=180;function tp(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-(Hl-Xl)*2),i.$$.dirty&2&&e(8,d=n.max.y-n.min.y-(Hl-Xl)*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 np extends de{constructor(t){super(),ce(this,t,tp,ep,le,{floorIndex:5,floorplanData:6,getRuleDistanceText:0},$m)}}function Qo(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 Yl({x:i,y:t},e){const{max:n,min:o}=e;return{x:i-o.x,y:n.y-t}}function ip(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 op(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 sp(i,t){return Math.max(...t.work.observers.map(n=>i.z>=n.standingPosition.z?n.floorIndex:0))}function rp(i){let t;return{c(){t=ze("path"),w(t,"d",i[0]),w(t,"fill","#2F313A")},m(e,n){_(e,t,n)},p(e,[n]){n&1&&w(t,"d",e[0])},i:K,o:K,d(e){e&&j(t)}}}function ap(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=Qo(o,{needZ:!0}))},[n,o]}class lp extends de{constructor(t){super(),ce(this,t,ap,rp,le,{path:1})}}function cp(i){let t,e,n,o,s,r;return{c(){t=ze("defs"),e=ze("pattern"),n=ze("rect"),o=ze("path"),s=se(),r=ze("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){_(a,t,l),B(t,e),B(e,n),B(e,o),_(a,s,l),_(a,r,l)},p(a,[l]){l&1&&w(r,"d",a[0])},i:K,o:K,d(a){a&&j(t),a&&j(s),a&&j(r)}}}const Ks=6;function dp(i,t,e){let n,{path:o}=t;const s=Ks*2,r=`M0 ${Ks} h ${s} M${Ks} 0 v ${s}`;return i.$$set=a=>{"path"in a&&e(3,o=a.path)},i.$$.update=()=>{i.$$.dirty&8&&e(0,n=Qo(o,{needZ:!0}))},[n,s,r,o]}class hp extends de{constructor(t){super(),ce(this,t,dp,cp,le,{path:3})}}function up(i){let t,e,n,o,s,r,a,l,c,d,h;return{c(){t=ze("defs"),e=ze("pattern"),n=ze("rect"),o=ze("pattern"),s=ze("rect"),r=se(),a=ze("path"),l=se(),c=ze("path"),d=se(),h=ze("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){_(u,t,m),B(t,e),B(e,n),B(t,o),B(o,s),_(u,r,m),_(u,a,m),_(u,l,m),_(u,c,m),_(u,d,m),_(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&&j(t),u&&j(r),u&&j(a),u&&j(l),u&&j(c),u&&j(d),u&&j(h)}}}function fp(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=Qo(o,{needZ:!0}))},[n,o]}class mp extends de{constructor(t){super(),ce(this,t,fp,up,le,{path:1})}}function pp(i){me(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 Ul(i,t,e){const n=i.slice();return n[5]=t[e],n}function gp(i){let t,e;return t=new hp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function vp(i){let t,e;return t=new mp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Ap(i){let t,e;return t=new lp({props:{path:i[5].path}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function ql(i){let t,e,n,o;const s=[Ap,vp,gp],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=ze("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){_(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):(he(),L(r[d],1,1,()=>{r[d]=null}),ue(),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&&j(t),r[e].d()}}}function bp(i){let t,e,n=i[0],o=[];for(let r=0;r<n.length;r+=1)o[r]=ql(Ul(i,n,r));const s=r=>L(o[r],1,1,()=>{o[r]=null});return{c(){t=V("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){_(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=Ul(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=ql(c),o[l].c(),x(o[l],1),o[l].m(t,null))}for(he(),l=n.length;l<o.length;l+=1)s(l);ue()}},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&&j(t),Nt(o,r)}}}function yp(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=>Pe(N({},l),{path:l.path.map(c=>Yl(c,s.bounding))})))},[n,r,a,o,s]}class wp extends de{constructor(t){super(),ce(this,t,yp,bp,le,{floorIndex:3,floorplanData:4},pp)}}function Pp(i){me(i,"svelte-qq2273","path.svelte-qq2273{--opacity:0;opacity:var(--opacity)}path.svelte-qq2273:hover{opacity:calc(var(--opacity) + 0.1)}")}function Cp(i){let t,e,n,o;return{c(){t=ze("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){_(s,t,r),n||(o=[ke(t,"mouseenter",i[3]),ke(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&&j(t),n=!1,et(o)}}}function Ip(i,t,e){let n,o,{room:s}=t,{floorIndex:r}=t,{floorplanData:a}=t,{hoveredRoom:l}=t,{highlightData:c}=t;function d(){l.set(s)}function h(){l.set(void 0)}const{bounding:u}=a,m=Qo(s.path,{needZ:!0,format:v=>Yl(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),"hoveredRoom"in v&&e(7,l=v.hoveredRoom),"highlightData"in v&&e(8,c=v.highlightData)},i.$$.update=()=>{i.$$.dirty&259&&e(9,n=c[`${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 Ep extends de{constructor(t){super(),ce(this,t,Ip,Cp,le,{room:0,floorIndex:1,floorplanData:6,hoveredRoom:7,highlightData:8},Pp)}}function kp(i){me(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 Jl(i,t,e){const n=i.slice();return n[6]=t[e],n}function Zl(i,t){let e,n,o;const s=[{room:t[6],floorplanData:t[1],hoveredRoom:t[2],floorIndex:t[0],highlightData:t[3]}];let r={};for(let a=0;a<s.length;a+=1)r=qe(r,s[a]);return n=new Ep({props:r}),{key:i,first:null,c(){e=Ee(),ie(n.$$.fragment),this.first=e},m(a,l){_(a,e,l),te(n,a,l),o=!0},p(a,l){t=a;const c=l&15?nt(s,[{room:t[6],floorplanData:t[1],hoveredRoom:t[2],floorIndex:t[0],highlightData:t[3]}]):{};n.$set(c)},i(a){o||(x(n.$$.fragment,a),o=!0)},o(a){L(n.$$.fragment,a),o=!1},d(a){a&&j(e),ne(n,a)}}}function xp(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=Jl(i,r,l),d=a(c);o.set(d,n[l]=Zl(d,c))}return{c(){t=V("div"),e=ze("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){_(l,t,c),B(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,he(),n=xt(n,c,a,1,l,r,o,e,an,Zl,null,Jl),ue())},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&&j(t);for(let c=0;c<n.length;c+=1)n[c].d()}}}function Dp(i,t,e){let{floorIndex:n}=t,{floorplanData:o}=t,{hoveredRoom:s}=t,{highlightData: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),"hoveredRoom"in c&&e(2,s=c.hoveredRoom),"highlightData"in c&&e(3,r=c.highlightData)},[n,o,s,r,a,l]}class Kl extends de{constructor(t){super(),ce(this,t,Dp,xp,le,{floorIndex:0,floorplanData:1,hoveredRoom:2,highlightData:3},kp)}}function Mp(i){me(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 $l(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=qe(o,n[s]);return t=new Kl({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&24834?nt(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){ne(t,s)}}}function ec(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=qe(o,n[s]);return t=new Um({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&22370?nt(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){ne(t,s)}}}function tc(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=qe(o,n[s]);return t=new np({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&2306?nt(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){ne(t,s)}}}function Sp(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=qe(h,d[b]);e=new wp({props:h});let u=(i[2]||i[3])&&$l(i);const m=[{floorplanData:i[8],floorIndex:i[1]}];let v={};for(let b=0;b<m.length;b+=1)v=qe(v,m[b]);s=new zl({props:v});let g=i[4]&&ec(i),A=i[7]&&tc(i);return{c(){t=V("div"),ie(e.$$.fragment),n=se(),u&&u.c(),o=se(),ie(s.$$.fragment),r=se(),g&&g.c(),a=se(),A&&A.c(),w(t,"class",l=Oe(`floorplan-plugin__floor${i[0]?" floorplan-plugin__floor--is-current":""}`)+" svelte-bl8zrz")},m(b,y){_(b,t,y),te(e,t,null),B(t,n),u&&u.m(t,null),B(t,o),te(s,t,null),B(t,r),g&&g.m(t,null),B(t,a),A&&A.m(t,null),c=!0},p(b,[y]){const C=y&258?nt(d,[{floorIndex:b[1],floorplanData:b[8]}]):{};e.$set(C),b[2]||b[3]?u?(u.p(b,y),y&12&&x(u,1)):(u=$l(b),u.c(),x(u,1),u.m(t,o)):u&&(he(),L(u,1,1,()=>{u=null}),ue());const k=y&258?nt(m,[{floorplanData:b[8],floorIndex:b[1]}]):{};s.$set(k),b[4]?g?(g.p(b,y),y&16&&x(g,1)):(g=ec(b),g.c(),x(g,1),g.m(t,a)):g&&(he(),L(g,1,1,()=>{g=null}),ue()),b[7]?A?(A.p(b,y),y&128&&x(A,1)):(A=tc(b),A.c(),x(A,1),A.m(t,null)):A&&(he(),L(A,1,1,()=>{A=null}),ue()),(!c||y&1&&l!==(l=Oe(`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&&j(t),ne(e),u&&u.d(),ne(s),g&&g.d(),A&&A.d()}}}function Lp(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=Zs(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 Tp=class extends de{constructor(t){super(),ce(this,t,Lp,Sp,le,{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},Mp)}};function zp(i){me(i,"svelte-86bqav",".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}")}function nc(i,t,e){const n=i.slice();return n[21]=t[e],n}function ic(i){let t,e,n,o,s,r=i[13].floorDatas,a=[];for(let h=0;h<r.length;h+=1)a[h]=oc(nc(i,r,h));const l=h=>L(a[h],1,1,()=>{a[h]=null});let c=i[5]&&sc(i),d=i[8]&&rc(i);return{c(){t=V("div");for(let h=0;h<a.length;h+=1)a[h].c();e=se(),c&&c.c(),n=se(),d&&d.c(),w(t,"class","floorplan-main svelte-86bqav")},m(h,u){_(h,t,u);for(let m=0;m<a.length;m+=1)a[m]&&a[m].m(t,null);B(t,e),c&&c.m(t,null),B(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=nc(i,r,m);a[m]?(a[m].p(v,u),x(a[m],1)):(a[m]=oc(v),a[m].c(),x(a[m],1),a[m].m(t,e))}for(he(),m=r.length;m<a.length;m+=1)l(m);ue()}i[5]?c?(c.p(i,u),u&32&&x(c,1)):(c=sc(i),c.c(),x(c,1),c.m(t,n)):c&&(he(),L(c,1,1,()=>{c=null}),ue()),i[8]?d?(d.p(i,u),u&256&&x(d,1)):(d=rc(i),d.c(),x(d,1),d.m(t,null)):d&&(he(),L(d,1,1,()=>{d=null}),ue())},i(h){if(!s){for(let u=0;u<r.length;u+=1)x(a[u]);x(c),x(d),o||tt(()=>{o=An(t,bn,{duration:i[0],easing:tn}),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&&j(t),Nt(a,h),c&&c.d(),d&&d.d()}}}function oc(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=qe(o,n[s]);return t=new Tp({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&2047696?nt(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){ne(t,s)}}}function sc(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=qe(o,n[s]);return t=new vm({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&57352?nt(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){ne(t,s)}}}function rc(i){let t,e;return t=new Im({props:{floorplanData:i[13],northDesc:i[2]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function jp(i){let t,e,n=i[1]&&ic(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=ic(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function Vp(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:C}=t,{getLabelElement:k}=t,{getRuleDistanceText:S}=t,{adaptiveRoomLabelVisibleEnable:I}=t,{highlightData:T}=t;return i.$$set=D=>{"duration"in D&&e(0,n=D.duration),"visible"in D&&e(1,o=D.visible),"northDesc"in D&&e(2,s=D.northDesc),"panoIndex"in D&&e(3,r=D.panoIndex),"floorIndex"in D&&e(4,a=D.floorIndex),"cameraEnable"in D&&e(5,l=D.cameraEnable),"hoverEnable"in D&&e(6,c=D.hoverEnable),"highlightEnable"in D&&e(7,d=D.highlightEnable),"compassEnable"in D&&e(8,h=D.compassEnable),"roomLabelsEnable"in D&&e(9,u=D.roomLabelsEnable),"roomAreaEnable"in D&&e(10,m=D.roomAreaEnable),"roomNameEnable"in D&&e(11,v=D.roomNameEnable),"ruleLabelsEnable"in D&&e(12,g=D.ruleLabelsEnable),"floorplanData"in D&&e(13,A=D.floorplanData),"lastPanoramaLongitude"in D&&e(14,b=D.lastPanoramaLongitude),"cameraImageUrl"in D&&e(15,y=D.cameraImageUrl),"getRoomAreaText"in D&&e(16,C=D.getRoomAreaText),"getLabelElement"in D&&e(17,k=D.getLabelElement),"getRuleDistanceText"in D&&e(18,S=D.getRuleDistanceText),"adaptiveRoomLabelVisibleEnable"in D&&e(19,I=D.adaptiveRoomLabelVisibleEnable),"highlightData"in D&&e(20,T=D.highlightData)},[n,o,s,r,a,l,c,d,h,u,m,v,g,A,b,y,C,k,S,I,T]}let $s=class extends de{constructor(t){super(),ce(this,t,Vp,jp,le,{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},zp)}};const _p="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 Op(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 Bp(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 Qp(i){return{floorName:i.floor_name,floorIndex:i.floor_index,rooms:i.rooms.map(Bp),rules:i.rules}}function Rp(i){return{index:i.index,floorIndex:i.floor_index,position:i.position,positionInImage:i.position_in_image}}function Gp(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 dn(i){return Y(this,null,function*(){const t=yield Op(i.outlines),e=i.computed_data.bounding,n=i.computed_data.floor_datas.map(Qp),o=i.computed_data.entrance?Gp(i.computed_data.entrance):null;return{outlines:t,entrance:o,bounding:e,floorDatas:n,observers:i.computed_data.observers.map(Rp)}})}function Fp(i,t,e){return i.map(o=>{const s=o.position,r=o.icon?o.icon:{url:_p,width:45,height:48},a=sp(s,t),l=ip(s,e),c=op(l,e);return{floorIndex:a,icon:r,id:o.id,position:l,positionInImage:c}})}function Wp(i,t){return t(i),i}function Ro(i,t){return Wp({},e=>{for(const n in i)t.indexOf(n)===-1&&(e[n]=i[n])})}function ac(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 er(i,t,e=ln.BOUNDING_CENTER){const n=ac(i,t),o=ac(i,t+1);return e===ln.BOUNDING_CENTER?(i.model.bounding.max.y+i.model.bounding.min.y)/2:e===ln.CEILING?o:n}function tr(i,t,e,n){const o=er(i,e,n==null?void 0:n.attachedTo),s=new E.Vector3(0,o,0),r=new E.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 zi=class{constructor(t,e){f(this,"VERSION","2.20.0-dev.13");f(this,"five");f(this,"hooks",new Bn);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 _s(t)?t:`${this.staticPrefix}${t}`}},yn=class extends zi{};var vt=(i=>(i.UnknownError="UnknownError",i.DataNotLoaded="DataNotLoaded",i.BreakOffByHide="BreakOffByHide",i.BreakOffByDisable="BreakOffByDisable",i.ModelNotLoaded="ModelNotLoaded",i.ChangeModeError="ChangeModeError",i.UpdateCameraError="UpdateCameraError",i))(vt||{});const lc=500,Np=80;function nr(i,t,e=4){return Math.floor(i*Math.pow(10,e))===Math.floor(t*Math.pow(10,e))}function ir(i,t){return Y(this,null,function*(){const[e]=yield ti(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(!Hp(n,o))throw new Error("pose 与预期不符")})}function Hp(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"?nr(n,o,2):n===o})}function or(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!(!nr(e,s,2)||!nr(n,r,2)||o!==a)}function cc(i,t,e=!0){return Y(this,null,function*(){if(or(i,t)===!0)return;const o=i.getCurrentState();if(o.mode!==t.mode){const[d]=yield ti(ir(i,[t.mode,t,void 0,e]));if(d)throw new Error(vt.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 ti(i.updateCamera(t,l,e));if(c)throw new Error(vt.UpdateCameraError)})}function ri(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 Xp(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 Yp(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 Up=class extends yn{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||!or(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=tr(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,vt.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(vt.ModelNotLoaded);if(!this.data)throw new Error(vt.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},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 ti(cc(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(vt.UnknownError);this.updateSize(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,h=o.immediately?0:lc;ri(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,vt.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);ri(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||Yp(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();Xp(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:Np/((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:cn,attachedTo:ln.BOUNDING_CENTER,getLabelElement:void 0,getRoomAreaText:l=>(l/1e6).toFixed(1)+"㎡",getRuleDistanceText:l=>l.toString()},s=n?Ro(n,["selector","scale"]):{},r=N(N({},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 dn(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 dn(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=Pe(N(N({},this.state),e),{config:s}),!zt(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=Pe(N({},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 $s({target:this.container,intro:!0,props:n})}};const qp=(i,t)=>new Up(i,t);function Jp(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 Zp(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 Kp=class extends yn{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||!or(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=tr(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,vt.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(vt.ModelNotLoaded);if(!this.data)throw new Error(vt.DataNotLoaded);this.isHiddenByHideFunc=!1;const n={floorIndex:this.floorIndex,modelOpacity:this.state.config.modelOpacity,immediately:!1,isAutoShow:!1,userAction:!0},o=N(N({},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 ti(cc(this.five,this.showState,o.userAction));if(c)throw c;if(a)throw l?new Error(l):new Error(vt.UnknownError);this.updateSize(),this.updatePosition(),this.floorIndex=o.floorIndex,this.five.model.show(this.floorIndex);const d=o.modelOpacity,h=o.immediately?0:lc;ri(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,vt.BreakOffByHide),this.showPromise=void 0;const o=N(N({},{userAction:!0,isAutoHide:!1}),e);ri(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(),Jp(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:(Zp(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:cn,attachedTo:ln.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"㎡",getRuleDistanceText:a=>a.toString()},s=n?Ro(n,["selector","scale"]):{},r=N(N({},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 dn(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=er(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.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 dn(e.data)})}updateState(e,n){const o=this.state,s=e.config?N(N({},o.config),e.config):o.config;this.state=Pe(N(N({},this.state),e),{config:s}),!zt(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=Pe(N({},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 $s({target:this.container,intro:!0,props:n})}};const $p=(i,t)=>new Kp(i,t);let eg=class extends yn{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=tr(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:cn,attachedTo:ln.BOUNDING_CENTER,getLabelElement:void 0,adaptiveRoomLabelVisibleEnable:!0,getRoomAreaText:a=>(a/1e6).toFixed(1)+"㎡",getRuleDistanceText:a=>a.toString()},s=n?Ro(n,["selector","scale"]):{},r=N(N({},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 dn(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=er(this.five,this.floorIndex,this.state.config.attachedTo),n=(a=this.five.model)==null?void 0:a.bounding.getCenter(new E.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 dn(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 ir(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;ri(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;ri(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?N(N({},o.config),e.config):o.config;this.state=Pe(N(N({},this.state),e),{config:s}),!zt(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=Pe(N({},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 $s({target:this.container,intro:!0,props:n})}};const tg=(i,t)=>new eg(i,t);function sr(i,t=200){let e;return function(...n){e||(i(...n),e=setTimeout(function(){e=null},t))}}function ng(i){me(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 ig(i){let t,e,n;return{c(){t=V("div"),e=V("div"),n=V("div"),w(n,"class","plugin-radar__camera-rotate svelte-1nqrlxd"),z(n,"background-image","url("+(i[0]||cn)+")"),z(n,"transform",i[1]),w(e,"class","plugin-radar__camera-position svelte-1nqrlxd"),z(e,"transform",i[2]),w(t,"class","plugin-radar__camera-wrapper svelte-1nqrlxd")},m(o,s){_(o,t,s),B(t,e),B(e,n)},p(o,[s]){s&1&&z(n,"background-image","url("+(o[0]||cn)+")"),(s&1||s&3)&&z(n,"transform",o[1]),s&4&&z(e,"transform",o[2])},i:K,o:K,d(o){o&&j(t)}}}function og(i){return`rotate(${Math.floor(i/Math.PI*180)*-1+45}deg)`}function sg(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,C=(A.max.y-A.min.y)*r,k=Math.floor(b.positionInImage.x*y),S=Math.floor(b.positionInImage.y*C);return`translate(${k}px, ${S}px)`}function u(v){e(6,c=v)}const m=sr(v=>{e(7,d=v.longitude)},1e3/60);return kt(()=>(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=og(d))},[l,o,n,s,r,a,c,d]}class rg extends de{constructor(t){super(),ce(this,t,sg,ig,le,{five:3,pxmm:4,floorplanData:5,cameraImageUrl:0},ng)}}function ag(i){me(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 dc(i,t,e){const n=i.slice();return n[1]=t[e],n}function hc(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=V("div"),n=V("div"),r=se(),w(n,"class","plugin-pano-floorplan__extra-object-item svelte-1i87fz7"),z(n,"background-image",`url(${t[1].icon.url})`),z(n,"width",o),z(n,"height",s),w(e,"class","plugin-pano-floorplan__extra-object-item--position svelte-1i87fz7"),z(e,"top",a),z(e,"left",l),this.first=e},m(c,d){_(c,e,d),B(e,n),B(e,r)},p(c,d){t=c,d&1&&z(n,"background-image",`url(${t[1].icon.url})`);const h=d&1;h&&z(n,"width",o),h&&z(n,"height",s),d&1&&a!==(a=`${t[1].positionInImage.y*100}%`)&&z(e,"top",a),d&1&&l!==(l=`${t[1].positionInImage.x*100}%`)&&z(e,"left",l)},d(c){c&&j(e)}}}function lg(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=dc(i,o,r),l=s(a);n.set(l,e[r]=hc(l,a))}return{c(){t=V("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){_(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=xt(e,a,s,1,r,o,n,t,Us,hc,null,dc))},i:K,o:K,d(r){r&&j(t);for(let a=0;a<e.length;a+=1)e[a].d()}}}function cg(i,t,e){let{extraObjects:n=[]}=t;return i.$$set=o=>{"extraObjects"in o&&e(0,n=o.extraObjects)},[n]}class dg extends de{constructor(t){super(),ce(this,t,cg,lg,le,{extraObjects:0},ag)}}function uc(i){let t,e;const n=[{five:i[0],pxmm:i[1],floorIndex:i[2],floorplanData:i[4],onRoomHeightClick:i[7],highlightData:i[5]}];let o={};for(let s=0;s<n.length;s+=1)o=qe(o,n[s]);return t=new Kl({props:o}),{c(){ie(t.$$.fragment)},m(s,r){te(t,s,r),e=!0},p(s,r){const a=r&183?nt(n,[{five:s[0],pxmm:s[1],floorIndex:s[2],floorplanData:s[4],onRoomHeightClick:s[7],highlightData:s[5]}]):{};t.$set(a)},i(s){e||(x(t.$$.fragment,s),e=!0)},o(s){L(t.$$.fragment,s),e=!1},d(s){ne(t,s)}}}function hg(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=qe(l,a[d]);t=new zl({props:l}),n=new dg({props:{extraObjects:i[6]}});let c=i[3]&&uc(i);return{c(){ie(t.$$.fragment),e=se(),ie(n.$$.fragment),o=se(),c&&c.c(),s=Ee()},m(d,h){te(t,d,h),_(d,e,h),te(n,d,h),_(d,o,h),c&&c.m(d,h),_(d,s,h),r=!0},p(d,[h]){const u=h&20?nt(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=uc(d),c.c(),x(c,1),c.m(s.parentNode,s)):c&&(he(),L(c,1,1,()=>{c=null}),ue())},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){ne(t,d),d&&j(e),ne(n,d),d&&j(o),c&&c.d(d),d&&j(s)}}}function ug(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 fg extends de{constructor(t){super(),ce(this,t,ug,hg,le,{five:0,pxmm:1,floorIndex:2,hoverEnable:3,floorplanData:4,extraObjects:8,highlightData:5})}}function mg(i){me(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 fc(i){let t,e,n,o,s=i[7]!==0&&mc(i);return{c(){t=V("div"),s&&s.c(),w(t,"class","plugin-floorplan-radar svelte-1mvqyqq")},m(r,a){_(r,t,a),s&&s.m(t,null),e=!0,n||(o=[Wt(ei.call(null,t)),ke(t,"clientWidth",i[13]),ke(t,"clientHeight",i[14])],n=!0)},p(r,a){r[7]!==0?s?(s.p(r,a),a&128&&x(s,1)):(s=mc(r),s.c(),x(s,1),s.m(t,null)):s&&(he(),L(s,1,1,()=>{s=null}),ue())},i(r){e||(x(s),e=!0)},o(r){L(s),e=!1},d(r){r&&j(t),s&&s.d(),n=!1,et(o)}}}function mc(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=qe(c,l[u]);e=new fg({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=qe(h,d[u]);return o=new rg({props:h}),{c(){t=V("div"),ie(e.$$.fragment),n=se(),ie(o.$$.fragment),w(t,"class","plugin-floorplan-radar-container svelte-1mvqyqq"),z(t,"width",s),z(t,"height",r)},m(u,m){_(u,t,m),te(e,t,null),B(t,n),te(o,t,null),a=!0},p(u,m){const v=m&3181?nt(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?nt(d,[{pxmm:u[10],five:u[0],floorplanData:u[3],cameraImageUrl:u[4]}]):{};o.$set(g),m&512&&s!==(s=`${u[9]}px`)&&z(t,"width",s),m&4096&&r!==(r=`${u[12]}px`)&&z(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&&j(t),ne(e),ne(o)}}}function pg(i){let t,e,n=i[1]&&fc(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=fc(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function gg(i,t,e){var C,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=(C=n.work.observers[n.getCurrentState().panoIndex])==null?void 0:C.floorIndex)!=null?k:0,u=0,m=0,v=0,g=0;function A(S){e(11,h=n.work.observers[S].floorIndex)}kt(()=>(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:I,min:T}=r.bounding,D=I.x-T.x,X=I.y-T.y,J=function(){return D>X?[S,S/D*X]:[S/X*D,S]}();e(9,v=J[0]),e(12,g=J[1]),e(10,d=v/D)}},[n,o,s,r,a,l,c,u,m,v,d,h,g,b,y]}class vg extends de{constructor(t){super(),ce(this,t,gg,pg,le,{five:0,visible:1,hoverEnable:2,floorplanData:3,cameraImageUrl:4,extraObjects:5,highlightData:6},mg)}}let Ag=class extends yn{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:cn},s=n!=null&&n.configs?n.configs:{},r=N(N({},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 dn(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=Fp(e,this.five,this.data),this.render())}formatData(e){return Y(this,null,function*(){return yield dn(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=N(N({},this.state),e),!zt(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=Pe(N({},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 vg({target:this.wrapper,props:e})}};const bg=(i,t)=>new Ag(i,t),yg=[{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:"和室"}],wg=[{type:0,description:"木质地板"},{type:1,description:"瓷砖地面"},{type:2,description:"户外地面"},{type:3,description:"卫生间地面"},{type:4,description:"阳台地面"},{type:5,description:"车库地面"}],Pg=[{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:"写字楼"}],rr=(i,t,e)=>{const n=new E.Matrix4,o=new E.Euler(i,t,e,"YXZ");return n.makeRotationFromEuler(o),n},Cg=(i,{scale:t,rotation:e,position:n})=>{if(t&&i.scale.set(t,t,t),e){const[o,s,r]=e;o&&i.applyMatrix4(rr(o,0,0)),s&&i.applyMatrix4(rr(0,s,0)),r&&i.applyMatrix4(rr(0,0,r))}return n&&i.position.set(n.x,n.y,n.z),i};function pc(i,t){i.traverse(e=>{var n;if(e.type==="Mesh"){const o=e,s=N({map:o.material.map||{}},t);o.material=new O.MeshBasicMaterial(s),o.renderOrder=1,((n=e.parent)==null?void 0:n.type)==="Mesh"&&(e.renderOrder=e.parent.renderOrder+1)}})}const Ig=(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(this,null,function*(){var R;const u=(h==null?void 0:h.fbx_url)||e,m=(R=h==null?void 0:h.north_rad)!=null?R: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),C=yield new co.FBXLoader().loadAsync(u);pc(C,{transparent:!0,side:E.DoubleSide,blending:E.AdditiveBlending});const k=[0,m-Math.PI/2,0],{model:{bounding:{max:{x:S,z:I},min:{x:T,y:D,z:X}}}}=i;o.yBase=D;const J={x:(S+T)/2,y:D-1.6,z:(I+X)/2},G=.0045*b;return Cg(C,{position:J,rotation:k,scale:G}),o.object=C,!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 Eg(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 O.CanvasTexture(a)}const kg=({x:i,y:t,z:e})=>new O.Vector3(i,t,e),xg=(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(this,null,function*(){var J,G,R,F,Q,W,q,U;const C=(J=y==null?void 0:y.position)!=null?J:o;if(!C)return Promise.reject(new Error("ModelEntryDoorGuidePlugin.load(): position is undefined"));const k=kg(C),S=(G=y==null?void 0:y.rad)!=null?G:s,I=(R=y==null?void 0:y.fbx_url)!=null?R:r;if(e.rad=S,S===void 0)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): rad is ${S}`));const T=yield new co.FBXLoader().loadAsync(I);T.position.copy(k),T.rotation.z=S,T.scale.set(.8,.8,.8),pc(T,{transparent:!0,side:E.DoubleSide});const D=(q=(W=(Q=(F=T.children)==null?void 0:F[0])==null?void 0:Q.children)==null?void 0:W[3])==null?void 0:q.clone();if(!D)return Promise.reject(new Error(`ModelEntryDoorGuidePlugin.load(): textMesh is ${D}`));const X=(U=t.name)!=null?U:"入户门";return D.material=new O.MeshBasicMaterial({transparent:!0,map:Eg(X)}),D.renderOrder=3,T.children[0].add(D),e.object=T,!0}),c=()=>{if(e.animation)return;if(!e.object)return console.error("ModelEntryDoorGuidePlugin.initAnimation(): state.object is ",e.object);const y=1,C=new O.AnimationMixer(e.object);a.push(C);const k=C.clipAction(e.object.animations[0]);k.timeScale=y;let S;const I=()=>{let J=0,G=0;const R=1e3/30,F=Q=>{J=requestAnimationFrame(F);const W=Q-G;W<R||(G=Q,a.forEach(q=>q.update(W/1e3)),i.needsRender=!0)};return J=requestAnimationFrame(F),()=>{cancelAnimationFrame(J)}},X={play:()=>{S||(k.play(),S=I(),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)}},Dg=Ct;function Mg(i,t,e,n=Dg.Linear.None){const o=new mo(i).to(t,e).easing(n);wo(()=>o.start(0));const s=Si(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 Sg(i,t){return Mg({progress:0},{progress:1},i,t)}var gc=(i=>(i.Move="Move",i.Rotate="Rotate",i))(gc||{}),jt=(i=>(i.Clockwise="Clockwise",i.Anticlockwise="Anticlockwise",i.Loop="Loop",i))(jt||{});const Go=Math.PI*2;function vc(i){return(i%Go+Go)%Go}function Ac(i){return i%Go}function ar(i,t,e){return i+(t-i)*e}const lr=(i,t,e)=>{const n=Math.PI,o=n*2;let s=vc(i),r=vc(t);return e===jt.Anticlockwise&&s<r&&(s+=o),e===jt.Clockwise&&r<s&&(r+=o),e===jt.Loop&&r-s>n?lr(s,r,jt.Anticlockwise):e===jt.Loop&&s-r>n?lr(s,r,jt.Clockwise):{from:s,to:r}},Lg=i=>{const t={},e=(l,c,...d)=>Y(this,[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,N({duration:r,moveEndCallback:()=>h(!0),moveCancelCallback:()=>u(new Error("move canceled"))},s)):u(new Error("unexpected error"))})}),n=s=>{const r=i.state,a=Ac(r.latitude),l=Ac(s.latitude),{from:c,to:d}=lr(r.longitude,s.longitude,s.rotation||jt.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(this,[l,c,...d],function*(s,r,a={}){t.interruptCallback&&t.interruptCallback(!1),a.asyncStartCallback&&(yield a.asyncStartCallback()),i.currentMode!==ve.Five.Mode.Panorama&&(yield i.changeMode(ve.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:C})=>{const k={};k.longitude=ar(h.longitude,u.longitude,C),k.latitude=ar(h.latitude,u.latitude,C),k.fov=ar(h.fov,u.fov,C),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=Sg(b,Ct.Linear.None).onUpdate(v).onComplete(g).onDestroy(A);s.rotation===jt.Loop&&y.repeat(1/0).yoyo(!0),t.interruptCallback=(C=!0)=>{y.destroy(),t.interruptCallback=void 0,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=void 0),m(C)},t.timeoutId=setTimeout(()=>{t.interruptCallback&&t.interruptCallback(!0)},r)})})}};function bc(i,t){return i.x===t.x&&i.y===t.y}function yc(i,t){return Math.abs(i)===1/0&&Math.abs(t)===1/0?!0:Math.abs(i-t)<.001}function Fo(i,t){return(t.y-i.y)/(t.x-i.x)}function wc(i,t,e){const n=Fo(i[1],i[0]),o=Fo(t[1],t[0]);if(isNaN(n)||isNaN(o)||yc(n,o))return!1;if(Wo(i[0],t))return i[0];if(Wo(i[1],t))return i[1];if(Wo(t[0],i))return t[0];if(Wo(t[1],i))return t[1];if(e&&!Tg(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 Wo(i,t){return bc(i,t[0])||bc(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&&yc(Fo(t[0],i),Fo(i,t[1]))}function No(i,t,e){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)}function Tg(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)&&No(t[0],i[1],i[0])*No(i[1],t[1],i[0])>0&&No(i[0],t[1],t[0])*No(t[1],i[1],t[0])>0?1:0}function Pc(i,t=0){t<=0?requestAnimationFrame(i):requestAnimationFrame(()=>Pc(i,t-1))}const zg=`<style type="text/css">
195
195
  .PanoRulerPlugin-rule-line {
196
196
  position: absolute;
197
197
  transform-origin: left center;
@@ -578,7 +578,7 @@ void main() {
578
578
  ${i[7]?"transform: translate(-50%, -50%); left: 50%; top: 50%;":""}
579
579
  `))&&w(t,"style",e);const l=a&8160;(l||a&8168)&&z(t,"width",Pt(i[3])),(l||a&8176)&&z(t,"height",Pt(i[4])),(l||a&16352)&&z(t,"z-index",i[13])},i(r){s||(r&&tt(()=>{s&&(o&&o.end(1),n=An(t,bn,{duration:i[0]}),n.start())}),s=!0)},o(r){n&&n.invalidate(),r&&(o=Kn(t,bn,{duration:i[1]})),s=!1},d(r){r&&j(t),r&&o&&o.end()}}}function ZA(i){let t,e=i[2]&&Pd(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),_(n,t,o)},p(n,[o]){n[2]?e?(e.p(n,o),o&4&&x(e,1)):(e=Pd(n),e.c(),x(e,1),e.m(t.parentNode,t)):e&&(he(),L(e,1,1,()=>{e=null}),ue())},i(n){x(e)},o(n){L(e)},d(n){e&&e.d(n),n&&j(t)}}}function Pt(i){return typeof i=="number"?i/16+"rem":i}function KA(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 Vt extends de{constructor(t){super(),ce(this,t,KA,ZA,le,{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},JA)}}function $A(){return Math.random().toString(36).slice(-6)}const Er=$A();function eb(i){me(i,"svelte-1b2n9wi",".text-char.svelte-1b2n9wi{display:inline-block;text-shadow:0.125rem 0rem 0.5rem rgba(0, 0, 0, 0.15)}")}function Cd(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 tb(i){let t,e=i[0]+"",n,o=i[20];const s=()=>i[9](t,o),r=()=>i[9](null,o);return{c(){t=V("span"),n=Be(e),w(t,"class","text-char svelte-1b2n9wi")},m(a,l){_(a,t,l),B(t,n),s()},p(a,l){i=a,l&4&&e!==(e=i[0]+"")&&Re(n,e),o!==i[20]&&(r(),o=i[20],s())},d(a){a&&j(t),r()}}}function nb(i){let t,e=i[20];const n=()=>i[8](t,e),o=()=>i[8](null,e);return{c(){t=V("span"),t.textContent=" ",w(t,"class","text-char svelte-1b2n9wi")},m(s,r){_(s,t,r),n()},p(s,r){i=s,e!==i[20]&&(o(),e=i[20],n())},d(s){s&&j(t),o()}}}function Id(i,t){let e,n;function o(a,l){return a[0]===a[3]?nb:tb}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){_(a,e,l),r.m(a,l),_(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&&j(e),r.d(a),a&&j(n)}}}function ib(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=Cd(i,o,r),l=s(a);e.set(l,t[r]=Id(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);_(r,n,a)},p(r,[a]){a&14&&(o=r[2],t=xt(t,a,s,1,r,o,e,n.parentNode,Us,Id,n,Cd))},i:K,o:K,d(r){for(let a=0;a<t.length;a+=1)t[a].d(r);r&&j(n)}}}function ob(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_${Er}__`,d=`__EMOJI_${Er}__`,h=`__SPACE_${Er}__`;let u,m,v=[];function g(S){const I=[],T=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(T,D=>`${c}${d}${D}${c}`).split(c).forEach(D=>D.startsWith(d)?I.push({id:lt(),content:D.slice(d.length)}):I.push(...D.split("").map(X=>X===" "?h:X).map(X=>({id:lt(),content:X})))),I}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 I=function(){const T=SA(D=>S[D].getBoundingClientRect().x,[Math.min(S.length-1,10),Math.min(S.length-1,30)]);if(T>0)return T}();m=_n({targets:S.slice(0,I).filter(Gn),autoplay:!1,duration:400,scale:[.7,1],rotate:[20,0],opacity:[0,1],translateX:[4,0],translateY:[10,0],delay:_n.stagger(50),easing:"easeInOutCubic"}),a&&m.seek(m.duration)}function C(S,I){Je[S?"unshift":"push"](()=>{v[I]=S,e(1,v)})}function k(S,I){Je[S?"unshift":"push"](()=>{v[I]=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,C,k]}class Ed extends de{constructor(t){super(),ce(this,t,ob,ib,le,{inDelay:5,outDelay:6,content:0,unfolded:7,isFistUnfoldedUpdate:4},eb)}}function sb(i){me(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 kd(i){let t,e,n,o,s,r,a,l,c,d;return e=new Vt({props:{center:!0,blurRadius:9,spreadRadius:3}}),{c(){t=V("div"),ie(e.$$.fragment),n=se(),o=V("div"),w(o,"class",s="arrow "+i[0]+" svelte-1ogmlqq"),z(o,"background-image","url("+RA+")"),w(t,"class","arrow-wrapper svelte-1ogmlqq")},m(h,u){_(h,t,u),te(e,t,null),B(t,n),B(t,o),l=!0,c||(d=ke(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&&tt(()=>{l&&(a&&a.end(1),r=An(o,bn,{duration:i[2],delay:i[3],easing:ni}),r.start())}),l=!0)},o(h){L(e.$$.fragment,h),r&&r.invalidate(),h&&(a=Kn(o,bn,{duration:i[2],delay:i[4],easing:ni})),l=!1},d(h){h&&j(t),ne(e),h&&a&&a.end(),c=!1,d()}}}function rb(i){let t,e,n=i[1]&&kd(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[1]?n?(n.p(o,s),s&2&&x(n,1)):(n=kd(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function ab(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){Un.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 lb=class extends de{constructor(t){super(),ce(this,t,ab,rb,le,{direction:0,visible:1,duration:2,inDelay:3,outDelay:4},sb)}};function cb(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 db(i){me(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 xd(i){let t,e,n;return e=new Ed({props:{unfolded:i[0],content:i[1],inDelay:500,outDelay:i[5]}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","text svelte-1fuzm7v"),z(t,"transform",i[7])},m(o,s){_(o,t,s),te(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&&z(t,"transform",o[7])},i(o){n||(x(e.$$.fragment,o),n=!0)},o(o){L(e.$$.fragment,o),n=!1},d(o){o&&j(t),ne(e),i[10](null)}}}function Dd(i){let t,e,n;return e=new lb({props:{direction:i[6],visible:i[0],inDelay:600,duration:1e3}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","arrow svelte-1fuzm7v")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function hb(i){let t,e,n,o=i[1]&&xd(i),s=i[3]<i[4]&&Dd(i);return{c(){o&&o.c(),t=se(),s&&s.c(),e=Ee()},m(r,a){o&&o.m(r,a),_(r,t,a),s&&s.m(r,a),_(r,e,a),n=!0},p(r,[a]){r[1]?o?(o.p(r,a),a&2&&x(o,1)):(o=xd(r),o.c(),x(o,1),o.m(t.parentNode,t)):o&&(he(),L(o,1,1,()=>{o=null}),ue()),r[3]<r[4]?s?(s.p(r,a),a&24&&x(s,1)):(s=Dd(r),s.c(),x(s,1),s.m(e.parentNode,e)):s&&(he(),L(s,1,1,()=>{s=null}),ue())},i(r){n||(x(o),x(s),n=!0)},o(r){L(o),L(s),n=!1},d(r){o&&o.d(r),r&&j(t),s&&s.d(r),r&&j(e)}}}function ub(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){Je[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),cb(()=>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 Md extends de{constructor(t){super(),ce(this,t,ub,hb,le,{visible:0,textUnfolded:8,content:1},db)}}function fb(i){me(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 Sd(i){var d,h;let t,e,n,o,s,r,a,l,c;return t=new Vt({props:{visible:i[2],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}}),n=new Ir({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 Md({props:{visible:i[2],textUnfolded:i[1],content:i[5]}}),{c(){ie(t.$$.fragment),e=se(),ie(n.$$.fragment),o=se(),s=V("div"),ie(r.$$.fragment),w(s,"class","content svelte-nlvd3x")},m(u,m){te(t,u,m),_(u,e,m),te(n,u,m),_(u,o,m),_(u,s,m),te(r,s,null),a=!0,l||(c=[Wt(ei.call(null,s)),ke(s,"clientWidth",i[8]),ke(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){ne(t,u),u&&j(e),ne(n,u),u&&j(o),u&&j(s),ne(r),l=!1,et(c)}}}function mb(i){let t,e,n=i[0].state&&Sd(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=Sd(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function pb(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 gb extends de{constructor(t){super(),ce(this,t,pb,mb,le,{tag:0},fb)}}function _t(i){return typeof i=="number"?i/16+"rem":i}function vb(i){me(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 Ab(i){let t;const e=i[6].default,n=Wn(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)&&Hn(n,e,o,o[5],t?Nn(e,o[5],s,null):Xn(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 bb(i){var s,r;let t,e,n=((s=i[3])==null?void 0:s.inputting)&&Ld(),o=((r=i[3])==null?void 0:r.placeholder)&&Td(i);return{c(){n&&n.c(),t=se(),o&&o.c(),e=Ee()},m(a,l){n&&n.m(a,l),_(a,t,l),o&&o.m(a,l),_(a,e,l)},p(a,l){var c,d;(c=a[3])!=null&&c.inputting?n||(n=Ld(),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=Td(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&&j(t),o&&o.d(a),a&&j(e)}}}function yb(i){let t;return{c(){t=Be(i[2])},m(e,n){_(e,t,n)},p(e,n){n&4&&Re(t,e[2])},i:K,o:K,d(e){e&&j(t)}}}function Ld(i){let t;return{c(){t=V("div"),w(t,"class","caret svelte-i9wdo4")},m(e,n){_(e,t,n)},d(e){e&&j(t)}}}function Td(i){let t,e=i[3].placeholder+"",n;return{c(){t=V("span"),n=Be(e),w(t,"class","placeholder svelte-i9wdo4")},m(o,s){_(o,t,s),B(t,n)},p(o,s){s&8&&e!==(e=o[3].placeholder+"")&&Re(n,e)},d(o){o&&j(t)}}}function wb(i){let t,e,n,o;const s=[yb,bb,Ab],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=V("div"),n.c(),w(t,"class","text svelte-i9wdo4"),z(t,"max-width",typeof i[1]=="number"?_t(i[1]):i[1]),z(t,"-webkit-line-clamp",i[0])},m(l,c){_(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):(he(),L(r[d],1,1,()=>{r[d]=null}),ue(),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&&z(t,"max-width",typeof l[1]=="number"?_t(l[1]):l[1]),c&1&&z(t,"-webkit-line-clamp",l[0])},i(l){o||(x(n),o=!0)},o(l){L(n),o=!1},d(l){l&&j(t),r[e].d()}}}function Pb(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 kr extends de{constructor(t){super(),ce(this,t,Pb,wb,le,{maxLine:0,maxWidth:1,text:2,edit:3},vb)}}function Cb(i){me(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 zd(i){var h,u;let t,e,n,o,s,r,a,l,c;t=new Ir({props:{unfolded:i[1],direction:"vertical",length:15,duration:500,inDelay:200,useLinearColor:!0}}),a=new kr({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))&&jd(i);return{c(){ie(t.$$.fragment),e=se(),n=V("div"),o=V("div"),s=V("div"),r=V("div"),ie(a.$$.fragment),l=se(),d&&d.c(),w(r,"class","title svelte-1oxrkr1"),w(s,"class","plane svelte-1oxrkr1"),w(o,"class","plane__wrapper svelte-1oxrkr1"),z(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){te(t,m,v),_(m,e,v),_(m,n,v),B(n,o),B(o,s),B(s,r),te(a,r,null),B(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=jd(m),d.c(),x(d,1),d.m(s,null)):d&&(he(),L(d,1,1,()=>{d=null}),ue()),v&2&&z(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){ne(t,m),m&&j(e),m&&j(n),ne(a),d&&d.d()}}}function jd(i){var o;let t,e,n;return e=new kr({props:{text:i[0].data.description,edit:(o=i[0].data.edit)==null?void 0:o.description,maxLine:3}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","description svelte-1oxrkr1")},m(s,r){_(s,t,r),te(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&&j(t),ne(e)}}}function Ib(i){let t,e,n=i[0].state&&zd(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=zd(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function Eb(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 kb extends de{constructor(t){super(),ce(this,t,Eb,Ib,le,{tag:0},Cb)}}function xb(i){let t,e;return t=new kb({props:{tag:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Db(i){let t,e;return t=new gb({props:{tag:i[0]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Mb(i){let t,e,n,o;const s=[Db,xb],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),_(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(he(),L(r[d],1,1,()=>{r[d]=null}),ue()),~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&&j(n)}}}function Sb(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 Lb extends de{constructor(t){super(),ce(this,t,Sb,Mb,le,{tag:0})}}function Tb(i){me(i,"svelte-blgtit",".line.svelte-blgtit{width:100%;height:100%;overflow:visible;pointer-events:none}")}function Vd(i){let t,e,n,o;return{c(){t=ze("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){_(s,t,r),o=!0},p(s,r){i=s},i(s){o||(s&&tt(()=>{o&&(n&&n.end(1),e=An(t,Bo,{duration:i[1],delay:i[0],easing:Sl}),e.start())}),o=!0)},o(s){e&&e.invalidate(),s&&(n=Kn(t,Bo,{duration:i[1],delay:i[2],easing:ni})),o=!1},d(s){s&&j(t),s&&n&&n.end()}}}function zb(i){let t,e,n,o,s,r=i[3]&&Vd(i);return{c(){t=ze("svg"),e=ze("defs"),n=ze("linearGradient"),o=ze("stop"),s=ze("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){_(a,t,l),B(t,e),B(e,n),B(n,o),B(n,s),r&&r.m(t,null)},p(a,[l]){a[3]?r?(r.p(a,l),l&8&&x(r,1)):(r=Vd(a),r.c(),x(r,1),r.m(t,null)):r&&(he(),L(r,1,1,()=>{r=null}),ue())},i(a){x(r)},o(a){L(r)},d(a){a&&j(t),r&&r.d()}}}function jb(i,t,e){let{inDelay:n=0}=t,{duration:o=1e3}=t,{outDelay:s=0}=t,{unfolded:r}=t;const a=lt();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 Vb extends de{constructor(t){super(),ce(this,t,jb,zb,le,{inDelay:0,duration:1,outDelay:2,unfolded:3},Tb)}}function _b(i){me(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 Ob(i){let t,e,n;return{c(){t=V("button"),w(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),$(t,"sc-carousel-dot__dot_active",i[0])},m(o,s){_(o,t,s),e||(n=ke(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&&j(t),e=!1,n()}}}function Bb(i,t,e){let{active:n=!1}=t;function o(s){Un.call(this,i,s)}return i.$$set=s=>{"active"in s&&e(0,n=s.active)},[n,o]}class Qb extends de{constructor(t){super(),ce(this,t,Bb,Ob,le,{active:0},_b)}}function Rb(i){me(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 _d(i,t,e){const n=i.slice();return n[5]=t[e],n[7]=e,n}function Od(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=V("div"),ie(n.$$.fragment),o=se(),w(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){_(a,e,l),te(n,e,null),B(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&&j(e),ne(n)}}}function Gb(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=_d(i,s,a),c=r(l);n.set(c,e[a]=Od(c,l))}return{c(){t=V("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){_(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]),he(),e=xt(e,l,r,1,a,s,n,t,an,Od,null,_d),ue())},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&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Fb(i,t,e){const n=Mo();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 Wb extends de{constructor(t){super(),ce(this,t,Fb,Gb,le,{pagesCount:0,currentPageIndex:1},Rb)}}const ci="prev",hn="next";function Nb(i){me(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 Hb(i){let t,e,n,o;return{c(){t=V("button"),e=V("i"),w(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),$(e,"sc-carousel-arrow__arrow-next",i[0]===hn),$(e,"sc-carousel-arrow__arrow-prev",i[0]===ci),w(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),$(t,"sc-carousel-arrow__circle_disabled",i[1])},m(s,r){_(s,t,r),B(t,e),n||(o=ke(t,"click",i[2]),n=!0)},p(s,[r]){r&1&&$(e,"sc-carousel-arrow__arrow-next",s[0]===hn),r&1&&$(e,"sc-carousel-arrow__arrow-prev",s[0]===ci),r&2&&$(t,"sc-carousel-arrow__circle_disabled",s[1])},i:K,o:K,d(s){s&&j(t),n=!1,o()}}}function Xb(i,t,e){let{direction:n=hn}=t,{disabled:o=!1}=t;function s(r){Un.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 Bd extends de{constructor(t){super(),ce(this,t,Xb,Hb,le,{direction:0,disabled:1},Nb)}}function Yb(i){me(i,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function Ub(i){let t;return{c(){t=V("div"),w(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),z(t,"width",i[0]+"%")},m(e,n){_(e,t,n)},p(e,[n]){n&1&&z(t,"width",e[0]+"%")},i:K,o:K,d(e){e&&j(t)}}}const Qd=100;function qb(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*Qd,0),Qd))},[n,o]}class Jb extends de{constructor(t){super(),ce(this,t,qb,Ub,le,{value:1},Yb)}}function Zb(i,t){i.addEventListener("mousedown",t),i.addEventListener("touchstart",t,{passive:!0})}function Kb(i,t){i.removeEventListener("mousedown",t),i.removeEventListener("touchstart",t)}function $b(i,t){i.addEventListener("mouseup",t),i.addEventListener("touchend",t)}function Rd(i,t){i.removeEventListener("mouseup",t),i.removeEventListener("touchend",t)}function e1(i,t){i.addEventListener("mousemove",t),i.addEventListener("touchmove",t)}function Gd(i,t){i.removeEventListener("mousemove",t),i.removeEventListener("touchmove",t)}function xr(i){return function(t,e){i.dispatchEvent(new CustomEvent(t,{detail:e}))}}const t1=110,n1=9,i1=111,o1=20;function Dr(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 s1(i,{thresholdProvider:t}){const e=xr(i);let n,o,s=0,r,a=!1;function l(){return Date.now()-r>=i1&&Math.abs(s)>=o1}function c(u){r=Date.now(),s=0,a=!0;const m=Dr(u);n=m.x,o=m.y,e("swipeStart",{x:n,y:o}),e1(window,d),$b(window,h)}function d(u){if(!a)return;const m=Dr(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?ci:hn}),Rd(window,h),Gd(window,d))}function h(u){if(Rd(window,h),Gd(window,d),a=!1,!l()){e("swipeFailed");return}const m=Dr(u);e("swipeEnd",{x:m.x,y:m.y})}return Zb(i,c),{destroy(){Kb(i,c)}}}function r1(i,t){i.addEventListener("mouseenter",t)}function a1(i,t){i.removeEventListener("mouseenter",t)}function l1(i,t){i.addEventListener("mouseleave",t)}function Fd(i,t){i.removeEventListener("mouseleave",t)}function c1(i){const t=xr(i);function e(){l1(i,n),t("hovered",{value:!0})}function n(){t("hovered",{value:!1}),Fd(i,n)}return r1(i,e),{destroy(){a1(i,e),Fd(i,n)}}}const d1=(i,t)=>{const e=t.x-i.x,n=t.y-i.y;return Math.sqrt(e*e+n*n)};function di(i,t,e){return Math.max(i,Math.min(t,e))}function h1(i,t){i.addEventListener("touchstart",t,{passive:!0})}function u1(i,t){i.removeEventListener("touchstart",t)}function f1(i,t){i.addEventListener("touchend",t)}function Wd(i,t){i.removeEventListener("touchend",t)}function m1(i){const t=xr(i);let e=0,n={x:0,y:0};function o({tapEndedAt:a,tapEndedPos:l}){const c=a-e,d=d1(n,l);return c<=t1&&d<=n1}function s(a){e=Date.now();const l=a.touches[0];n={x:l.clientX,y:l.clientY},f1(i,r)}function r(a){Wd(i,r);const l=a.changedTouches[0];o({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return h1(i,s),{destroy(){u1(i,s),Wd(i,r)}}}function p1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:o}){return i===t-e?0:i===0?Nd({particlesCountWithoutClones:t-n,particlesToScroll:o})-1:Math.floor((i-e)/o)}function g1({currentParticleIndex:i,particlesToScroll:t}){return Math.ceil(i/t)}function v1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,infinite:o,particlesToScroll:s}){return o?p1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:s}):g1({currentParticleIndex:i,particlesToScroll:s})}function Nd({particlesCountWithoutClones:i,particlesToScroll:t}){return Math.ceil(i/t)}function A1({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e}){const n=Hd({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e});return Math.ceil(i/t)-n}function b1({infinite:i,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n}){return i?Nd({particlesCountWithoutClones:t,particlesToScroll:e}):A1({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n})}function y1({pageIndex:i,clonesCountHead:t,clonesCountTail:e,particlesToScroll:n,particlesCount:o}){return di(0,Math.min(t+i*n,o-e),o-1)}function w1({pageIndex:i,particlesToScroll:t,particlesCount:e,particlesToShow:n}){return di(0,Math.min(i*t,e-n),e-1)}function Mr({infinite:i,pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s,particlesToShow:r}){return i?y1({pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s}):w1({pageIndex:t,particlesToScroll:o,particlesCount:s,particlesToShow:r})}function P1({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 Hd({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 C1(i){return new ResizeObserver(t=>{i({width:t[0].contentRect.width})})}function I1({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 E1({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 k1({infinite:i,particlesToShow:t,partialPageSize:e}){const n=i?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return Pe(N({},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},Sr=i=>t=>{i[t]&&i[t]()};var x1="Expected a function",Xd="__lodash_hash_undefined__",Yd=1/0,D1="[object Function]",M1="[object GeneratorFunction]",S1="[object Symbol]",L1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T1=/^\w*$/,z1=/^\./,j1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V1=/[\\^$.*+?()[\]{}|]/g,_1=/\\(\\)?/g,O1=/^\[object .+?Constructor\]$/,B1=typeof wt=="object"&&wt&&wt.Object===Object&&wt,Q1=typeof self=="object"&&self&&self.Object===Object&&self,Lr=B1||Q1||Function("return this")();function R1(i,t){return i==null?void 0:i[t]}function G1(i){var t=!1;if(i!=null&&typeof i.toString!="function")try{t=!!(i+"")}catch(e){}return t}var F1=Array.prototype,W1=Function.prototype,Ud=Object.prototype,Tr=Lr["__core-js_shared__"],qd=function(){var i=/[^.]+$/.exec(Tr&&Tr.keys&&Tr.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Jd=W1.toString,zr=Ud.hasOwnProperty,Zd=Ud.toString,N1=RegExp("^"+Jd.call(zr).replace(V1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kd=Lr.Symbol,H1=F1.splice,X1=th(Lr,"Map"),Ni=th(Object,"create"),$d=Kd?Kd.prototype:void 0,eh=$d?$d.toString:void 0;function En(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 Y1(){this.__data__=Ni?Ni(null):{}}function U1(i){return this.has(i)&&delete this.__data__[i]}function q1(i){var t=this.__data__;if(Ni){var e=t[i];return e===Xd?void 0:e}return zr.call(t,i)?t[i]:void 0}function J1(i){var t=this.__data__;return Ni?t[i]!==void 0:zr.call(t,i)}function Z1(i,t){var e=this.__data__;return e[i]=Ni&&t===void 0?Xd:t,this}En.prototype.clear=Y1,En.prototype.delete=U1,En.prototype.get=q1,En.prototype.has=J1,En.prototype.set=Z1;function hi(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 K1(){this.__data__=[]}function $1(i){var t=this.__data__,e=is(t,i);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():H1.call(t,e,1),!0}function ey(i){var t=this.__data__,e=is(t,i);return e<0?void 0:t[e][1]}function ty(i){return is(this.__data__,i)>-1}function ny(i,t){var e=this.__data__,n=is(e,i);return n<0?e.push([i,t]):e[n][1]=t,this}hi.prototype.clear=K1,hi.prototype.delete=$1,hi.prototype.get=ey,hi.prototype.has=ty,hi.prototype.set=ny;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__={hash:new En,map:new(X1||hi),string:new En}}function oy(i){return os(this,i).delete(i)}function sy(i){return os(this,i).get(i)}function ry(i){return os(this,i).has(i)}function ay(i,t){return os(this,i).set(i,t),this}kn.prototype.clear=iy,kn.prototype.delete=oy,kn.prototype.get=sy,kn.prototype.has=ry,kn.prototype.set=ay;function is(i,t){for(var e=i.length;e--;)if(Ay(i[e][0],t))return e;return-1}function ly(i,t){t=uy(t,i)?[t]:hy(t);for(var e=0,n=t.length;i!=null&&e<n;)i=i[gy(t[e++])];return e&&e==n?i:void 0}function cy(i){if(!ih(i)||my(i))return!1;var t=by(i)||G1(i)?N1:O1;return t.test(vy(i))}function dy(i){if(typeof i=="string")return i;if(Vr(i))return eh?eh.call(i):"";var t=i+"";return t=="0"&&1/i==-Yd?"-0":t}function hy(i){return nh(i)?i:py(i)}function os(i,t){var e=i.__data__;return fy(t)?e[typeof t=="string"?"string":"hash"]:e.map}function th(i,t){var e=R1(i,t);return cy(e)?e:void 0}function uy(i,t){if(nh(i))return!1;var e=typeof i;return e=="number"||e=="symbol"||e=="boolean"||i==null||Vr(i)?!0:T1.test(i)||!L1.test(i)||t!=null&&i in Object(t)}function fy(i){var t=typeof i;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?i!=="__proto__":i===null}function my(i){return!!qd&&qd in i}var py=jr(function(i){i=wy(i);var t=[];return z1.test(i)&&t.push(""),i.replace(j1,function(e,n,o,s){t.push(o?s.replace(_1,"$1"):n||e)}),t});function gy(i){if(typeof i=="string"||Vr(i))return i;var t=i+"";return t=="0"&&1/i==-Yd?"-0":t}function vy(i){if(i!=null){try{return Jd.call(i)}catch(t){}try{return i+""}catch(t){}}return""}function jr(i,t){if(typeof i!="function"||t&&typeof t!="function")throw new TypeError(x1);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(jr.Cache||kn),e}jr.Cache=kn;function Ay(i,t){return i===t||i!==i&&t!==t}var nh=Array.isArray;function by(i){var t=ih(i)?Zd.call(i):"";return t==D1||t==M1}function ih(i){var t=typeof i;return!!i&&(t=="object"||t=="function")}function yy(i){return!!i&&typeof i=="object"}function Vr(i){return typeof i=="symbol"||yy(i)&&Zd.call(i)==S1}function wy(i){return i==null?"":dy(i)}function Py(i,t,e){var n=i==null?void 0:ly(i,t);return n===void 0?e:n}var ss=Py,rs={},Cy={get exports(){return rs},set exports(i){rs=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]",C="[object Symbol]",k="[object WeakMap]",S="[object ArrayBuffer]",I="[object DataView]",T="[object Float32Array]",D="[object Float64Array]",X="[object Int8Array]",J="[object Int16Array]",G="[object Int32Array]",R="[object Uint8Array]",F="[object Uint8ClampedArray]",Q="[object Uint16Array]",W="[object Uint32Array]",q=/[\\^$.*+?()[\]{}|]/g,U=/\w*$/,Z=/^\[object .+?Constructor\]$/,ae=/^(?:0|[1-9]\d*)$/,oe={};oe[s]=oe[r]=oe[S]=oe[I]=oe[a]=oe[l]=oe[T]=oe[D]=oe[X]=oe[J]=oe[G]=oe[u]=oe[m]=oe[v]=oe[A]=oe[b]=oe[y]=oe[C]=oe[R]=oe[F]=oe[Q]=oe[W]=!0,oe[c]=oe[d]=oe[k]=!1;var ye=typeof wt=="object"&&wt&&wt.Object===Object&&wt,Ce=typeof self=="object"&&self&&self.Object===Object&&self,Ae=ye||Ce||Function("return this")(),Ve=t&&!t.nodeType&&t,be=Ve&&!0&&i&&!i.nodeType&&i,Ne=be&&be.exports===Ve;function fe(p,P){return p.set(P[0],P[1]),p}function we(p,P){return p.add(P),p}function Te(p,P){for(var M=-1,H=p?p.length:0;++M<H&&P(p[M],M,p)!==!1;);return p}function pe(p,P){for(var M=-1,H=P.length,Ie=p.length;++M<H;)p[Ie+M]=P[M];return p}function Ze(p,P,M,H){var Ie=-1,ge=p?p.length:0;for(H&&ge&&(M=p[++Ie]);++Ie<ge;)M=P(M,p[Ie],Ie,p);return M}function dt(p,P){for(var M=-1,H=Array(p);++M<p;)H[M]=P(M);return H}function De(p,P){return p==null?void 0:p[P]}function ot(p){var P=!1;if(p!=null&&typeof p.toString!="function")try{P=!!(p+"")}catch(M){}return P}function re(p){var P=-1,M=Array(p.size);return p.forEach(function(H,Ie){M[++P]=[Ie,H]}),M}function xe(p,P){return function(M){return p(P(M))}}function Fe(p){var P=-1,M=Array(p.size);return p.forEach(function(H){M[++P]=H}),M}var ft=Array.prototype,Yt=Function.prototype,At=Object.prototype,bt=Ae["__core-js_shared__"],_e=function(){var p=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),Qe=Yt.toString,Ue=At.hasOwnProperty,Mt=At.toString,Ui=RegExp("^"+Qe.call(Ue).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ot=Ne?Ae.Buffer:void 0,fn=Ae.Symbol,Dn=Ae.Uint8Array,mt=xe(Object.getPrototypeOf,Object),mi=Object.create,pi=At.propertyIsEnumerable,Ur=ft.splice,qi=Object.getOwnPropertySymbols,gi=Ot?Ot.isBuffer:void 0,ps=xe(Object.keys,Object),vi=Lt(Ae,"DataView"),Mn=Lt(Ae,"Map"),St=Lt(Ae,"Promise"),Ai=Lt(Ae,"Set"),Ji=Lt(Ae,"WeakMap"),Sn=Lt(Object,"create"),Zi=ht(vi),Ln=ht(Mn),Ki=ht(St),$i=ht(Ai),eo=ht(Ji),mn=fn?fn.prototype:void 0,gs=mn?mn.valueOf:void 0;function Ut(p){var P=-1,M=p?p.length:0;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function qr(){this.__data__=Sn?Sn(null):{}}function Jr(p){return this.has(p)&&delete this.__data__[p]}function Zr(p){var P=this.__data__;if(Sn){var M=P[p];return M===n?void 0:M}return Ue.call(P,p)?P[p]:void 0}function vs(p){var P=this.__data__;return Sn?P[p]!==void 0:Ue.call(P,p)}function to(p,P){var M=this.__data__;return M[p]=Sn&&P===void 0?n:P,this}Ut.prototype.clear=qr,Ut.prototype.delete=Jr,Ut.prototype.get=Zr,Ut.prototype.has=vs,Ut.prototype.set=to;function Ke(p){var P=-1,M=p?p.length:0;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function Kr(){this.__data__=[]}function $r(p){var P=this.__data__,M=yi(P,p);if(M<0)return!1;var H=P.length-1;return M==H?P.pop():Ur.call(P,M,1),!0}function ea(p){var P=this.__data__,M=yi(P,p);return M<0?void 0:P[M][1]}function ta(p){return yi(this.__data__,p)>-1}function na(p,P){var M=this.__data__,H=yi(M,p);return H<0?M.push([p,P]):M[H][1]=P,this}Ke.prototype.clear=Kr,Ke.prototype.delete=$r,Ke.prototype.get=ea,Ke.prototype.has=ta,Ke.prototype.set=na;function st(p){var P=-1,M=p?p.length:0;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function ia(){this.__data__={hash:new Ut,map:new(Mn||Ke),string:new Ut}}function oa(p){return zn(this,p).delete(p)}function sa(p){return zn(this,p).get(p)}function ra(p){return zn(this,p).has(p)}function aa(p,P){return zn(this,p).set(p,P),this}st.prototype.clear=ia,st.prototype.delete=oa,st.prototype.get=sa,st.prototype.has=ra,st.prototype.set=aa;function pt(p){this.__data__=new Ke(p)}function la(){this.__data__=new Ke}function ca(p){return this.__data__.delete(p)}function da(p){return this.__data__.get(p)}function ha(p){return this.__data__.has(p)}function ua(p,P){var M=this.__data__;if(M instanceof Ke){var H=M.__data__;if(!Mn||H.length<e-1)return H.push([p,P]),this;M=this.__data__=new st(H)}return M.set(p,P),this}pt.prototype.clear=la,pt.prototype.delete=ca,pt.prototype.get=da,pt.prototype.has=ha,pt.prototype.set=ua;function bi(p,P){var M=so(p)||Pi(p)?dt(p.length,String):[],H=M.length,Ie=!!H;for(var ge in p)(P||Ue.call(p,ge))&&!(Ie&&(ge=="length"||ka(ge,H)))&&M.push(ge);return M}function As(p,P,M){var H=p[P];(!(Ue.call(p,P)&&Cs(H,M))||M===void 0&&!(P in p))&&(p[P]=M)}function yi(p,P){for(var M=p.length;M--;)if(Cs(p[M][0],P))return M;return-1}function Bt(p,P){return p&&oo(P,ao(P),p)}function no(p,P,M,H,Ie,ge,Me){var Le;if(H&&(Le=ge?H(p,Ie,ge,Me):H(p)),Le!==void 0)return Le;if(!Rt(p))return p;var He=so(p);if(He){if(Le=Ia(p),!P)return wa(p,Le)}else{var je=Jt(p),rt=je==d||je==h;if(Is(p))return wi(p,P);if(je==v||je==s||rt&&!ge){if(ot(p))return ge?p:{};if(Le=Qt(rt?{}:p),!P)return Pa(p,Bt(Le,p))}else{if(!oe[je])return ge?p:{};Le=Ea(p,je,no,P)}}Me||(Me=new pt);var gt=Me.get(p);if(gt)return gt;if(Me.set(p,Le),!He)var Xe=M?Ca(p):ao(p);return Te(Xe||p,function(at,$e){Xe&&($e=at,at=p[$e]),As(Le,$e,no(at,P,M,H,$e,p,Me))}),Le}function fa(p){return Rt(p)?mi(p):{}}function ma(p,P,M){var H=P(p);return so(p)?H:pe(H,M(p))}function pa(p){return Mt.call(p)}function ga(p){if(!Rt(p)||Da(p))return!1;var P=ro(p)||ot(p)?Ui:Z;return P.test(ht(p))}function va(p){if(!ws(p))return ps(p);var P=[];for(var M in Object(p))Ue.call(p,M)&&M!="constructor"&&P.push(M);return P}function wi(p,P){if(P)return p.slice();var M=new p.constructor(p.length);return p.copy(M),M}function io(p){var P=new p.constructor(p.byteLength);return new Dn(P).set(new Dn(p)),P}function Tn(p,P){var M=P?io(p.buffer):p.buffer;return new p.constructor(M,p.byteOffset,p.byteLength)}function bs(p,P,M){var H=P?M(re(p),!0):re(p);return Ze(H,fe,new p.constructor)}function ys(p){var P=new p.constructor(p.source,U.exec(p));return P.lastIndex=p.lastIndex,P}function Aa(p,P,M){var H=P?M(Fe(p),!0):Fe(p);return Ze(H,we,new p.constructor)}function ba(p){return gs?Object(gs.call(p)):{}}function ya(p,P){var M=P?io(p.buffer):p.buffer;return new p.constructor(M,p.byteOffset,p.length)}function wa(p,P){var M=-1,H=p.length;for(P||(P=Array(H));++M<H;)P[M]=p[M];return P}function oo(p,P,M,H){M||(M={});for(var Ie=-1,ge=P.length;++Ie<ge;){var Me=P[Ie],Le=H?H(M[Me],p[Me],Me,M,p):void 0;As(M,Me,Le===void 0?p[Me]:Le)}return M}function Pa(p,P){return oo(p,qt(p),P)}function Ca(p){return ma(p,ao,qt)}function zn(p,P){var M=p.__data__;return xa(P)?M[typeof P=="string"?"string":"hash"]:M.map}function Lt(p,P){var M=De(p,P);return ga(M)?M:void 0}var qt=qi?xe(qi,Object):Sa,Jt=pa;(vi&&Jt(new vi(new ArrayBuffer(1)))!=I||Mn&&Jt(new Mn)!=u||St&&Jt(St.resolve())!=g||Ai&&Jt(new Ai)!=b||Ji&&Jt(new Ji)!=k)&&(Jt=function(p){var P=Mt.call(p),M=P==v?p.constructor:void 0,H=M?ht(M):void 0;if(H)switch(H){case Zi:return I;case Ln:return u;case Ki:return g;case $i:return b;case eo:return k}return P});function Ia(p){var P=p.length,M=p.constructor(P);return P&&typeof p[0]=="string"&&Ue.call(p,"index")&&(M.index=p.index,M.input=p.input),M}function Qt(p){return typeof p.constructor=="function"&&!ws(p)?fa(mt(p)):{}}function Ea(p,P,M,H){var Ie=p.constructor;switch(P){case S:return io(p);case a:case l:return new Ie(+p);case I:return Tn(p,H);case T:case D:case X:case J:case G:case R:case F:case Q:case W:return ya(p,H);case u:return bs(p,H,M);case m:case y:return new Ie(p);case A:return ys(p);case b:return Aa(p,H,M);case C:return ba(p)}}function ka(p,P){return P=P==null?o:P,!!P&&(typeof p=="number"||ae.test(p))&&p>-1&&p%1==0&&p<P}function xa(p){var P=typeof p;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?p!=="__proto__":p===null}function Da(p){return!!_e&&_e in p}function ws(p){var P=p&&p.constructor,M=typeof P=="function"&&P.prototype||At;return p===M}function ht(p){if(p!=null){try{return Qe.call(p)}catch(P){}try{return p+""}catch(P){}}return""}function Ps(p){return no(p,!0,!0)}function Cs(p,P){return p===P||p!==p&&P!==P}function Pi(p){return Ma(p)&&Ue.call(p,"callee")&&(!pi.call(p,"callee")||Mt.call(p)==s)}var so=Array.isArray;function Ci(p){return p!=null&&Es(p.length)&&!ro(p)}function Ma(p){return ks(p)&&Ci(p)}var Is=gi||La;function ro(p){var P=Rt(p)?Mt.call(p):"";return P==d||P==h}function Es(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=o}function Rt(p){var P=typeof p;return!!p&&(P=="object"||P=="function")}function ks(p){return!!p&&typeof p=="object"}function ao(p){return Ci(p)?bi(p):va(p)}function Sa(){return[]}function La(){return!1}i.exports=Ps})(Cy,rs);const Iy=rs;var as={},Ey={get exports(){return as},set exports(i){as=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]",C="[object Promise]",k="[object Proxy]",S="[object RegExp]",I="[object Set]",T="[object String]",D="[object Symbol]",X="[object Undefined]",J="[object WeakMap]",G="[object ArrayBuffer]",R="[object DataView]",F="[object Float32Array]",Q="[object Float64Array]",W="[object Int8Array]",q="[object Int16Array]",U="[object Int32Array]",Z="[object Uint8Array]",ae="[object Uint8ClampedArray]",oe="[object Uint16Array]",ye="[object Uint32Array]",Ce=/[\\^$.*+?()[\]{}|]/g,Ae=/^\[object .+?Constructor\]$/,Ve=/^(?:0|[1-9]\d*)$/,be={};be[F]=be[Q]=be[W]=be[q]=be[U]=be[Z]=be[ae]=be[oe]=be[ye]=!0,be[a]=be[l]=be[G]=be[d]=be[R]=be[h]=be[u]=be[m]=be[g]=be[A]=be[y]=be[S]=be[I]=be[T]=be[J]=!1;var Ne=typeof wt=="object"&&wt&&wt.Object===Object&&wt,fe=typeof self=="object"&&self&&self.Object===Object&&self,we=Ne||fe||Function("return this")(),Te=t&&!t.nodeType&&t,pe=Te&&!0&&i&&!i.nodeType&&i,Ze=pe&&pe.exports===Te,dt=Ze&&Ne.process,De=function(){try{return dt&&dt.binding&&dt.binding("util")}catch(p){}}(),ot=De&&De.isTypedArray;function re(p,P){for(var M=-1,H=p==null?0:p.length,Ie=0,ge=[];++M<H;){var Me=p[M];P(Me,M,p)&&(ge[Ie++]=Me)}return ge}function xe(p,P){for(var M=-1,H=P.length,Ie=p.length;++M<H;)p[Ie+M]=P[M];return p}function Fe(p,P){for(var M=-1,H=p==null?0:p.length;++M<H;)if(P(p[M],M,p))return!0;return!1}function ft(p,P){for(var M=-1,H=Array(p);++M<p;)H[M]=P(M);return H}function Yt(p){return function(P){return p(P)}}function At(p,P){return p.has(P)}function bt(p,P){return p==null?void 0:p[P]}function _e(p){var P=-1,M=Array(p.size);return p.forEach(function(H,Ie){M[++P]=[Ie,H]}),M}function Qe(p,P){return function(M){return p(P(M))}}function Ue(p){var P=-1,M=Array(p.size);return p.forEach(function(H){M[++P]=H}),M}var Mt=Array.prototype,Ui=Function.prototype,Ot=Object.prototype,fn=we["__core-js_shared__"],Dn=Ui.toString,mt=Ot.hasOwnProperty,mi=function(){var p=/[^.]+$/.exec(fn&&fn.keys&&fn.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),pi=Ot.toString,Ur=RegExp("^"+Dn.call(mt).replace(Ce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qi=Ze?we.Buffer:void 0,gi=we.Symbol,ps=we.Uint8Array,vi=Ot.propertyIsEnumerable,Mn=Mt.splice,St=gi?gi.toStringTag:void 0,Ai=Object.getOwnPropertySymbols,Ji=qi?qi.isBuffer:void 0,Sn=Qe(Object.keys,Object),Zi=qt(we,"DataView"),Ln=qt(we,"Map"),Ki=qt(we,"Promise"),$i=qt(we,"Set"),eo=qt(we,"WeakMap"),mn=qt(Object,"create"),gs=ht(Zi),Ut=ht(Ln),qr=ht(Ki),Jr=ht($i),Zr=ht(eo),vs=gi?gi.prototype:void 0,to=vs?vs.valueOf:void 0;function Ke(p){var P=-1,M=p==null?0:p.length;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function Kr(){this.__data__=mn?mn(null):{},this.size=0}function $r(p){var P=this.has(p)&&delete this.__data__[p];return this.size-=P?1:0,P}function ea(p){var P=this.__data__;if(mn){var M=P[p];return M===n?void 0:M}return mt.call(P,p)?P[p]:void 0}function ta(p){var P=this.__data__;return mn?P[p]!==void 0:mt.call(P,p)}function na(p,P){var M=this.__data__;return this.size+=this.has(p)?0:1,M[p]=mn&&P===void 0?n:P,this}Ke.prototype.clear=Kr,Ke.prototype.delete=$r,Ke.prototype.get=ea,Ke.prototype.has=ta,Ke.prototype.set=na;function st(p){var P=-1,M=p==null?0:p.length;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function ia(){this.__data__=[],this.size=0}function oa(p){var P=this.__data__,M=wi(P,p);if(M<0)return!1;var H=P.length-1;return M==H?P.pop():Mn.call(P,M,1),--this.size,!0}function sa(p){var P=this.__data__,M=wi(P,p);return M<0?void 0:P[M][1]}function ra(p){return wi(this.__data__,p)>-1}function aa(p,P){var M=this.__data__,H=wi(M,p);return H<0?(++this.size,M.push([p,P])):M[H][1]=P,this}st.prototype.clear=ia,st.prototype.delete=oa,st.prototype.get=sa,st.prototype.has=ra,st.prototype.set=aa;function pt(p){var P=-1,M=p==null?0:p.length;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function la(){this.size=0,this.__data__={hash:new Ke,map:new(Ln||st),string:new Ke}}function ca(p){var P=Lt(this,p).delete(p);return this.size-=P?1:0,P}function da(p){return Lt(this,p).get(p)}function ha(p){return Lt(this,p).has(p)}function ua(p,P){var M=Lt(this,p),H=M.size;return M.set(p,P),this.size+=M.size==H?0:1,this}pt.prototype.clear=la,pt.prototype.delete=ca,pt.prototype.get=da,pt.prototype.has=ha,pt.prototype.set=ua;function bi(p){var P=-1,M=p==null?0:p.length;for(this.__data__=new pt;++P<M;)this.add(p[P])}function As(p){return this.__data__.set(p,n),this}function yi(p){return this.__data__.has(p)}bi.prototype.add=bi.prototype.push=As,bi.prototype.has=yi;function Bt(p){var P=this.__data__=new st(p);this.size=P.size}function no(){this.__data__=new st,this.size=0}function fa(p){var P=this.__data__,M=P.delete(p);return this.size=P.size,M}function ma(p){return this.__data__.get(p)}function pa(p){return this.__data__.has(p)}function ga(p,P){var M=this.__data__;if(M instanceof st){var H=M.__data__;if(!Ln||H.length<e-1)return H.push([p,P]),this.size=++M.size,this;M=this.__data__=new pt(H)}return M.set(p,P),this.size=M.size,this}Bt.prototype.clear=no,Bt.prototype.delete=fa,Bt.prototype.get=ma,Bt.prototype.has=pa,Bt.prototype.set=ga;function va(p,P){var M=Pi(p),H=!M&&Cs(p),Ie=!M&&!H&&Ci(p),ge=!M&&!H&&!Ie&&ks(p),Me=M||H||Ie||ge,Le=Me?ft(p.length,String):[],He=Le.length;for(var je in p)(P||mt.call(p,je))&&!(Me&&(je=="length"||Ie&&(je=="offset"||je=="parent")||ge&&(je=="buffer"||je=="byteLength"||je=="byteOffset")||Ea(je,He)))&&Le.push(je);return Le}function wi(p,P){for(var M=p.length;M--;)if(Ps(p[M][0],P))return M;return-1}function io(p,P,M){var H=P(p);return Pi(p)?H:xe(H,M(p))}function Tn(p){return p==null?p===void 0?X:b:St&&St in Object(p)?Jt(p):ws(p)}function bs(p){return Rt(p)&&Tn(p)==a}function ys(p,P,M,H,Ie){return p===P?!0:p==null||P==null||!Rt(p)&&!Rt(P)?p!==p&&P!==P:Aa(p,P,M,H,ys,Ie)}function Aa(p,P,M,H,Ie,ge){var Me=Pi(p),Le=Pi(P),He=Me?l:Qt(p),je=Le?l:Qt(P);He=He==a?y:He,je=je==a?y:je;var rt=He==y,gt=je==y,Xe=He==je;if(Xe&&Ci(p)){if(!Ci(P))return!1;Me=!0,rt=!1}if(Xe&&!rt)return ge||(ge=new Bt),Me||ks(p)?oo(p,P,M,H,Ie,ge):Pa(p,P,He,M,H,Ie,ge);if(!(M&o)){var at=rt&&mt.call(p,"__wrapped__"),$e=gt&&mt.call(P,"__wrapped__");if(at||$e){var pn=at?p.value():p,Zt=$e?P.value():P;return ge||(ge=new Bt),Ie(pn,Zt,M,H,ge)}}return Xe?(ge||(ge=new Bt),Ca(p,P,M,H,Ie,ge)):!1}function ba(p){if(!Es(p)||xa(p))return!1;var P=Is(p)?Ur:Ae;return P.test(ht(p))}function ya(p){return Rt(p)&&ro(p.length)&&!!be[Tn(p)]}function wa(p){if(!Da(p))return Sn(p);var P=[];for(var M in Object(p))mt.call(p,M)&&M!="constructor"&&P.push(M);return P}function oo(p,P,M,H,Ie,ge){var Me=M&o,Le=p.length,He=P.length;if(Le!=He&&!(Me&&He>Le))return!1;var je=ge.get(p);if(je&&ge.get(P))return je==P;var rt=-1,gt=!0,Xe=M&s?new bi:void 0;for(ge.set(p,P),ge.set(P,p);++rt<Le;){var at=p[rt],$e=P[rt];if(H)var pn=Me?H($e,at,rt,P,p,ge):H(at,$e,rt,p,P,ge);if(pn!==void 0){if(pn)continue;gt=!1;break}if(Xe){if(!Fe(P,function(Zt,jn){if(!At(Xe,jn)&&(at===Zt||Ie(at,Zt,M,H,ge)))return Xe.push(jn)})){gt=!1;break}}else if(!(at===$e||Ie(at,$e,M,H,ge))){gt=!1;break}}return ge.delete(p),ge.delete(P),gt}function Pa(p,P,M,H,Ie,ge,Me){switch(M){case R:if(p.byteLength!=P.byteLength||p.byteOffset!=P.byteOffset)return!1;p=p.buffer,P=P.buffer;case G:return!(p.byteLength!=P.byteLength||!ge(new ps(p),new ps(P)));case d:case h:case A:return Ps(+p,+P);case u:return p.name==P.name&&p.message==P.message;case S:case T:return p==P+"";case g:var Le=_e;case I:var He=H&o;if(Le||(Le=Ue),p.size!=P.size&&!He)return!1;var je=Me.get(p);if(je)return je==P;H|=s,Me.set(p,P);var rt=oo(Le(p),Le(P),H,Ie,ge,Me);return Me.delete(p),rt;case D:if(to)return to.call(p)==to.call(P)}return!1}function Ca(p,P,M,H,Ie,ge){var Me=M&o,Le=zn(p),He=Le.length,je=zn(P),rt=je.length;if(He!=rt&&!Me)return!1;for(var gt=He;gt--;){var Xe=Le[gt];if(!(Me?Xe in P:mt.call(P,Xe)))return!1}var at=ge.get(p);if(at&&ge.get(P))return at==P;var $e=!0;ge.set(p,P),ge.set(P,p);for(var pn=Me;++gt<He;){Xe=Le[gt];var Zt=p[Xe],jn=P[Xe];if(H)var vu=Me?H(jn,Zt,Xe,P,p,ge):H(Zt,jn,Xe,p,P,ge);if(!(vu===void 0?Zt===jn||Ie(Zt,jn,M,H,ge):vu)){$e=!1;break}pn||(pn=Xe=="constructor")}if($e&&!pn){var xs=p.constructor,Ds=P.constructor;xs!=Ds&&"constructor"in p&&"constructor"in P&&!(typeof xs=="function"&&xs instanceof xs&&typeof Ds=="function"&&Ds instanceof Ds)&&($e=!1)}return ge.delete(p),ge.delete(P),$e}function zn(p){return io(p,ao,Ia)}function Lt(p,P){var M=p.__data__;return ka(P)?M[typeof P=="string"?"string":"hash"]:M.map}function qt(p,P){var M=bt(p,P);return ba(M)?M:void 0}function Jt(p){var P=mt.call(p,St),M=p[St];try{p[St]=void 0;var H=!0}catch(ge){}var Ie=pi.call(p);return H&&(P?p[St]=M:delete p[St]),Ie}var Ia=Ai?function(p){return p==null?[]:(p=Object(p),re(Ai(p),function(P){return vi.call(p,P)}))}:Sa,Qt=Tn;(Zi&&Qt(new Zi(new ArrayBuffer(1)))!=R||Ln&&Qt(new Ln)!=g||Ki&&Qt(Ki.resolve())!=C||$i&&Qt(new $i)!=I||eo&&Qt(new eo)!=J)&&(Qt=function(p){var P=Tn(p),M=P==y?p.constructor:void 0,H=M?ht(M):"";if(H)switch(H){case gs:return R;case Ut:return g;case qr:return C;case Jr:return I;case Zr:return J}return P});function Ea(p,P){return P=P==null?r:P,!!P&&(typeof p=="number"||Ve.test(p))&&p>-1&&p%1==0&&p<P}function ka(p){var P=typeof p;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?p!=="__proto__":p===null}function xa(p){return!!mi&&mi in p}function Da(p){var P=p&&p.constructor,M=typeof P=="function"&&P.prototype||Ot;return p===M}function ws(p){return pi.call(p)}function ht(p){if(p!=null){try{return Dn.call(p)}catch(P){}try{return p+""}catch(P){}}return""}function Ps(p,P){return p===P||p!==p&&P!==P}var Cs=bs(function(){return arguments}())?bs:function(p){return Rt(p)&&mt.call(p,"callee")&&!vi.call(p,"callee")},Pi=Array.isArray;function so(p){return p!=null&&ro(p.length)&&!Is(p)}var Ci=Ji||La;function Ma(p,P){return ys(p,P)}function Is(p){if(!Es(p))return!1;var P=Tn(p);return P==m||P==v||P==c||P==k}function ro(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=r}function Es(p){var P=typeof p;return p!=null&&(P=="object"||P=="function")}function Rt(p){return p!=null&&typeof p=="object"}var ks=ot?Yt(ot):ya;function ao(p){return so(p)?va(p):wa(p)}function Sa(){return[]}function La(){return!1}i.exports=Ma})(Ey,as);const ky=as,xy=(i,t)=>ky(i,t),Dy=i=>Object.keys(i||{}),My=(i,t)=>{const e={};return i.forEach(n=>{e[n]=t[n]}),e},Sy=()=>{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=Dy(s);if(a.includes(n)){const l=My(a,e);xy(s,l)||(i[o].deps=l,r())}})}}},Ly=()=>{let i=null;return{targetWatcher(t,e){i={watcherName:t,fn:e},i.fn(),i=null},getTarget(){return i}}};function Ty(i,t){const e=ss(i,"data",{}),n=ss(i,"watch",{}),o=ss(i,"methods",{}),s=ss(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=Sy(),{targetWatcher:c,getTarget:d}=Ly();let h;const u={},m=()=>({data:h,methods:u});let v=!1;const g=b=>(...y)=>{v=!0;const C=b(...y);return v=!1,C};Object.entries(o).forEach(([b,y])=>{u[b]=g((...C)=>y(m(),...C)),Object.defineProperty(u[b],"name",{value:b})}),h=new Proxy(Iy(e),{get(b,y){return d()&&!v&&r(d(),{prop:y,value:b[y]}),Reflect.get(...arguments)},set(b,y,C){return b[y]===C||(Reflect.set(...arguments),d()||(s&&s(y,C),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 zy({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 jy({infinite:i,pageIndex:t,pagesCount:e,particlesCount:n,particlesToShow:o,particlesToScroll:s}){const r=di(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=>zy({pageIndex:h,particlesToShow:o,particlesToScroll:s,particlesCount:n}));return{pageIndexes:c,particleIndexes:[...new Set(d)].sort((h,u)=>h-u)}}const Vy=(i,t)=>(i(),setInterval(i,t)),_y=35,oh=1;class Oy{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(_y,Math.max(this._autoplayDuration,1));let o=-n;this._interval=Vy(()=>Y(this,null,function*(){if(this._paused)return;o+=n;const s=o/this._autoplayDuration;this._onProgressValueChange(s),s>oh&&(this.reset(),yield t(),e())}),n)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(oh)}}function By(i){const t=new Oy({onProgressValueChange:r=>{i("progressValue",1-r)}}),e=Ty({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=jy({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=v1({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=Hd({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=k1({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=b1({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=di(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=di(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=Mr({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=Mr({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=di(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===hn&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===ci&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>Sr({[hn]:()=>Y(this,null,function*(){return a.showNextPage()}),[ci]:()=>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 Mr({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){me(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 Ry=i=>({currentPageIndex:i[0]&32,pagesCount:i[0]&1024,loaded:i[0]&64}),sh=i=>({currentPageIndex:i[5],pagesCount:i[10],showPage:i[15],loaded:i[6]}),Gy=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),rh=i=>({showNextPage:i[14].showNextPage,loaded:i[6],currentPageIndex:i[5]}),Fy=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),ah=i=>({loaded:i[6],currentPageIndex:i[5]}),Wy=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),lh=i=>({showPrevPage:i[14].showPrevPage,loaded:i[6],currentPageIndex:i[5]});function ch(i){let t;const e=i[37].prev,n=Wn(e,i,i[36],lh),o=n||Ny(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)&&Hn(n,e,s,s[36],t?Nn(e,s[36],r,Wy):Xn(s[36]),lh):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 Ny(i){let t,e,n;return e=new Bd({props:{direction:"prev",disabled:!i[2]&&i[5]===0}}),e.$on("click",i[23]),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function dh(i){let t,e,n;return e=new Jb({props:{value:i[7]}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function hh(i){let t;const e=i[37].next,n=Wn(e,i,i[36],rh),o=n||Hy(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)&&Hn(n,e,s,s[36],t?Nn(e,s[36],r,Gy):Xn(s[36]),rh):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 Hy(i){let t,e,n;return e=new Bd({props:{direction:"next",disabled:!i[2]&&i[5]===i[10]-1}}),e.$on("click",i[14].showNextPage),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function uh(i){let t;const e=i[37].dots,n=Wn(e,i,i[36],sh),o=n||Xy(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)&&Hn(n,e,s,s[36],t?Nn(e,s[36],r,Ry):Xn(s[36]),sh):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 Xy(i){let t,e;return t=new Wb({props:{pagesCount:i[10],currentPageIndex:i[5]}}),t.$on("pageChange",i[41]),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Yy(i){let t,e,n,o,s,r,a,l,c,d,h,u,m=i[1]&&ch(i);const v=i[37].default,g=Wn(v,i,i[36],ah);let A=i[3]&&dh(i),b=i[1]&&hh(i),y=i[4]&&uh(i);return{c(){t=V("div"),e=V("div"),m&&m.c(),n=se(),o=V("div"),s=V("div"),g&&g.c(),a=se(),A&&A.c(),l=se(),b&&b.c(),c=se(),y&&y.c(),w(s,"class","sc-carousel__pages-container svelte-sme1z4"),z(s,"transform","translateX("+i[8]+"px)"),z(s,"transition-duration",i[9]+"ms"),z(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(C,k){_(C,t,k),B(t,e),m&&m.m(e,null),B(e,n),B(e,o),B(o,s),g&&g.m(s,null),i[39](s),B(o,a),A&&A.m(o,null),i[40](o),B(e,l),b&&b.m(e,null),B(t,c),y&&y.m(t,null),d=!0,h||(u=[Wt(r=s1.call(null,s,{thresholdProvider:i[38]})),ke(s,"swipeStart",i[16]),ke(s,"swipeMove",i[18]),ke(s,"swipeEnd",i[19]),ke(s,"swipeFailed",i[20]),ke(s,"swipeThresholdReached",i[17]),Wt(c1.call(null,o)),ke(o,"hovered",i[21]),Wt(m1.call(null,o)),ke(o,"tapped",i[22])],h=!0)},p(C,k){C[1]?m?(m.p(C,k),k[0]&2&&x(m,1)):(m=ch(C),m.c(),x(m,1),m.m(e,n)):m&&(he(),L(m,1,1,()=>{m=null}),ue()),g&&g.p&&(!d||k[0]&96|k[1]&32)&&Hn(g,v,C,C[36],d?Nn(v,C[36],k,Fy):Xn(C[36]),ah),(!d||k[0]&256)&&z(s,"transform","translateX("+C[8]+"px)"),(!d||k[0]&512)&&z(s,"transition-duration",C[9]+"ms"),(!d||k[0]&1)&&z(s,"transition-timing-function",C[0]),r&&Fn(r.update)&&k[0]&2048&&r.update.call(null,{thresholdProvider:C[38]}),C[3]?A?(A.p(C,k),k[0]&8&&x(A,1)):(A=dh(C),A.c(),x(A,1),A.m(o,null)):A&&(he(),L(A,1,1,()=>{A=null}),ue()),C[1]?b?(b.p(C,k),k[0]&2&&x(b,1)):(b=hh(C),b.c(),x(b,1),b.m(e,null)):b&&(he(),L(b,1,1,()=>{b=null}),ue()),C[4]?y?(y.p(C,k),k[0]&16&&x(y,1)):(y=uh(C),y.c(),x(y,1),y.m(t,null)):y&&(he(),L(y,1,1,()=>{y=null}),ue())},i(C){d||(x(m),x(g,C),x(A),x(b),x(y),d=!0)},o(C){L(m),L(g,C),L(A),L(b),L(y),d=!1},d(C){C&&j(t),m&&m.d(),g&&g.d(C),i[39](null),A&&A.d(),i[40](null),b&&b.d(),y&&y.d(),h=!1,et(u)}}}function Uy(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]=By((re,xe)=>{Sr({currentPageIndex:()=>e(5,r=xe),progressValue:()=>e(7,a=xe),offset:()=>e(8,l=xe),durationMs:()=>e(9,c=xe),pagesCount:()=>e(10,d=xe),loaded:()=>e(6,s=xe)})(re)}),g=Mo();let{timingFunction:A="ease-in-out"}=t,{arrows:b=!0}=t,{infinite:y=!0}=t,{initialPageIndex:C=0}=t,{duration:k=500}=t,{autoplay:S=!1}=t,{autoplayDuration:I=3e3}=t,{autoplayDirection:T=hn}=t,{pauseOnFocus:D=!1}=t,{autoplayProgressVisible:X=!1}=t,{dots:J=!0}=t,{swiping:G=!0}=t,{particlesToShow:R=1}=t,{particlesToScroll:F=1}=t;function Q(re,xe){return Y(this,null,function*(){const Fe=Wi(xe,"animated",!0);if(typeof re!="number")throw new Error("pageIndex should be a number");yield m.showPage(re,{animated:Fe})})}function W(re){return Y(this,null,function*(){const xe=Wi(re,"animated",!0);yield m.showPrevPage({animated:xe})})}function q(re){return Y(this,null,function*(){const xe=Wi(re,"animated",!0);yield m.showNextPage({animated:xe})})}let U=0,Z,ae;const oe=C1(({width:re})=>{e(11,U=re),h.particleWidth=U/h.particlesToShow,P1({particlesContainerChildren:ae.children,particleWidth:h.particleWidth}),m.offsetPage({animated:!1})});function ye(){const{clonesToAppend:re,clonesToPrepend:xe}=I1({clonesCountHead:h.clonesCountHead,clonesCountTail:h.clonesCountTail,particlesContainerChildren:ae.children});E1({particlesContainer:ae,clonesToAppend:re,clonesToPrepend:xe})}kt(()=>{Y(this,null,function*(){yield pl(),ae&&Z&&(h.particlesCountWithoutClones=ae.children.length,yield pl(),h.infinite&&ye(),h.particlesCount=ae.children.length,m.showPage(C,{animated:!1}),oe.observe(Z))})}),on(()=>{oe.disconnect(),u.reset()});function Ce(re){return Y(this,null,function*(){yield m.showPage(re,{animated:!0})})}function Ae(){G&&(h.durationMs=0)}function Ve(re){return Y(this,null,function*(){G&&(yield Sr({[hn]:m.showNextPage,[ci]:m.showPrevPage})(re.detail.direction))})}function be(re){G&&(h.offset+=re.detail.dx)}function Ne(){G&&m.showParticle(h.currentParticleIndex)}function fe(){return Y(this,null,function*(){G&&(yield m.offsetPage({animated:!0}))})}function we(re){h.focused=re.detail.value}function Te(){m.toggleFocused()}function pe(){m.showPrevPage()}const Ze=()=>U/3;function dt(re){Je[re?"unshift":"push"](()=>{ae=re,e(13,ae)})}function De(re){Je[re?"unshift":"push"](()=>{Z=re,e(12,Z)})}const ot=re=>Ce(re.detail);return i.$$set=re=>{"timingFunction"in re&&e(0,A=re.timingFunction),"arrows"in re&&e(1,b=re.arrows),"infinite"in re&&e(2,y=re.infinite),"initialPageIndex"in re&&e(24,C=re.initialPageIndex),"duration"in re&&e(25,k=re.duration),"autoplay"in re&&e(26,S=re.autoplay),"autoplayDuration"in re&&e(27,I=re.autoplayDuration),"autoplayDirection"in re&&e(28,T=re.autoplayDirection),"pauseOnFocus"in re&&e(29,D=re.pauseOnFocus),"autoplayProgressVisible"in re&&e(3,X=re.autoplayProgressVisible),"dots"in re&&e(4,J=re.dots),"swiping"in re&&e(30,G=re.swiping),"particlesToShow"in re&&e(31,R=re.particlesToShow),"particlesToScroll"in re&&e(32,F=re.particlesToScroll),"$$scope"in re&&e(36,o=re.$$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=I),i.$$.dirty[0]&268435456&&(h.autoplayDirection=T),i.$$.dirty[0]&536870912&&(h.pauseOnFocus=D),i.$$.dirty[1]&1&&(h.particlesToShowInit=R),i.$$.dirty[1]&2&&(h.particlesToScrollInit=F)},[A,b,y,X,J,r,s,a,l,c,d,U,Z,ae,m,Ce,Ae,Ve,be,Ne,fe,we,Te,pe,C,k,S,I,T,D,G,R,F,Q,W,q,o,n,Ze,dt,De,ot]}class qy extends de{constructor(t){super(),ce(this,t,Uy,Yy,le,{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 Jy(i){me(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 fh(i){let t;function e(s,r){if(s[2].type==="Image")return Ky;if(s[2].type==="Video")return Zy}let n=e(i),o=n&&n(i);return{c(){t=V("div"),o&&o.c(),w(t,"class","media-item svelte-159ski6"),w(t,"draggable","false")},m(s,r){_(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&&j(t),o&&o.d()}}}function Zy(i){let t,e,n,o,s,r;function a(d,h){return d[7]&&d[2].videoCoverUrl?ew:$y}let l=a(i),c=l(i);return{c(){c.c(),t=se(),e=V("div"),n=V("div"),o=V("div"),w(o,"class","video-icon-img svelte-159ski6"),z(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),_(d,t,h),_(d,e,h),B(e,n),B(n,o),s||(r=ke(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&&z(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&&j(t),d&&j(e),s=!1,r()}}}function Ky(i){let t,e,n,o;return{c(){t=V("img"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),yt(t.src,n=i[2].url)||w(t,"src",n),w(t,"alt",o=i[2].name),w(t,"draggable",!1)},m(s,r){_(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&w(t,"style",e),r&4&&!yt(t.src,n=s[2].url)&&w(t,"src",n),r&4&&o!==(o=s[2].name)&&w(t,"alt",o)},d(s){s&&j(t)}}}function $y(i){let t,e,n,o,s,r,a;return{c(){t=V("video"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),yt(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){_(l,t,c),i[19](t),r||(a=[ke(t,"play",i[14]),ke(t,"pause",i[15]),ke(t,"error",i[16]),ke(t,"ended",i[17]),ke(t,"click",i[18])],r=!0)},p(l,c){c&64&&e!==(e=`object-fit: ${l[6]};`)&&w(t,"style",e),c&4&&!yt(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&&j(t),i[19](null),r=!1,et(a)}}}function ew(i){let t,e,n,o;return{c(){t=V("img"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),yt(t.src,n=i[2].videoCoverUrl)||w(t,"src",n),w(t,"alt",o=i[2].name),w(t,"draggable",!1)},m(s,r){_(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&w(t,"style",e),r&4&&!yt(t.src,n=s[2].videoCoverUrl)&&w(t,"src",n),r&4&&o!==(o=s[2].name)&&w(t,"alt",o)},d(s){s&&j(t)}}}function tw(i){let t,e=i[2]&&fh(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),_(n,t,o)},p(n,[o]){n[2]?e?e.p(n,o):(e=fh(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&&j(t)}}}function nw(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=sn("mediaStore"),b=sn("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),kt(()=>{A.subscribe(({currentMediaElement:G})=>{G!==n&&(n==null||n.pause())})});const C=G=>{e(10,m=!1),e(0,s.paused=!1,s),e(8,v=!0),n&&A.set({currentMediaElement:n}),b.emit("playStateChange",{event:G,state:"playing",tag:r,mediaInstance:n})},k=G=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:G,state:"paused",tag:r,mediaInstance:n})},S=G=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:G,state:"paused",tag:r,mediaInstance:n})},I=G=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:G,state:"paused",tag:r,mediaInstance:n})},T=G=>{n&&n.pause()};function D(G){Je[G?"unshift":"push"](()=>{s.videoInstance=G,e(0,s)})}const X=()=>l==="withText"?vd:l==="withoutText"?Pr:l,J=G=>{d&&n&&(e(9,n.muted=!1,n),n.play())};return i.$$set=G=>{"mediaInstance"in G&&e(0,s=G.mediaInstance),"tag"in G&&e(1,r=G.tag),"media"in G&&e(2,a=G.media),"playButtonIfNeed"in G&&e(3,l=G.playButtonIfNeed),"playButtonSizeIfNeed"in G&&e(4,c=G.playButtonSizeIfNeed),"canPlay"in G&&e(5,d=G.canPlay),"objectFit"in G&&e(6,h=G.objectFit),"disableVideoIfHavePoster"in G&&e(7,u=G.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 G=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,F=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&G;n&&F&&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,C,k,S,I,T,D,X,J]}class mh extends de{constructor(t){super(),ce(this,t,nw,tw,le,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,objectFit:6,disableVideoIfHavePoster:7},Jy)}}function iw(i){me(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 ph(i,t,e){const n=i.slice();return n[28]=t[e],n[29]=t,n[30]=e,n}function gh(i){let t,e,n,o,s,r,a;const l=[sw,ow],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=V("div"),e=V("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){_(h,t,u),B(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):(he(),L(c[m],1,1,()=>{c[m]=null}),ue(),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&&tt(()=>{a&&(r&&r.end(1),s=An(t,Ll,i[6]?{y:4,duration:i[4],delay:i[2],easing:tn}:void 0),s.start())}),a=!0)},o(h){L(o),s&&s.invalidate(),h&&(r=Kn(t,Ll,i[6]?{y:4,duration:i[4],delay:i[3],easing:tn}:void 0)),a=!1},d(h){h&&j(t),c[n].d(),h&&r&&r.end()}}}function ow(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=qe(r,o[a]);return i[8][0]!==void 0&&(r.mediaInstance=i[8][0]),t=new mh({props:r}),Je.push(()=>wl(t,"mediaInstance",s)),{c(){ie(t.$$.fragment)},m(a,l){te(t,a,l),n=!0},p(a,l){const c=l[0]&131?nt(o,[l[0]&2&&{media:a[1][0]},l[0]&128&&yl(a[7]),l[0]&1&&{tag:a[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=a[8][0],gl(()=>e=!1)),t.$set(c)},i(a){n||(x(t.$$.fragment,a),n=!0)},o(a){L(t.$$.fragment,a),n=!1},d(a){ne(t,a)}}}function sw(i){let t,e,n={dots:!1,arrows:!1,$$slots:{default:[rw]},$$scope:{ctx:i}};return t=new qy({props:n}),i[18](t),t.$on("pageChange",i[19]),{c(){ie(t.$$.fragment)},m(o,s){te(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),ne(t,o)}}}function vh(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=qe(r,o[a]);return i[8][i[30]]!==void 0&&(r.mediaInstance=i[8][i[30]]),t=new mh({props:r}),Je.push(()=>wl(t,"mediaInstance",s)),{c(){ie(t.$$.fragment)},m(a,l){te(t,a,l),n=!0},p(a,l){i=a;const c=l[0]&1153?nt(o,[l[0]&128&&yl(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]],gl(()=>e=!1)),t.$set(c)},i(a){n||(x(t.$$.fragment,a),n=!0)},o(a){L(t.$$.fragment,a),n=!1},d(a){ne(t,a)}}}function rw(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=vh(ph(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);_(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=ph(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=vh(c),o[l].c(),x(o[l],1),o[l].m(t.parentNode,t))}for(he(),l=n.length;l<o.length;l+=1)s(l);ue()}},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){Nt(o,r),r&&j(t)}}}function aw(i){let t,e,n=i[5]&&gh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,s){o[5]?n?(n.p(o,s),s[0]&32&&x(n,1)):(n=gh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function lw(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:C=!1}=A;let k=[],S=0,I,T=null;const D=sn("hooks"),X=sn("mediaStore");function J(){const W=k[S],q=W==null?void 0:W.videoInstance;q&&(q.paused?(q.muted=!1,q.play()):q.pause())}kt(()=>{D.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()}),T=setInterval(()=>{r&&(I==null||I.goToNext())},3e3)}),on(()=>{clearInterval(T),D.off("click",J)});function G(W,q){i.$$.not_equal(k[q],W)&&(k[q]=W,e(8,k))}function R(W){Je[W?"unshift":"push"](()=>{I=W,e(12,I)})}const F=W=>{n||X.set({currentMediaElement:null}),e(11,S=W.detail)};function Q(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,I,o,X,g,A,G,R,F,Q]}class Ah extends de{constructor(t){super(),ce(this,t,lw,aw,le,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:15,autoplayConfig:16},iw,[-1,-1])}}function cw(i){me(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 bh(i){let t,e,n,o,s,r,a,l;t=new Vt({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new Vb({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&yh(i),d=i[1]&&wh(i);return{c(){ie(t.$$.fragment),e=se(),n=V("div"),ie(o.$$.fragment),s=se(),c&&c.c(),r=se(),d&&d.c(),a=Ee(),w(n,"class","line svelte-1f7m1lj")},m(h,u){te(t,h,u),_(h,e,u),_(h,n,u),te(o,n,null),_(h,s,u),c&&c.m(h,u),_(h,r,u),d&&d.m(h,u),_(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=yh(h),c.c(),x(c,1),c.m(r.parentNode,r)):c&&(he(),L(c,1,1,()=>{c=null}),ue()),h[1]?d?(d.p(h,u),u&2&&x(d,1)):(d=wh(h),d.c(),x(d,1),d.m(a.parentNode,a)):d&&(he(),L(d,1,1,()=>{d=null}),ue())},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){ne(t,h),h&&j(e),h&&j(n),ne(o),h&&j(s),c&&c.d(h),h&&j(r),d&&d.d(h),h&&j(a)}}}function yh(i){let t,e,n;return e=new Ed({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","text svelte-1f7m1lj")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function wh(i){let t,e,n;return e=new Ah({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=V("div"),ie(e.$$.fragment),w(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function dw(i){let t,e,n=i[0].state&&bh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=bh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function hw(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 uw extends de{constructor(t){super(),ce(this,t,hw,dw,le,{tag:0},cw)}}function fw(i){me(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 Ph(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ch(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ih(i){let t,e;return{c(){t=V("img"),w(t,"class","headerImage svelte-sezqcq"),yt(t.src,e=i[3].headerPictureUrl)||w(t,"src",e),w(t,"alt","")},m(n,o){_(n,t,o)},p(n,o){o&8&&!yt(t.src,e=n[3].headerPictureUrl)&&w(t,"src",e)},d(n){n&&j(t)}}}function Eh(i){let t,e,n,o,s=i[2]||[],r=[];for(let c=0;c<s.length;c+=1)r[c]=kh(Ch(i,s,c));let a=i[5]||[],l=[];for(let c=0;c<a.length;c+=1)l[c]=xh(Ph(i,a,c));return{c(){t=V("div"),e=V("div");for(let c=0;c<r.length;c+=1)r[c].c();n=se();for(let c=0;c<l.length;c+=1)l[c].c();w(e,"class","tags svelte-sezqcq"),tt(()=>i[11].call(e)),w(t,"class","tags-wrapper svelte-sezqcq")},m(c,d){_(c,t,d),B(t,e);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(e,null);B(e,n);for(let h=0;h<l.length;h+=1)l[h]&&l[h].m(e,null);o=Eo(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=Ch(c,s,h);r[h]?r[h].p(u,d):(r[h]=kh(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=Ph(c,a,h);l[h]?l[h].p(u,d):(l[h]=xh(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&&j(t),Nt(r,c),Nt(l,c),o()}}}function kh(i){let t,e=i[0]+"",n;return{c(){t=V("div"),n=Be(e),w(t,"class","tag primary-tag svelte-sezqcq"),z(t,"min-width",_r)},m(o,s){_(o,t,s),B(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Re(n,e)},d(o){o&&j(t)}}}function xh(i){let t,e=i[0]+"",n;return{c(){t=V("div"),n=Be(e),w(t,"class","tag secondary-tag svelte-sezqcq"),z(t,"min-width",_r)},m(o,s){_(o,t,s),B(t,n)},p(o,s){s&32&&e!==(e=o[0]+"")&&Re(n,e)},d(o){o&&j(t)}}}function Dh(i){let t,e,n=i[7]&&Mh(i),o=i[3].highlightText&&Lh(i);return{c(){t=V("div"),n&&n.c(),e=se(),o&&o.c(),w(t,"class","footer svelte-sezqcq")},m(s,r){_(s,t,r),n&&n.m(t,null),B(t,e),o&&o.m(t,null)},p(s,r){s[7]?n?n.p(s,r):(n=Mh(s),n.c(),n.m(t,e)):n&&(n.d(1),n=null),s[3].highlightText?o?o.p(s,r):(o=Lh(s),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(s){s&&j(t),n&&n.d(),o&&o.d()}}}function Mh(i){let t,e,n=i[3].price.value+"",o,s,r=i[3].price.unit&&Sh(i);return{c(){t=V("div"),e=V("span"),o=Be(n),s=se(),r&&r.c(),w(e,"class","value svelte-sezqcq"),w(t,"class","price svelte-sezqcq")},m(a,l){_(a,t,l),B(t,e),B(e,o),B(t,s),r&&r.m(t,null)},p(a,l){l&8&&n!==(n=a[3].price.value+"")&&Re(o,n),a[3].price.unit?r?r.p(a,l):(r=Sh(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&j(t),r&&r.d()}}}function Sh(i){let t,e=i[3].price.unit+"",n;return{c(){t=V("span"),n=Be(e),w(t,"class","unit svelte-sezqcq")},m(o,s){_(o,t,s),B(t,n)},p(o,s){s&8&&e!==(e=o[3].price.unit+"")&&Re(n,e)},d(o){o&&j(t)}}}function Lh(i){let t,e,n,o,s=i[3].highlightText+"",r,a,l;return{c(){t=V("div"),e=V("div"),n=se(),o=V("span"),r=Be(s),a=se(),l=V("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){_(c,t,d),B(t,e),B(t,n),B(t,o),B(o,r),_(c,a,d),_(c,l,d)},p(c,d){d&8&&s!==(s=c[3].highlightText+"")&&Re(r,s)},d(c){c&&j(t),c&&j(a),c&&j(l)}}}function mw(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 Vt({props:{visible:i[4],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let b=i[3].headerPictureUrl&&Ih(i),y=((k=i[2].length)!=null?k:0)+((S=i[5].length)!=null?S:0)>0&&Eh(i),C=(i[7]||i[3].highlightText)&&Dh(i);return{c(){t=V("div"),ie(e.$$.fragment),n=se(),o=V("div"),s=se(),r=V("div"),b&&b.c(),a=se(),l=V("div"),c=V("div"),d=V("div"),u=Be(h),m=se(),y&&y.c(),v=se(),C&&C.c(),w(o,"class","line svelte-sezqcq"),z(o,"transition-delay",i[4]?ls+"ms":cs+zh-Th-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"),z(r,"max-width",_t(i[9])),z(r,"transition-delay",i[4]?ls+cs+"ms":"0ms"),w(t,"class",g=Oe(`marketing ${i[6]}`)+" svelte-sezqcq"),$(t,"unfolded",i[4]),$(t,"folded",i[8])},m(I,T){_(I,t,T),te(e,t,null),B(t,n),B(t,o),B(t,s),B(t,r),b&&b.m(r,null),B(r,a),B(r,l),B(l,c),B(c,d),B(d,u),B(r,m),y&&y.m(r,null),B(r,v),C&&C.m(r,null),A=!0},p(I,[T]){var X,J;const D={};T&16&&(D.visible=I[4]),e.$set(D),T&16&&z(o,"transition-delay",I[4]?ls+"ms":cs+zh-Th-40+"ms"),I[3].headerPictureUrl?b?b.p(I,T):(b=Ih(I),b.c(),b.m(r,a)):b&&(b.d(1),b=null),(!A||T&8)&&h!==(h=I[3].title+"")&&Re(u,h),((X=I[2].length)!=null?X:0)+((J=I[5].length)!=null?J:0)>0?y?y.p(I,T):(y=Eh(I),y.c(),y.m(r,v)):y&&(y.d(1),y=null),I[7]||I[3].highlightText?C?C.p(I,T):(C=Dh(I),C.c(),C.m(r,null)):C&&(C.d(1),C=null),T&16&&z(r,"transition-delay",I[4]?ls+cs+"ms":"0ms"),(!A||T&64&&g!==(g=Oe(`marketing ${I[6]}`)+" svelte-sezqcq"))&&w(t,"class",g),(!A||T&80)&&$(t,"unfolded",I[4]),(!A||T&320)&&$(t,"folded",I[8])},i(I){A||(x(e.$$.fragment,I),A=!0)},o(I){L(e.$$.fragment,I),A=!1},d(I){I&&j(t),ne(e),b&&b.d(),y&&y.d(),C&&C.d()}}}const _r=40,ls=400,Th=500,cs=180,zh=500;function pw(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,C,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=Gn((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=((C=s.brandTags)==null?void 0:C.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)/_r),[h,u,c,s,n,d,a,r,o,m,l,v]}class gw extends de{constructor(t){super(),ce(this,t,pw,mw,le,{tag:0},fw)}}class vw 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=TA(this.sharedAudioSrc,{namespace:yr.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 Aw(i){me(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function bw(i){let t,e,n,o;const s=i[8].default,r=Wn(s,i,i[7],null);return{c(){t=V("div"),r&&r.c(),w(t,"class","audio svelte-13e7hxv"),w(t,"style",i[0])},m(a,l){_(a,t,l),r&&r.m(t,null),e=!0,n||(o=ke(t,"click",ll(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&Hn(r,s,a,a[7],e?Nn(s,a[7],l,null):Xn(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&&j(t),r&&r.d(a),n=!1,o()}}}function yw(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=Mo(),d=sn("hooks"),h=sn("mediaStore");let u,m=!0;function v(){e(5,u.onplay=A=>{d.emit("playStateChange",N({event:A,state:"playing",mediaInstance:u},l)),c("play"),e(6,m=!1)},u),e(5,u.onpause=A=>{d.emit("playStateChange",N({event:A,state:"paused",mediaInstance:u},l)),c("pause"),e(6,m=!0)},u),e(5,u.onended=A=>{d.emit("playStateChange",N({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",N({event:A,target:"AudioTagPlayIcon",audioInstance:u},l)),h.set({currentMediaElement:u}),d.emit("playStateChange",N({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 vw(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 jh=class extends de{constructor(t){super(),ce(this,t,yw,bw,le,{url:2,enable:3,style:0,hooksInfo:4},Aw)}};function ww(i){me(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 Vh(i){let t,e;return t=new Vt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function Pw(i){let t,e,n,o,s,r=i[1]&&Vh();return{c(){t=V("div"),r&&r.c(),e=se(),n=V("div"),o=V("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]),z(t,"width",i[5]),z(t,"height",i[5])},m(a,l){_(a,t,l),r&&r.m(t,null),B(t,e),B(t,n),B(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&x(r,1):(r=Vh(),r.c(),x(r,1),r.m(t,e)):r&&(he(),L(r,1,1,()=>{r=null}),ue()),(!s||l&1)&&$(n,"playing",a[0]),(!s||l&4)&&w(t,"style",a[2]);const c=l&4;(c||l&36)&&z(t,"width",a[5]),(c||l&36)&&z(t,"height",a[5])},i(a){s||(x(r),s=!0)},o(a){L(r),s=!1},d(a){a&&j(t),r&&r.d(),i[7](null),i[8](null)}}}function Cw(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){Je[u?"unshift":"push"](()=>{c=u,e(4,c)})}function h(u){Je[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"?_t(a):a)},[o,s,r,l,c,n,a,d,h]}class _h extends de{constructor(t){super(),ce(this,t,Cw,Pw,le,{playing:0,shadow:1,style:2,width:6},ww)}}function Iw(i){me(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 Oh(i){var A,b;let t,e,n,o,s,r,a,l,c,d,h,u,m,v;e=new Vt({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&Bh(i);return c=new Md({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),h=new Ir({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=V("div"),ie(e.$$.fragment),n=se(),o=V("div"),s=V("div"),r=V("div"),g&&g.c(),a=se(),l=V("div"),ie(c.$$.fragment),d=se(),ie(h.$$.fragment),w(r,"class","audio-icon svelte-1s6gk4a"),z(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,C){_(y,t,C),te(e,t,null),B(t,n),B(t,o),B(o,s),B(s,r),g&&g.m(r,null),B(s,a),B(s,l),te(c,l,null),B(t,d),te(h,t,null),u=!0,m||(v=[ke(l,"click",i[7]),Wt(ei.call(null,l)),ke(l,"clientWidth",i[12])],m=!0)},p(y,C){var T,D;const k={};C&64&&(k.visible=y[6]),C&8&&(k.left=y[3]/2+"px"),e.$set(k),y[6]?g?(g.p(y,C),C&64&&x(g,1)):(g=Bh(y),g.c(),x(g,1),g.m(r,null)):g&&(he(),L(g,1,1,()=>{g=null}),ue());const S={};C&64&&(S.visible=y[6]),C&2&&(S.textUnfolded=y[1]),C&32&&(S.content=y[5]),c.$set(S);const I={};C&64&&(I.unfolded=y[6]),C&8&&(I.length=y[3]),C&48&&(I.outDelay=y[4]+20*Math.min((D=(T=y[5])==null?void 0:T.length)!=null?D:10,15)),h.$set(I),(!u||C&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&&j(t),ne(e),g&&g.d(),ne(c),ne(h),m=!1,et(v)}}}function Bh(i){let t,e,n,o,s,r,a;return e=new Vt({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new jh({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[Ew]},$$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=V("div"),ie(e.$$.fragment),n=se(),ie(o.$$.fragment),w(t,"class","audio svelte-1s6gk4a")},m(l,c){_(l,t,c),te(e,t,null),B(t,n),te(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&&tt(()=>{a&&(r&&r.end(1),s=An(t,bn,{duration:1e3,delay:0,easing:ni}),s.start())}),a=!0)},o(l){var c,d;L(e.$$.fragment,l),L(o.$$.fragment,l),s&&s.invalidate(),l&&(r=Kn(t,bn,{duration:1e3,delay:20*Math.min((d=(c=i[5])==null?void 0:c.length)!=null?d:10,15),easing:ni})),a=!1},d(l){l&&j(t),ne(e),ne(o),l&&r&&r.end()}}}function Ew(i){let t,e,n;return e=new _h({props:{playing:i[2]}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function kw(i){let t,e,n=i[0].state&&Oh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=Oh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function xw(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){Un.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 Dw extends de{constructor(t){super(),ce(this,t,xw,kw,le,{tag:0},Iw)}}function Mw(i){me(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 Qh(i){let t,e,n,o;return n=new jh({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[Lw]},$$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=V("div"),e=V("div"),ie(n.$$.fragment),w(e,"class","audio-tag svelte-58hfjf"),z(e,"background-color",i[4].bgColor),z(e,"color",i[4].fontColor),w(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){_(s,t,r),B(t,e),te(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&&z(e,"background-color",s[4].bgColor),r&16&&z(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&&j(t),ne(n)}}}function Sw(i){let t;return{c(){t=Be(i[5])},m(e,n){_(e,t,n)},p(e,n){n&32&&Re(t,e[5])},d(e){e&&j(t)}}}function Lw(i){let t,e,n,o,s,r,a;return n=new _h({props:{playing:i[3]}}),r=new kr({props:{maxWidth:72,$$slots:{default:[Sw]},$$scope:{ctx:i}}}),{c(){t=V("div"),e=V("div"),ie(n.$$.fragment),o=se(),s=V("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){_(l,t,c),B(t,e),te(n,e,null),B(t,o),B(t,s),te(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&&j(t),ne(n),ne(r)}}}function Tw(i){let t,e,n=i[0].state&&Qh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=Qh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function zw(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){Un.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 jw extends de{constructor(t){super(),ce(this,t,zw,Tw,le,{tag:0},Mw)}}function Vw(i){let t,e;return t=new jw({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function _w(i){let t,e;return t=new Dw({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Ow(i){let t,e,n,o;const s=[_w,Vw],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),_(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(he(),L(r[d],1,1,()=>{r[d]=null}),ue()),~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&&j(n)}}}function Bw(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 de{constructor(t){super(),ce(this,t,Bw,Ow,le,{tag:0})}}function Rw(i){me(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Rh(i){var o;let t,e,n;return e=new Ah({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=V("div"),ie(e.$$.fragment),w(t,"class","media-wrapper svelte-10cw0el")},m(s,r){_(s,t,r),te(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&&j(t),ne(e)}}}function Gw(i){let t,e,n=i[0].state&&i[5]&&Rh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&x(n,1)):(n=Rh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function Fw(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 Ww extends de{constructor(t){super(),ce(this,t,Fw,Gw,le,{tag:0},Rw)}}function Gh(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 Nw(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 Gh(t);return Pe(N({},i),{width:n/e,height:o/e})})}function Hw(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 Gh(e),a=s/n,l=r/n,c=a/t,d=l,h=1/o*t+"s";return Pe(N({},i),{width:c,height:d,duration:h})})}function Xw(i){me(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 Fh(i){i[1]=i[19].width}function Wh(i){i[1]=i[19].width,i[16]=i[19].height,i[17]=i[19].steps,i[18]=i[19].duration}function Nh(i){let t,e,n,o=i[0]&&Hh();function s(l,c){return l[8]?Uw:Yw}let r=s(i),a=r(i);return{c(){t=V("div"),o&&o.c(),e=se(),a.c(),w(t,"class","icon"),z(t,"width",i[1])},m(l,c){_(l,t,c),o&&o.m(t,null),B(t,e),a.m(t,null),n=!0},p(l,c){l[0]?o?c&1&&x(o,1):(o=Hh(),o.c(),x(o,1),o.m(t,e)):o&&(he(),L(o,1,1,()=>{o=null}),ue()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&2&&z(t,"width",l[1])},i(l){n||(x(o),n=!0)},o(l){L(o),n=!1},d(l){l&&j(t),o&&o.d(),a.d()}}}function Hh(i){let t,e;return t=new Vt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function Yw(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:Zw,then:Jw,catch:qw,value:19};return To(e=i[11](Ge({url:i[7],ratio:i[5]})),n),{c(){t=Ee(),n.block.c()},m(o,s){_(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](Ge({url:i[7],ratio:i[5]})))&&To(e,n)||bl(n,i,s)},d(o){o&&j(t),n.block.d(o),n.token=null,n=null}}}function Uw(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:eP,then:$w,catch:Kw,value:19};return To(e=i[10](Ge({url:i[7],steps:i[2],fps:i[6],ratio:i[5]})),n),{c(){t=Ee(),n.block.c()},m(o,s){_(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](Ge({url:i[7],steps:i[2],fps:i[6],ratio:i[5]})))&&To(e,n)||bl(n,i,s)},d(o){o&&j(t),n.block.d(o),n.token=null,n=null}}}function qw(i){return{c:K,m:K,p:K,d:K}}function Jw(i){Fh(i);let t,e;return{c(){t=V("img"),w(t,"alt","tag-icon"),w(t,"class","icon-image svelte-316sq3"),yt(t.src,e=i[7])||w(t,"src",e),z(t,"width",_t(ui({originWidth:i[1],scale:i[4],wantedWidth:i[3]}).width))},m(n,o){_(n,t,o)},p(n,o){Fh(n),o&128&&!yt(t.src,e=n[7])&&w(t,"src",e),o&184&&z(t,"width",_t(ui({originWidth:n[1],scale:n[4],wantedWidth:n[3]}).width))},d(n){n&&j(t)}}}function Zw(i){return{c:K,m:K,p:K,d:K}}function Kw(i){return{c:K,m:K,p:K,d:K}}function $w(i){Wh(i);let t,e=`url(${i[7]})`,n=`steps(${i[17]}, jump-none)`;return{c(){t=V("div"),w(t,"class","icon-keyframe svelte-316sq3"),z(t,"width",_t(ui({originWidth:i[1],originHeight:i[16],scale:i[4],wantedWidth:i[3]}).width)),z(t,"height",_t(ui({originWidth:i[1],originHeight:i[16],scale:i[4],wantedWidth:i[3]}).height)),z(t,"background-image",e),z(t,"animation-duration",i[18]),z(t,"animation-timing-function",n)},m(o,s){_(o,t,s)},p(o,s){Wh(o),s&252&&z(t,"width",_t(ui({originWidth:o[1],originHeight:o[16],scale:o[4],wantedWidth:o[3]}).width)),s&252&&z(t,"height",_t(ui({originWidth:o[1],originHeight:o[16],scale:o[4],wantedWidth:o[3]}).height)),s&128&&e!==(e=`url(${o[7]})`)&&z(t,"background-image",e),s&228&&z(t,"animation-duration",o[18]),s&228&&n!==(n=`steps(${o[17]}, jump-none)`)&&z(t,"animation-timing-function",n)},d(o){o&&j(t)}}}function eP(i){return{c:K,m:K,p:K,d:K}}function tP(i){let t,e,n=i[9]&&Nh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[9]?n?(n.p(o,s),s&512&&x(n,1)):(n=Nh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function ui(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 Pe(N({},i),{width:s,height:r})}function nP(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=Mo();function A(C){return Y(this,null,function*(){const k=yield Hw(C);return g("iconLoaded",k),k})}function b(C){return Y(this,null,function*(){if(typeof h=="number")return Pe(N({},C),{width:h});const k=yield Nw(C);return g("iconLoaded",k),k})}function y(){d||g("iconLoaded")}return kt(()=>{y()}),i.$$set=C=>{"width"in C&&e(1,u=C.width),"icon"in C&&e(12,m=C.icon),"shadow"in C&&e(0,v=C.shadow)},i.$$.update=()=>{var C,k;i.$$.dirty&4096&&e(7,n=m==null?void 0:m.url),i.$$.dirty&4096&&e(2,o=(C=m==null?void 0:m.steps)!=null?C: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=Ge({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 Xh extends de{constructor(t){super(),ce(this,t,nP,tP,le,{width:1,icon:12,shadow:0},Xw)}}function iP(i){me(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 Yh(i){let t,e,n,o,s,r;return e=new Vt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=V("div"),ie(e.$$.fragment),n=se(),o=V("div"),s=Be(i[1]),w(o,"class","text svelte-e58ijk"),w(t,"class","text-wrapper svelte-e58ijk")},m(a,l){_(a,t,l),te(e,t,null),B(t,n),B(t,o),B(o,s),r=!0},p(a,l){(!r||l&2)&&Re(s,a[1])},i(a){r||(x(e.$$.fragment,a),r=!0)},o(a){L(e.$$.fragment,a),r=!1},d(a){a&&j(t),ne(e)}}}function oP(i){let t,e,n,o;e=new Xh({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[4]);let s=i[1]&&i[2]&&Yh(i);return{c(){t=V("div"),ie(e.$$.fragment),n=se(),s&&s.c(),w(t,"class","wrapper svelte-e58ijk")},m(r,a){_(r,t,a),te(e,t,null),B(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=Yh(r),s.c(),x(s,1),s.m(t,null)):s&&(he(),L(s,1,1,()=>{s=null}),ue())},i(r){o||(x(e.$$.fragment,r),x(s),o=!0)},o(r){L(e.$$.fragment,r),L(s),o=!1},d(r){r&&j(t),ne(e),s&&s.d()}}}function sP(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 rP extends de{constructor(t){super(),ce(this,t,sP,oP,le,{tag:3},iP)}}function aP(i){me(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function lP(i){let t,e;return{c(){t=new ko(!1),e=Ee(),t.a=e},m(n,o){t.m(i[2],n,o),_(n,e,o)},p:K,d(n){n&&j(e),n&&t.d()}}}function cP(i){let t,e=typeof i[2]=="string"&&lP(i);return{c(){t=V("div"),e&&e.c(),w(t,"class","customElement__container svelte-kzl2aj"),$(t,"unfolded",i[1])},m(n,o){_(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&&j(t),e&&e.d(),i[5](null)}}}function dP(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;kt(()=>{r&&(a instanceof Element?(r.appendChild(a),l=()=>{a instanceof Element&&a.remove()}):typeof a=="function"&&(l=a(r,o)))}),on(()=>{l==null||l()});function c(u){Je[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 hP extends de{constructor(t){super(),ce(this,t,dP,cP,le,{tag:3,renderMap:4},aP)}}function uP(i){me(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/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACCAA7AcwAdwIIADMCCAA0AhwAMwISADkCCAAuAfQANAH+ACsB/gApAggANAEeAFABHgBQAR4AUAIIADQCCAAuAR4AUAEeAFABfAAxAAEAAAPo/zgAAAIcACkAKQHgAAEAAAAAAAAAAAAAAAAAAABJAAMCLgGQAAUACAKKAlgAAABLAooCWAAAAV4AMgEsAAAAAAgAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFVLV04AIAAg/xsDIP84AMgD6ADIAAAAAQAAAAAB9AK8AAAAIAAAAAAAEADGAAEAAAAAAAEADAAAAAEAAAAAAAIABAAMAAEAAAAAAAMAGwAQAAEAAAAAAAQAEQArAAEAAAAAAAUAPAA8AAEAAAAAAAYAEAB4AAEAAAAAAAgADAAAAAEAAAAAAAkADAAAAAMAAQQJAAEAGACIAAMAAQQJAAIACACgAAMAAQQJAAMANgCoAAMAAQQJAAQAIgDeAAMAAQQJAAUAeAEAAAMAAQQJAAYAIAF4AAMAAQQJAAgAGACIAAMAAQQJAAkAGACIQUxJQkFCQSBGb250Qm9sZDEuMDAwO1VLV047QUxJQkFCQUZvbnQtQm9sZEFMSUJBQkEgRm9udCBCb2xkVmVyc2lvbiAxLjAwMDtQUyAwMDEuMDAwO2hvdGNvbnYgMS4wLjg4O21ha2VvdGYubGliMi41LjY0Nzc1QUxJQkFCQUZvbnQtQm9sZABBAEwASQBCAEEAQgBBACAARgBvAG4AdABCAG8AbABkADEALgAwADAAMAA7AFUASwBXAE4AOwBBAEwASQBCAEEAQgBBAEYAbwBuAHQALQBCAG8AbABkAEEATABJAEIAQQBCAEEAIABGAG8AbgB0ACAAQgBvAGwAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAMAAwADsAUABTACAAMAAwADEALgAwADAAMAA7AGgAbwB0AGMAbwBuAHYAIAAxAC4AMAAuADgAOAA7AG0AYQBrAGUAbwB0AGYALgBsAGkAYgAyAC4ANQAuADYANAA3ADcANQBBAEwASQBCAEEAQgBBAEYAbwBuAHQALQBCAG8AbABkAAAAAAADAAAAAwAAASIAAQAAAAAAHAADAAEAAAEiAAABBgAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAABCSEMANjc4OTo7PD0+PwAAAAAAAAACAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGwAAAAAAABwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAFoAAAAQABAAAwAAACAALgA5AFoAegCl/xv//wAAACAALAAwAEEAYQCl/xr////hAAAABv/B/7v/nwAAAAEAAAAOAAAAAAAAAAAACgAAAEIASABDAEYARwADAAAAAAAA/7UAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAQAEAgABAQERQUxJQkFCQUZvbnQtQm9sZAABAQEg+A8A+CAB+CEC+BgEtPtc+HT5tAX3KA/3UBGcHAZWEgAHAQENExoiKTpLbmluZS4wMDEuMDAxbW9uZXkudW5pRkYxQm5pbmUuMDAxdW5pRkYxQWNvcHlyaWdodCBtaXNzaW5nQUxJQkFCQSBGb250IEJvbGQAAAEAAQAAIhkAQhkAEQkBhwABigAADQAADwAAZAABiAABiwABiQAADgAASQIAAQCtAK4ArwCwALEAsgCzALQAtQC2ALcAuAC5ALoAuwC8AL0AvgC/AMAAwQDCAMMAxADFAMYAxwDIAMkAygDLAMwAzQDOAM8A0ADRANIA0wDUANUA1gDXANgA2QDaANsA3ADdAN4A3wDgAOEA4gFDAVoBqwIsAloCuAMcAzkDzwQ4BDoEPARRBFMEVQTNBOIE8QUEmPtc0Ky6rKKsuqzHrKPDoa2irLCspq2vraWssKzOAejVrKytrKzYA/gu+bQV+9H+fPfRBj76ORVqSWbNavs6rM2wSqwH7vsVFUXNafs68wfNaRVqZ6wG704VaklFJ6zNsEmsB/c6TxUn+zqt9xnNB6z7DhX7Bfs69wWsO++6anRpwwfv+0EV+wX7OvcFB/cZahUnXO8GrFMVamsHRVwF8Wr7OqwG0boFRawGDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OrIr5UQH3OPdUA/ebihVmaZSdbB9Mr2TL0xr3vgewlK2eqh7Kr86y1BuvrIJ5qh/HZrJIQhr7vgdngmp5bR5OZ0tkQxv46ARUX2FSH/u+B1a5YMDAs7TCHve+B8RjtVYeDnD4utkB93HzA/cL+QgVPfH8vPP5UgcOrIn5UgG++DYD+GmJFfw28wb3svfUBZ2glKSnGsNduFBWXF1UiB4ijgaMsJWsnqoIyLHMstYbsa6Ceawfy2ezSUAaVndXZ2Me+2/7jQX3pwYOrIvy92Tz90ryEr/zM/L3SvMu8hPy+B/3/xUT7LCwpMDDGq6CrHqoHsZnTK5DG2lrg3puH09pZk5EGobykAe4tba6vrViXFZiYlcedyOfBhPyxLpdUlJcW1JSXLvEH5ojfAdllGiebB5LsM5j1xuwrpSeqx/KsLPO1xrKcMNerx4OwPL1Affi8gP4dPdlFWD4fPshBvuJ/HkF+wH3ryPy87YH+8z1Ffc69+QF++QHDrb3ZNf3ZfAB9zX3YwP3nRZlaJSebB9LsGPO1xrzBlK6XMTEubrEHtcHxF26UlJcXFIeI/g0+BYh+677JAaorK2ZsBuwroJ4qx/LZrNHPxo/B2aCaHhrHktmR2NAGw6si/X3b/IBufX3b/ID95n4QBWAg4uKhh/3EfelBfsHBvtK/CMFfnCFbm0aZJVnnmoeSrLPYdobsq6Vnqwfy7K10dgasoGueKwey2RHtT4b+9YETlu7yMe8vcfHvVlPT1laTx8OmIr5UQG/+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 fP(i){let t,e;return{c(){t=V("div"),w(t,"data-info","tag content is keep folded"),w(t,"data-id",e=i[1].id)},m(n,o){_(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&&j(t)}}}function mP(i){let t,e,n,o,s,r,a,l,c,d;const h=[wP,yP,bP,AP,vP,gP],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=V("div"),e=V("div"),n=V("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=Oe(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),z(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),z(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(v,g){_(v,t,g),B(t,e),B(e,n),~o&&u[o].m(n,null),l=!0,c||(d=ke(t,"click",ll(i[15])),c=!0)},p(v,g){var b;let A=o;o=m(v),o===A?~o&&u[o].p(v,g):(s&&(he(),L(u[A],1,1,()=>{u[A]=null}),ue()),~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=Oe(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&&z(t,"width",v[1].stickType==="Plane"||v[1].contentType==="MediaModel"?"100%":0),g&2&&z(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&&j(t),~o&&u[o].d(),c=!1,d()}}}function pP(i){let t,e,n,o,s,r,a;return e=new hP({props:{tag:Ge(i[1]),renderMap:i[3]}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class",n=Oe(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){_(l,t,c),te(e,t,null),s=!0,r||(a=ke(t,"click",i[14]),r=!0)},p(l,c){const d={};c&2&&(d.tag=Ge(l[1])),c&8&&(d.renderMap=l[3]),e.$set(d),(!s||c&2&&n!==(n=Oe(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&&j(t),ne(e),r=!1,a()}}}function gP(i){let t,e;return t=new Ww({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function vP(i){let t,e;return t=new rP({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function AP(i){let t,e;return t=new gw({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function bP(i){let t,e;return t=new Qw({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function yP(i){let t,e;return t=new uw({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function wP(i){let t,e;return t=new Lb({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function PP(i){let t,e,n,o,s;const r=[pP,mP,fP],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),_(c,o,d),s=!0},p(c,[d]){let h=e;e=l(c,d),e===h?a[e].p(c,d):(he(),L(a[h],1,1,()=>{a[h]=null}),ue(),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&&j(o)}}}function CP(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;Ws("hooks",h),Ws("mediaStore",v);let A,b;function y(I){I?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}function C(I,T,D){var X,J;return!(!T.visible||!T.enabled||!D.visible||!((X=I.state)!=null&&X.visible)||((J=I.temporaryState)==null?void 0:J.visible)===!1||ut(I)&&!I.mediaVisible)}const k=I=>h.emit("click",{event:I,target:"TagContent",tag:d}),S=I=>h.emit("click",{event:I,target:"TagContent",tag:d});return i.$$set=I=>{"withAnimation"in I&&e(0,c=I.withAnimation),"tag"in I&&e(1,d=I.tag),"hooks"in I&&e(2,h=I.hooks),"renderMap"in I&&e(3,u=I.renderMap),"state"in I&&e(6,m=I.state),"mediaStore"in I&&e(7,v=I.mediaStore),"temporaryState"in I&&e(8,g=I.temporaryState)},i.$$.update=()=>{var I,T,D,X,J,G,R,F,Q,W,q;i.$$.dirty&2&&e(12,n=(I=d.state)==null?void 0:I.unfolded),i.$$.dirty&2&&e(11,o=(T=d.state)==null?void 0:T.visible),i.$$.dirty&322&&e(13,s=m.visible&&g.visible&&((D=d.state)==null?void 0:D.visible)),i.$$.dirty&2&&(r=d.id),i.$$.dirty&322&&e(5,a=!C(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"):(R=d==null?void 0:(G=d.hooks).emit)==null||R.call(G,"folded")),o!==void 0&&o!==A&&(e(9,A=o),o?(Q=(F=d.hooks).emit)==null||Q.call(F,"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 Uh=class extends de{constructor(t){super(),ce(this,t,CP,PP,le,{withAnimation:0,tag:1,hooks:2,renderMap:3,state:6,mediaStore:7,temporaryState:8},uP)}};function IP(i){me(i,"svelte-1jkrwn7",'@charset "UTF-8";.tag-point-click-helper.svelte-1jkrwn7.svelte-1jkrwn7{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-1jkrwn7.svelte-1jkrwn7{pointer-events:none;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);z-index:-1}.tag-folded-point.svelte-1jkrwn7.svelte-1jkrwn7,.tag-unfolded-point.svelte-1jkrwn7.svelte-1jkrwn7{transition:all 0.5s}.tag-point-wrapper.svelte-1jkrwn7 .tag-unfolded-point.svelte-1jkrwn7{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;height:100%;border-radius:50%}.tag-point-wrapper.svelte-1jkrwn7 .tag-unfolded-point.svelte-1jkrwn7: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-1jkrwn7 .tag-unfolded-point.svelte-1jkrwn7: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-1jkrwn7 .tag-folded-point.svelte-1jkrwn7{opacity:1;scale:1}.tag-point-wrapper.folded.svelte-1jkrwn7 .tag-unfolded-point.svelte-1jkrwn7{opacity:0;scale:1}.tag-point-wrapper.unfolded.svelte-1jkrwn7 .tag-folded-point.svelte-1jkrwn7{opacity:0;scale:0.2}.tag-point-wrapper.unfolded.svelte-1jkrwn7 .tag-unfolded-point.svelte-1jkrwn7{opacity:1;scale:1}')}function EP(i){let t,e,n,o,s,r,a,l,c,d,h,u;return o=new Vt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new Xh({props:{icon:i[2],width:i[1]}}),c.$on("iconLoaded",i[7]),{c(){t=V("div"),e=V("div"),n=se(),ie(o.$$.fragment),s=se(),r=V("div"),a=se(),l=V("div"),ie(c.$$.fragment),w(e,"class","tag-point-click-helper svelte-1jkrwn7"),w(r,"class","tag-unfolded-point svelte-1jkrwn7"),z(r,"transition-delay",(i[3]?i[5]:0)+"ms"),w(l,"class","tag-folded-point svelte-1jkrwn7"),z(l,"transition-delay",(i[3]?i[5]:0)+"ms"),w(t,"class","tag-point-wrapper svelte-1jkrwn7"),$(t,"unfolded",i[0]),$(t,"folded",i[3])},m(m,v){_(m,t,v),B(t,e),B(t,n),te(o,t,null),B(t,s),B(t,r),B(t,a),B(t,l),te(c,l,null),d=!0,h||(u=ke(e,"click",i[4]),h=!0)},p(m,[v]){v&8&&z(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&&z(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&&j(t),ne(o),ne(c),h=!1,u()}}}function kP(i,t,e){let n,o,s,r;const a=sn("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){Un.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:GA}),i.$$.dirty&64&&e(1,r=(()=>{var S,I,T,D;const C=(I=(S=l.style)==null?void 0:S.point)==null?void 0:I.width;if(typeof C=="number")return C;const k=(D=(T=l.style)==null?void 0:T.point)==null?void 0:D.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 xP extends de{constructor(t){super(),ce(this,t,kP,EP,le,{tag:6},IP)}}function DP(i){me(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 MP(i){let t;return{c(){t=V("div"),w(t,"data-info","tag content is disable")},m(e,n){_(e,t,n)},p:K,i:K,o:K,d(e){e&&j(t)}}}function SP(i){let t,e;return t=new Uh({props:{mediaStore:i[2],withAnimation:i[0],tag:Ge(i[1]),hooks:i[15],state:i[4],temporaryState:i[5],renderMap:i[3]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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=Ge(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){ne(t,n)}}}function LP(i){let t;return{c(){t=V("div"),w(t,"data-info","tag point is disable")},m(e,n){_(e,t,n)},p:K,i:K,o:K,d(e){e&&j(t)}}}function TP(i){let t,e;return t=new xP({props:{tag:i[1]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function zP(i){let t,e,n,o,s,r,a,l,c,d;const h=[SP,MP],u=[];function m(b,y){return b[13]?0:1}n=m(i),o=u[n]=h[n](i);const v=[TP,LP],g=[];function A(b,y){return b[14]?0:1}return r=A(i),a=g[r]=v[r](i),{c(){t=V("div"),e=V("div"),o.c(),s=se(),a.c(),w(e,"class",l=Oe(it("wrapper",i[1].className?`${i[1].className}__wrapper`:void 0))+" svelte-pzwdws"),w(e,"data-tag-unfolded",i[9]),w(e,"data-tag-id",i[12]),w(e,"data-content-type",c=i[1].contentType),z(e,"left",i[8]),z(e,"top",i[7]),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]),z(t,"z-index",i[6])},m(b,y){_(b,t,y),B(t,e),u[n].m(e,null),B(e,s),g[r].m(e,null),d=!0},p(b,[y]){let C=n;n=m(b),n===C?u[n].p(b,y):(he(),L(u[C],1,1,()=>{u[C]=null}),ue(),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):(he(),L(g[k],1,1,()=>{g[k]=null}),ue(),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=Oe(it("wrapper",b[1].className?`${b[1].className}__wrapper`:void 0))+" svelte-pzwdws"))&&w(e,"class",l),(!d||y&512)&&w(e,"data-tag-unfolded",b[9]),(!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&256&&z(e,"left",b[8]),y&128&&z(e,"top",b[7]),(!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&64&&z(t,"z-index",b[6])},i(b){d||(x(o),x(a),d=!0)},o(b){L(o),L(a),d=!1},d(b){b&&j(t),u[n].d(),g[r].d()}}}function jP(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=sn("hooks");return i.$$set=C=>{"withAnimation"in C&&e(0,u=C.withAnimation),"tag"in C&&e(1,m=C.tag),"mediaStore"in C&&e(2,v=C.mediaStore),"renderMap"in C&&e(3,g=C.renderMap),"state"in C&&e(4,A=C.state),"temporaryState"in C&&e(5,b=C.temporaryState)},i.$$.update=()=>{var C,k,S,I,T,D,X,J,G;i.$$.dirty&2&&e(14,n=(()=>{var R,F;return!(((F=(R=m.style)==null?void 0:R.point)==null?void 0:F.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=!((C=m.screenPosition)!=null&&C.leftPercent)||!((k=m.screenPosition)!=null&&k.topPercent)||m.enabled===!1||!m.state),i.$$.dirty&2&&e(10,a=!((S=m.state)!=null&&S.visible)||((I=m.temporaryState)==null?void 0:I.visible)===!1),i.$$.dirty&2&&e(9,l=(T=m.state)==null?void 0:T.unfolded),i.$$.dirty&2&&e(8,c=((D=m.screenPosition)==null?void 0:D.leftPercent)+"%"),i.$$.dirty&2&&e(7,d=((X=m.screenPosition)==null?void 0:X.topPercent)+"%"),i.$$.dirty&2&&e(6,h=(J=m.state)!=null&&J.unfolded?99999:(G=m.zIndex)!=null?G:0)},[u,m,v,g,A,b,h,d,c,l,a,r,s,o,n,y]}class VP extends de{constructor(t){super(),ce(this,t,jP,zP,le,{withAnimation:0,tag:1,mediaStore:2,renderMap:3,state:4,temporaryState:5},DP)}}function _P(i){me(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 qh(i,t,e){const n=i.slice();return n[7]=t[e],n}function Jh(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=qh(i,s,a),c=r(l);n.set(c,e[a]=Zh(c,l))}return{c(){t=V("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){_(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],he(),e=xt(e,l,r,1,a,s,n,t,an,Zh,null,qh),ue()),(!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&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Zh(i,t){let e,n,o;return n=new VP({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){_(s,e,r),te(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&&j(e),ne(n,s)}}}function OP(i){let t,e,n=i[4].enabled&&Jh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[4].enabled?n?(n.p(o,s),s&16&&x(n,1)):(n=Jh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function BP(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 Ws("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 de{constructor(t){super(),ce(this,t,BP,OP,le,{withAnimation:0,tags:1,hooks:6,mediaStore:2,renderMap:3,state:4,temporaryState:5},_P)}}const RP=new Gt.GLTFLoader;function GP(i){return new Promise((t,e)=>{function n(s){t(s)}function o(s){e(s)}RP.load(i,n,void 0,o)})}const FP=new Map,WP=new Map;class NP extends XA{constructor(e){super(e);f(this,"group",new O.Group);f(this,"renderMap",new Map);f(this,"imagePlaneGroup",new O.Group);f(this,"gltfObjectGroup",new O.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=GP(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 O.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(),ut(e)){if(this.getRenderType(e)==="Mesh"&&!e.mediaPlane){const l=e.data.mediaPosition.map(It);e.mediaPlane=new bd(e.data.mediaData[0].url,e.data.mediaPosition.map(It),{objectFit:e.data.objectFit});const c=new O.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 Cr&&((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(It);if(n.mediaPlane&&n.mediaPlane.removeFromParent(),r==="Image")n.mediaPlane=new bd(s,a,{objectFit:n.data.objectFit}),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 Cr(s,a,{videoCoverSrc:o.videoCoverUrl,playButton:n.data.playIcon,paused:!((u=n.data.autoplayConfig)!=null&&u.autoplayVideo),objectFit:n.data.objectFit,videoTextureMap:FP,ImageTextureMap:WP});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 O.Quaternion().setFromUnitVectors(d,h);c.css3DObject.setRotationFromQuaternion(u)}return}else{if(ut(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=Bs(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 Uh({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()}},ut(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=ut(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 O.Vector3().fromArray(r[0]),c=new O.Vector3().fromArray(r[2]),d=vn(l,c).add(new O.Vector3(0,0,5e-4)),h=new O.Matrix4().setPosition(d),u=new O.Matrix4().makeScale(o,o,o),m=new O.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(EA).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 Kh="Dnalogel-PanoTagPlugin",HP=i=>`${Kh}--${i}`;class ds extends NP{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=>{ut(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},N({},n)),this.debug=this.params.debug,this.config=this.params.config,zA(1,{namespace:yr.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(Kh," 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{yA(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 c,d;const a=this.getTagConfig(r);return Pe(N({},r),{enabled:(c=r.enabled)!=null?c:!0,id:(d=r.id)!=null?d:lt(),data:Ye(r.data,a.initialData,r.data),state:N({visible:void 0,unfolded:!this.can("fold",r)},a.initialState),hooks:new ve.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:h=>this.changeDataById(r.id,h)})}).filter(r=>r.position);return s.forEach(LA),this.tags.push(...s),xA(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=N({},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=It(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=N(N({},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=It(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}=fd(MA(()=>{this.store.resizeObserverDisposer&&o()},500),e),{observe:a,unobserve:l}=fd(ud(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){this.setModelMedialVisible(),this.tags.forEach(n=>{ut(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=Pe(N({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=Pe(N({},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 ud(()=>{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=Pe(N({},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(IA).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 E.Mesh(new E.BoxGeometry,new E.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=yo();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 $h=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))($h||{}),eu=(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))(eu||{}),tu=(i=>(i.Two="2D",i.Three="3D",i))(tu||{});const XP=(i,t)=>new ds(i,t);function YP(i){me(i,"svelte-m8w0ju",".guide-line__tag.svelte-m8w0ju{position:relative}.guide-line__tag-point.svelte-m8w0ju{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-m8w0ju{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-m8w0ju{position:absolute;left:-0.9375rem;bottom:1.9375rem;display:flex}.guide-line__tag-icon.svelte-m8w0ju{width:1.875rem;height:1.875rem;background-size:100%}.guide-line__tag-text.svelte-m8w0ju{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 nu(i){let t,e;return{c(){t=V("div"),e=Be(i[0]),w(t,"class","guide-line__tag-text svelte-m8w0ju"),z(t,"border-image-source",`url(${i[3]})`)},m(n,o){_(n,t,o),B(t,e)},p(n,o){o&1&&Re(e,n[0])},d(n){n&&j(t)}}}function UP(i){let t,e,n,o,s,r,a,l,c=i[0]&&nu(i);return{c(){t=V("div"),e=V("div"),n=se(),o=V("div"),s=se(),r=V("div"),a=V("div"),l=se(),c&&c.c(),w(e,"class","guide-line__tag-point svelte-m8w0ju"),w(o,"class","guide-line__tag-line svelte-m8w0ju"),w(a,"class","guide-line__tag-icon svelte-m8w0ju"),z(a,"background-image",`url(${i[1]})`),w(r,"class","guide-line__tag-content svelte-m8w0ju"),w(t,"class","guide-line__tag svelte-m8w0ju"),z(t,"opacity",i[2])},m(d,h){_(d,t,h),B(t,e),B(t,n),B(t,o),B(t,s),B(t,r),B(r,a),B(r,l),c&&c.m(r,null)},p(d,[h]){h&2&&z(a,"background-image",`url(${d[1]})`),d[0]?c?c.p(d,h):(c=nu(d),c.c(),c.m(r,null)):c&&(c.d(1),c=null),h&4&&z(t,"opacity",d[2])},i:K,o:K,d(d){d&&j(t),c&&c.d()}}}function qP(i,t,e){let{text:n=""}=t,{icon_url:o=""}=t,{opacity:s=1}=t;const r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHUAAAA2CAMAAADOFiZMAAACEFBMVEUAAACIiIheXl5oaGh6enpsbGxiYmJ9fX1wcHBXV1eBgYFzc3NSUlKNjY2Dg4NOTk51dXVXV1dmZmZTU1N3d3dcXFyMjIyEhIRNTU2QkJC0tLS5ubnHx8fOzs6np6exsbHKysqoqKi9vb3U1NTPz8/Nzc2vr6/Dw8OysrK/v7/X19fS0tKurq62traqqqrJycmurq64uLifn5/Dw8O6urqQkJC6urro6Ojt7e3o6OjU1NS3t7fBwcGjo6Ozs7Orq6u1tbXAwMCurq6rq6vy8vLx8fHr6+vp6enZ2dnd3d3a2trX19fV1dW/v7/IyMihoaGampqVlZWLi4uCgoK+vr6urq7m5ubw8PDk5OTu7u7i4uLg4ODe3t7q6urS0tLi4uLOzs7e3t7Hx8fa2tqrq6vExMTAwMCnp6efn5+WlpaHh4ezs7OoqKiJiYm6urqZmZmurq59fX29vb23t7e4uLipqanp6enc3Nza2trW1tbT09Pm5ubj4+PQ0NDg4ODExMTCwsK7u7vBwcG8vLy5ubm8vLy+vr64uLiysrKdnZ3CwsJoaGisrKzHx8ekpKTExMTv7+/i4uLa2trm5ubk5OTLy8vKysrExMTQ0NDX19ecnJzT09N/f3+dnZ12dnaQkJCXl5etra3Pz8+4uLiXl5fGxsaqqqrr6+vQ0NDKysrNzc3W1takpKShoaGsrKysrKyduRZkAAAAsHRSTlMATE1NTExMTUxNTExMTExNTExMTU1MTU1MTICFc313fnl0iIWAe3h3aYqIgXx7eXZzcnFwaGggxLiog4J0dG9mZF82FMfEtK2pkYqKh3x4cm1rZmEmH8G/vry6trOxoZ2clpKOe3ptbWZjYmFgXFpaVlFPSDYlx7CspaSjoJ6akY6HfXt4bGpmY1xUU0g2LSzCuK6lopiWhoF3YmFaVlZUUU5KPyEJCcl/fXNdXFxZUIUrIQsAAAV6SURBVFjDvZj3VxNBEMePBBIOQgmEQGghISSASSBBUQFBVIpUEaR3aVJExN4F6fbee6//opPN2507E3P7fD4+b54z+935zt7lvPsBYbZ5lyXT7R5xms2ppaVpV615eVeuXL48PPzw4YPBwYsX+/vPnT1bW1t75u7p0729PT13urs7O9vbt2/ffurUp1OQ2ts7O7u77/T09PaevnvmTG3t2XPn+vsvDg4+GH5UVjl/SAjGe29La2vr5EFgm4+WlpYDgNfrbW7etQuuKDPTPTIy4nSa4bJ8lKYBV69arXmA1WpN81FamgqYzU6n0+12ZwI+qzPtyvDlR0dPCoGsecW4FEZcShwEyUDIGvtD+DcOZlrzFvcE3qylFXZ1cTqIgGk0K1xRSL84abaWtwl/8KM5kTiok04B2BpAPUWXAoGnQK3gn0xNW90ryDhpafXvJsYlJuoSdRCyTJHqBOxR9IvbUl1/PN5pL9tFR4gTJJmi7N+wl8qf7k33S+YQE0VRJwZz42RogDZcAxx+sTn1jSDho6VFBKAbp9K1XqfXi3oRgmSqQ2AGePziNpfs2GN2lV5Pp+IJkkwIrDFz+Y+Y90h/Yvtz+f0o1YGnc/lVXvshASk8IHUm6ZMIYhI6YAEyqyHkE/n8Kkuh5AX6ZVdBlypJpRJVIgTJ0IluEGCb1BDYCzWFx79h/yl5ZV3PVUSVAQIDFhCyLO/h9E9KfuOPriOqzUFjmRYYueOqTWLGfhPfHZcGrkOlgcAGskZdAV7/eIVA2eN6qZGA3Yhcxxozn3+mkD3ZQ64Z3EnQJEBouMB+Xr+68LpAuTZBOokDoPXfNIK85vZP5AqUreNqdYI6AUINkBrAtUatgaA67mEft38GvxRThWopOAFrBbj9kYXsa3z0mnrTsLAHe3yRzxGhjoBQ0BT848foqfONkT6FAAWrce3PeEpA5vZPsDf23aIhgpfIiEiIiH/mKftPfKJxTjaNv8bM6zlSzk5dmIsMDk7EGrMEbj+e+q5xLjoyOrQbGiCCaZh5/PgLzy8YiIrgNPmaZtQovP6J3ezNafTvxEfHQ2An8v/2K47hV4J0ExVBDbNCD4e/nH0lKj1+1RBvMEQboiEMUJI1BOmmGq0pVOP1z3nYF3G53EAIN4SHx4djNyxAkutQA1QnGeD2z3rY199RIZ+EtVxDPaDm9VdspYcWj65pteFaonIDBghpzeXyzNNTbyy8CpgCyCehjnvYx+uf9RTTU9cbo7SbRPmKQBnzaKMI2igthD8jVAvIuM/rXytjfyz4MFqBDgLWPGuA05/sqRQobaOzsBMbFQsRhaAWco/A6Z92FAuU446wWL+aHJWcHJtMOzEDwWrU+PyvHEcFRlkutELInT4NFiCRGqA6yQDWfH5jWdFegXLL8V3qDIsNIySHoRsWIGMN/wBY8/mXRosFxrrDCE20EwJzCGQ9XP7crBN46AdHbthmkPvluICccLzgchnDjBD/eqaxKOOtIKGyiEzDqSFOCt7D4X/dlHFDkNCWPu3fjTHGQBgpbI06TkeIpuQ37bbltAlSKstM/g6EdYcEr0jJv2rLfrZXkFKcPhVjMsWY0GGSrTn00H7TakbD11sChd7qa+gCSKdJVitpyvWLlab6uifsieKtLk1N7QZWtvpYXl4aGxsrAtIJBQVNWVlZOTkZGRm2z7bHW0q2lJRkZ2c3NOTn19fV19fn5zfAsmQL8Nhmg66cHOhvKigoSC/Iysk+vH9//jd2n8g6TG7yjbXZYCAMq6s7fBiah4aGLl0aGLhw4f758zuBmpq+vurq6h07dnR1dXTcrqqq2uejqup2R0dXF8jV1X19NTU1O3feu3f+/oWBgUtD++uePHtbLAThNzRClbi+VnseAAAAAElFTkSuQmCC";return i.$$set=a=>{"text"in a&&e(0,n=a.text),"icon_url"in a&&e(1,o=a.icon_url),"opacity"in a&&e(2,s=a.opacity)},[n,o,s,r]}class JP extends de{constructor(t){super(),ce(this,t,qP,UP,le,{text:0,icon_url:1,opacity:2},YP)}}function ZP(i){return i.length===0?[]:i.filter((t,e)=>t!==i[e-1])}const KP=`
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 Ob(i){let t,e,n;return{c(){t=V("button"),w(t,"class","sc-carousel-button sc-carousel-dot__dot svelte-1mgyhhn"),$(t,"sc-carousel-dot__dot_active",i[0])},m(o,s){_(o,t,s),e||(n=ke(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&&j(t),e=!1,n()}}}function Bb(i,t,e){let{active:n=!1}=t;function o(s){Un.call(this,i,s)}return i.$$set=s=>{"active"in s&&e(0,n=s.active)},[n,o]}class Qb extends de{constructor(t){super(),ce(this,t,Bb,Ob,le,{active:0},_b)}}function Rb(i){me(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 _d(i,t,e){const n=i.slice();return n[5]=t[e],n[7]=e,n}function Od(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=V("div"),ie(n.$$.fragment),o=se(),w(e,"class","sc-carousel-dots__dot-container svelte-670fde"),this.first=e},m(a,l){_(a,e,l),te(n,e,null),B(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&&j(e),ne(n)}}}function Gb(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=_d(i,s,a),c=r(l);n.set(c,e[a]=Od(c,l))}return{c(){t=V("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){_(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]),he(),e=xt(e,l,r,1,a,s,n,t,an,Od,null,_d),ue())},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&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Fb(i,t,e){const n=Mo();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 Wb extends de{constructor(t){super(),ce(this,t,Fb,Gb,le,{pagesCount:0,currentPageIndex:1},Rb)}}const ci="prev",hn="next";function Nb(i){me(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 Hb(i){let t,e,n,o;return{c(){t=V("button"),e=V("i"),w(e,"class","sc-carousel-arrow__arrow svelte-1bftafx"),$(e,"sc-carousel-arrow__arrow-next",i[0]===hn),$(e,"sc-carousel-arrow__arrow-prev",i[0]===ci),w(t,"class","sc-carousel-button sc-carousel-arrow__circle svelte-1bftafx"),$(t,"sc-carousel-arrow__circle_disabled",i[1])},m(s,r){_(s,t,r),B(t,e),n||(o=ke(t,"click",i[2]),n=!0)},p(s,[r]){r&1&&$(e,"sc-carousel-arrow__arrow-next",s[0]===hn),r&1&&$(e,"sc-carousel-arrow__arrow-prev",s[0]===ci),r&2&&$(t,"sc-carousel-arrow__circle_disabled",s[1])},i:K,o:K,d(s){s&&j(t),n=!1,o()}}}function Xb(i,t,e){let{direction:n=hn}=t,{disabled:o=!1}=t;function s(r){Un.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 Bd extends de{constructor(t){super(),ce(this,t,Xb,Hb,le,{direction:0,disabled:1},Nb)}}function Yb(i){me(i,"svelte-i7yfid",".sc-carousel-progress__indicator.svelte-i7yfid{height:100%;background-color:var(--sc-color-hex-dark-50p)}")}function Ub(i){let t;return{c(){t=V("div"),w(t,"class","sc-carousel-progress__indicator svelte-i7yfid"),z(t,"width",i[0]+"%")},m(e,n){_(e,t,n)},p(e,[n]){n&1&&z(t,"width",e[0]+"%")},i:K,o:K,d(e){e&&j(t)}}}const Qd=100;function qb(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*Qd,0),Qd))},[n,o]}class Jb extends de{constructor(t){super(),ce(this,t,qb,Ub,le,{value:1},Yb)}}function Zb(i,t){i.addEventListener("mousedown",t),i.addEventListener("touchstart",t,{passive:!0})}function Kb(i,t){i.removeEventListener("mousedown",t),i.removeEventListener("touchstart",t)}function $b(i,t){i.addEventListener("mouseup",t),i.addEventListener("touchend",t)}function Rd(i,t){i.removeEventListener("mouseup",t),i.removeEventListener("touchend",t)}function e1(i,t){i.addEventListener("mousemove",t),i.addEventListener("touchmove",t)}function Gd(i,t){i.removeEventListener("mousemove",t),i.removeEventListener("touchmove",t)}function xr(i){return function(t,e){i.dispatchEvent(new CustomEvent(t,{detail:e}))}}const t1=110,n1=9,i1=111,o1=20;function Dr(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 s1(i,{thresholdProvider:t}){const e=xr(i);let n,o,s=0,r,a=!1;function l(){return Date.now()-r>=i1&&Math.abs(s)>=o1}function c(u){r=Date.now(),s=0,a=!0;const m=Dr(u);n=m.x,o=m.y,e("swipeStart",{x:n,y:o}),e1(window,d),$b(window,h)}function d(u){if(!a)return;const m=Dr(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?ci:hn}),Rd(window,h),Gd(window,d))}function h(u){if(Rd(window,h),Gd(window,d),a=!1,!l()){e("swipeFailed");return}const m=Dr(u);e("swipeEnd",{x:m.x,y:m.y})}return Zb(i,c),{destroy(){Kb(i,c)}}}function r1(i,t){i.addEventListener("mouseenter",t)}function a1(i,t){i.removeEventListener("mouseenter",t)}function l1(i,t){i.addEventListener("mouseleave",t)}function Fd(i,t){i.removeEventListener("mouseleave",t)}function c1(i){const t=xr(i);function e(){l1(i,n),t("hovered",{value:!0})}function n(){t("hovered",{value:!1}),Fd(i,n)}return r1(i,e),{destroy(){a1(i,e),Fd(i,n)}}}const d1=(i,t)=>{const e=t.x-i.x,n=t.y-i.y;return Math.sqrt(e*e+n*n)};function di(i,t,e){return Math.max(i,Math.min(t,e))}function h1(i,t){i.addEventListener("touchstart",t,{passive:!0})}function u1(i,t){i.removeEventListener("touchstart",t)}function f1(i,t){i.addEventListener("touchend",t)}function Wd(i,t){i.removeEventListener("touchend",t)}function m1(i){const t=xr(i);let e=0,n={x:0,y:0};function o({tapEndedAt:a,tapEndedPos:l}){const c=a-e,d=d1(n,l);return c<=t1&&d<=n1}function s(a){e=Date.now();const l=a.touches[0];n={x:l.clientX,y:l.clientY},f1(i,r)}function r(a){Wd(i,r);const l=a.changedTouches[0];o({tapEndedAt:Date.now(),tapEndedPos:{x:l.clientX,y:l.clientY}})&&t("tapped")}return h1(i,s),{destroy(){u1(i,s),Wd(i,r)}}}function p1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:o}){return i===t-e?0:i===0?Nd({particlesCountWithoutClones:t-n,particlesToScroll:o})-1:Math.floor((i-e)/o)}function g1({currentParticleIndex:i,particlesToScroll:t}){return Math.ceil(i/t)}function v1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,infinite:o,particlesToScroll:s}){return o?p1({currentParticleIndex:i,particlesCount:t,clonesCountHead:e,clonesCountTotal:n,particlesToScroll:s}):g1({currentParticleIndex:i,particlesToScroll:s})}function Nd({particlesCountWithoutClones:i,particlesToScroll:t}){return Math.ceil(i/t)}function A1({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e}){const n=Hd({particlesCountWithoutClones:i,particlesToScroll:t,particlesToShow:e});return Math.ceil(i/t)-n}function b1({infinite:i,particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n}){return i?Nd({particlesCountWithoutClones:t,particlesToScroll:e}):A1({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n})}function y1({pageIndex:i,clonesCountHead:t,clonesCountTail:e,particlesToScroll:n,particlesCount:o}){return di(0,Math.min(t+i*n,o-e),o-1)}function w1({pageIndex:i,particlesToScroll:t,particlesCount:e,particlesToShow:n}){return di(0,Math.min(i*t,e-n),e-1)}function Mr({infinite:i,pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s,particlesToShow:r}){return i?y1({pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:o,particlesCount:s}):w1({pageIndex:t,particlesToScroll:o,particlesCount:s,particlesToShow:r})}function P1({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 Hd({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 C1(i){return new ResizeObserver(t=>{i({width:t[0].contentRect.width})})}function I1({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 E1({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 k1({infinite:i,particlesToShow:t,partialPageSize:e}){const n=i?{head:Math.ceil(e||t),tail:Math.ceil(t)}:{head:0,tail:0};return Pe(N({},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},Sr=i=>t=>{i[t]&&i[t]()};var x1="Expected a function",Xd="__lodash_hash_undefined__",Yd=1/0,D1="[object Function]",M1="[object GeneratorFunction]",S1="[object Symbol]",L1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T1=/^\w*$/,z1=/^\./,j1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V1=/[\\^$.*+?()[\]{}|]/g,_1=/\\(\\)?/g,O1=/^\[object .+?Constructor\]$/,B1=typeof wt=="object"&&wt&&wt.Object===Object&&wt,Q1=typeof self=="object"&&self&&self.Object===Object&&self,Lr=B1||Q1||Function("return this")();function R1(i,t){return i==null?void 0:i[t]}function G1(i){var t=!1;if(i!=null&&typeof i.toString!="function")try{t=!!(i+"")}catch(e){}return t}var F1=Array.prototype,W1=Function.prototype,Ud=Object.prototype,Tr=Lr["__core-js_shared__"],qd=function(){var i=/[^.]+$/.exec(Tr&&Tr.keys&&Tr.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Jd=W1.toString,zr=Ud.hasOwnProperty,Zd=Ud.toString,N1=RegExp("^"+Jd.call(zr).replace(V1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kd=Lr.Symbol,H1=F1.splice,X1=th(Lr,"Map"),Ni=th(Object,"create"),$d=Kd?Kd.prototype:void 0,eh=$d?$d.toString:void 0;function En(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 Y1(){this.__data__=Ni?Ni(null):{}}function U1(i){return this.has(i)&&delete this.__data__[i]}function q1(i){var t=this.__data__;if(Ni){var e=t[i];return e===Xd?void 0:e}return zr.call(t,i)?t[i]:void 0}function J1(i){var t=this.__data__;return Ni?t[i]!==void 0:zr.call(t,i)}function Z1(i,t){var e=this.__data__;return e[i]=Ni&&t===void 0?Xd:t,this}En.prototype.clear=Y1,En.prototype.delete=U1,En.prototype.get=q1,En.prototype.has=J1,En.prototype.set=Z1;function hi(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 K1(){this.__data__=[]}function $1(i){var t=this.__data__,e=is(t,i);if(e<0)return!1;var n=t.length-1;return e==n?t.pop():H1.call(t,e,1),!0}function ey(i){var t=this.__data__,e=is(t,i);return e<0?void 0:t[e][1]}function ty(i){return is(this.__data__,i)>-1}function ny(i,t){var e=this.__data__,n=is(e,i);return n<0?e.push([i,t]):e[n][1]=t,this}hi.prototype.clear=K1,hi.prototype.delete=$1,hi.prototype.get=ey,hi.prototype.has=ty,hi.prototype.set=ny;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__={hash:new En,map:new(X1||hi),string:new En}}function oy(i){return os(this,i).delete(i)}function sy(i){return os(this,i).get(i)}function ry(i){return os(this,i).has(i)}function ay(i,t){return os(this,i).set(i,t),this}kn.prototype.clear=iy,kn.prototype.delete=oy,kn.prototype.get=sy,kn.prototype.has=ry,kn.prototype.set=ay;function is(i,t){for(var e=i.length;e--;)if(Ay(i[e][0],t))return e;return-1}function ly(i,t){t=uy(t,i)?[t]:hy(t);for(var e=0,n=t.length;i!=null&&e<n;)i=i[gy(t[e++])];return e&&e==n?i:void 0}function cy(i){if(!ih(i)||my(i))return!1;var t=by(i)||G1(i)?N1:O1;return t.test(vy(i))}function dy(i){if(typeof i=="string")return i;if(Vr(i))return eh?eh.call(i):"";var t=i+"";return t=="0"&&1/i==-Yd?"-0":t}function hy(i){return nh(i)?i:py(i)}function os(i,t){var e=i.__data__;return fy(t)?e[typeof t=="string"?"string":"hash"]:e.map}function th(i,t){var e=R1(i,t);return cy(e)?e:void 0}function uy(i,t){if(nh(i))return!1;var e=typeof i;return e=="number"||e=="symbol"||e=="boolean"||i==null||Vr(i)?!0:T1.test(i)||!L1.test(i)||t!=null&&i in Object(t)}function fy(i){var t=typeof i;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?i!=="__proto__":i===null}function my(i){return!!qd&&qd in i}var py=jr(function(i){i=wy(i);var t=[];return z1.test(i)&&t.push(""),i.replace(j1,function(e,n,o,s){t.push(o?s.replace(_1,"$1"):n||e)}),t});function gy(i){if(typeof i=="string"||Vr(i))return i;var t=i+"";return t=="0"&&1/i==-Yd?"-0":t}function vy(i){if(i!=null){try{return Jd.call(i)}catch(t){}try{return i+""}catch(t){}}return""}function jr(i,t){if(typeof i!="function"||t&&typeof t!="function")throw new TypeError(x1);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(jr.Cache||kn),e}jr.Cache=kn;function Ay(i,t){return i===t||i!==i&&t!==t}var nh=Array.isArray;function by(i){var t=ih(i)?Zd.call(i):"";return t==D1||t==M1}function ih(i){var t=typeof i;return!!i&&(t=="object"||t=="function")}function yy(i){return!!i&&typeof i=="object"}function Vr(i){return typeof i=="symbol"||yy(i)&&Zd.call(i)==S1}function wy(i){return i==null?"":dy(i)}function Py(i,t,e){var n=i==null?void 0:ly(i,t);return n===void 0?e:n}var ss=Py,rs={},Cy={get exports(){return rs},set exports(i){rs=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]",C="[object Symbol]",k="[object WeakMap]",S="[object ArrayBuffer]",I="[object DataView]",T="[object Float32Array]",D="[object Float64Array]",X="[object Int8Array]",J="[object Int16Array]",G="[object Int32Array]",R="[object Uint8Array]",F="[object Uint8ClampedArray]",Q="[object Uint16Array]",W="[object Uint32Array]",q=/[\\^$.*+?()[\]{}|]/g,U=/\w*$/,Z=/^\[object .+?Constructor\]$/,ae=/^(?:0|[1-9]\d*)$/,oe={};oe[s]=oe[r]=oe[S]=oe[I]=oe[a]=oe[l]=oe[T]=oe[D]=oe[X]=oe[J]=oe[G]=oe[u]=oe[m]=oe[v]=oe[A]=oe[b]=oe[y]=oe[C]=oe[R]=oe[F]=oe[Q]=oe[W]=!0,oe[c]=oe[d]=oe[k]=!1;var ye=typeof wt=="object"&&wt&&wt.Object===Object&&wt,Ce=typeof self=="object"&&self&&self.Object===Object&&self,Ae=ye||Ce||Function("return this")(),Ve=t&&!t.nodeType&&t,be=Ve&&!0&&i&&!i.nodeType&&i,Ne=be&&be.exports===Ve;function fe(p,P){return p.set(P[0],P[1]),p}function we(p,P){return p.add(P),p}function Te(p,P){for(var M=-1,H=p?p.length:0;++M<H&&P(p[M],M,p)!==!1;);return p}function pe(p,P){for(var M=-1,H=P.length,Ie=p.length;++M<H;)p[Ie+M]=P[M];return p}function Ze(p,P,M,H){var Ie=-1,ge=p?p.length:0;for(H&&ge&&(M=p[++Ie]);++Ie<ge;)M=P(M,p[Ie],Ie,p);return M}function dt(p,P){for(var M=-1,H=Array(p);++M<p;)H[M]=P(M);return H}function De(p,P){return p==null?void 0:p[P]}function ot(p){var P=!1;if(p!=null&&typeof p.toString!="function")try{P=!!(p+"")}catch(M){}return P}function re(p){var P=-1,M=Array(p.size);return p.forEach(function(H,Ie){M[++P]=[Ie,H]}),M}function xe(p,P){return function(M){return p(P(M))}}function Fe(p){var P=-1,M=Array(p.size);return p.forEach(function(H){M[++P]=H}),M}var ft=Array.prototype,Yt=Function.prototype,At=Object.prototype,bt=Ae["__core-js_shared__"],_e=function(){var p=/[^.]+$/.exec(bt&&bt.keys&&bt.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),Qe=Yt.toString,Ue=At.hasOwnProperty,Mt=At.toString,Ui=RegExp("^"+Qe.call(Ue).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ot=Ne?Ae.Buffer:void 0,fn=Ae.Symbol,Dn=Ae.Uint8Array,mt=xe(Object.getPrototypeOf,Object),mi=Object.create,pi=At.propertyIsEnumerable,Ur=ft.splice,qi=Object.getOwnPropertySymbols,gi=Ot?Ot.isBuffer:void 0,ps=xe(Object.keys,Object),vi=Lt(Ae,"DataView"),Mn=Lt(Ae,"Map"),St=Lt(Ae,"Promise"),Ai=Lt(Ae,"Set"),Ji=Lt(Ae,"WeakMap"),Sn=Lt(Object,"create"),Zi=ht(vi),Ln=ht(Mn),Ki=ht(St),$i=ht(Ai),eo=ht(Ji),mn=fn?fn.prototype:void 0,gs=mn?mn.valueOf:void 0;function Ut(p){var P=-1,M=p?p.length:0;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function qr(){this.__data__=Sn?Sn(null):{}}function Jr(p){return this.has(p)&&delete this.__data__[p]}function Zr(p){var P=this.__data__;if(Sn){var M=P[p];return M===n?void 0:M}return Ue.call(P,p)?P[p]:void 0}function vs(p){var P=this.__data__;return Sn?P[p]!==void 0:Ue.call(P,p)}function to(p,P){var M=this.__data__;return M[p]=Sn&&P===void 0?n:P,this}Ut.prototype.clear=qr,Ut.prototype.delete=Jr,Ut.prototype.get=Zr,Ut.prototype.has=vs,Ut.prototype.set=to;function Ke(p){var P=-1,M=p?p.length:0;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function Kr(){this.__data__=[]}function $r(p){var P=this.__data__,M=yi(P,p);if(M<0)return!1;var H=P.length-1;return M==H?P.pop():Ur.call(P,M,1),!0}function ea(p){var P=this.__data__,M=yi(P,p);return M<0?void 0:P[M][1]}function ta(p){return yi(this.__data__,p)>-1}function na(p,P){var M=this.__data__,H=yi(M,p);return H<0?M.push([p,P]):M[H][1]=P,this}Ke.prototype.clear=Kr,Ke.prototype.delete=$r,Ke.prototype.get=ea,Ke.prototype.has=ta,Ke.prototype.set=na;function st(p){var P=-1,M=p?p.length:0;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function ia(){this.__data__={hash:new Ut,map:new(Mn||Ke),string:new Ut}}function oa(p){return zn(this,p).delete(p)}function sa(p){return zn(this,p).get(p)}function ra(p){return zn(this,p).has(p)}function aa(p,P){return zn(this,p).set(p,P),this}st.prototype.clear=ia,st.prototype.delete=oa,st.prototype.get=sa,st.prototype.has=ra,st.prototype.set=aa;function pt(p){this.__data__=new Ke(p)}function la(){this.__data__=new Ke}function ca(p){return this.__data__.delete(p)}function da(p){return this.__data__.get(p)}function ha(p){return this.__data__.has(p)}function ua(p,P){var M=this.__data__;if(M instanceof Ke){var H=M.__data__;if(!Mn||H.length<e-1)return H.push([p,P]),this;M=this.__data__=new st(H)}return M.set(p,P),this}pt.prototype.clear=la,pt.prototype.delete=ca,pt.prototype.get=da,pt.prototype.has=ha,pt.prototype.set=ua;function bi(p,P){var M=so(p)||Pi(p)?dt(p.length,String):[],H=M.length,Ie=!!H;for(var ge in p)(P||Ue.call(p,ge))&&!(Ie&&(ge=="length"||ka(ge,H)))&&M.push(ge);return M}function As(p,P,M){var H=p[P];(!(Ue.call(p,P)&&Cs(H,M))||M===void 0&&!(P in p))&&(p[P]=M)}function yi(p,P){for(var M=p.length;M--;)if(Cs(p[M][0],P))return M;return-1}function Bt(p,P){return p&&oo(P,ao(P),p)}function no(p,P,M,H,Ie,ge,Me){var Le;if(H&&(Le=ge?H(p,Ie,ge,Me):H(p)),Le!==void 0)return Le;if(!Rt(p))return p;var He=so(p);if(He){if(Le=Ia(p),!P)return wa(p,Le)}else{var je=Jt(p),rt=je==d||je==h;if(Is(p))return wi(p,P);if(je==v||je==s||rt&&!ge){if(ot(p))return ge?p:{};if(Le=Qt(rt?{}:p),!P)return Pa(p,Bt(Le,p))}else{if(!oe[je])return ge?p:{};Le=Ea(p,je,no,P)}}Me||(Me=new pt);var gt=Me.get(p);if(gt)return gt;if(Me.set(p,Le),!He)var Xe=M?Ca(p):ao(p);return Te(Xe||p,function(at,$e){Xe&&($e=at,at=p[$e]),As(Le,$e,no(at,P,M,H,$e,p,Me))}),Le}function fa(p){return Rt(p)?mi(p):{}}function ma(p,P,M){var H=P(p);return so(p)?H:pe(H,M(p))}function pa(p){return Mt.call(p)}function ga(p){if(!Rt(p)||Da(p))return!1;var P=ro(p)||ot(p)?Ui:Z;return P.test(ht(p))}function va(p){if(!ws(p))return ps(p);var P=[];for(var M in Object(p))Ue.call(p,M)&&M!="constructor"&&P.push(M);return P}function wi(p,P){if(P)return p.slice();var M=new p.constructor(p.length);return p.copy(M),M}function io(p){var P=new p.constructor(p.byteLength);return new Dn(P).set(new Dn(p)),P}function Tn(p,P){var M=P?io(p.buffer):p.buffer;return new p.constructor(M,p.byteOffset,p.byteLength)}function bs(p,P,M){var H=P?M(re(p),!0):re(p);return Ze(H,fe,new p.constructor)}function ys(p){var P=new p.constructor(p.source,U.exec(p));return P.lastIndex=p.lastIndex,P}function Aa(p,P,M){var H=P?M(Fe(p),!0):Fe(p);return Ze(H,we,new p.constructor)}function ba(p){return gs?Object(gs.call(p)):{}}function ya(p,P){var M=P?io(p.buffer):p.buffer;return new p.constructor(M,p.byteOffset,p.length)}function wa(p,P){var M=-1,H=p.length;for(P||(P=Array(H));++M<H;)P[M]=p[M];return P}function oo(p,P,M,H){M||(M={});for(var Ie=-1,ge=P.length;++Ie<ge;){var Me=P[Ie],Le=H?H(M[Me],p[Me],Me,M,p):void 0;As(M,Me,Le===void 0?p[Me]:Le)}return M}function Pa(p,P){return oo(p,qt(p),P)}function Ca(p){return ma(p,ao,qt)}function zn(p,P){var M=p.__data__;return xa(P)?M[typeof P=="string"?"string":"hash"]:M.map}function Lt(p,P){var M=De(p,P);return ga(M)?M:void 0}var qt=qi?xe(qi,Object):Sa,Jt=pa;(vi&&Jt(new vi(new ArrayBuffer(1)))!=I||Mn&&Jt(new Mn)!=u||St&&Jt(St.resolve())!=g||Ai&&Jt(new Ai)!=b||Ji&&Jt(new Ji)!=k)&&(Jt=function(p){var P=Mt.call(p),M=P==v?p.constructor:void 0,H=M?ht(M):void 0;if(H)switch(H){case Zi:return I;case Ln:return u;case Ki:return g;case $i:return b;case eo:return k}return P});function Ia(p){var P=p.length,M=p.constructor(P);return P&&typeof p[0]=="string"&&Ue.call(p,"index")&&(M.index=p.index,M.input=p.input),M}function Qt(p){return typeof p.constructor=="function"&&!ws(p)?fa(mt(p)):{}}function Ea(p,P,M,H){var Ie=p.constructor;switch(P){case S:return io(p);case a:case l:return new Ie(+p);case I:return Tn(p,H);case T:case D:case X:case J:case G:case R:case F:case Q:case W:return ya(p,H);case u:return bs(p,H,M);case m:case y:return new Ie(p);case A:return ys(p);case b:return Aa(p,H,M);case C:return ba(p)}}function ka(p,P){return P=P==null?o:P,!!P&&(typeof p=="number"||ae.test(p))&&p>-1&&p%1==0&&p<P}function xa(p){var P=typeof p;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?p!=="__proto__":p===null}function Da(p){return!!_e&&_e in p}function ws(p){var P=p&&p.constructor,M=typeof P=="function"&&P.prototype||At;return p===M}function ht(p){if(p!=null){try{return Qe.call(p)}catch(P){}try{return p+""}catch(P){}}return""}function Ps(p){return no(p,!0,!0)}function Cs(p,P){return p===P||p!==p&&P!==P}function Pi(p){return Ma(p)&&Ue.call(p,"callee")&&(!pi.call(p,"callee")||Mt.call(p)==s)}var so=Array.isArray;function Ci(p){return p!=null&&Es(p.length)&&!ro(p)}function Ma(p){return ks(p)&&Ci(p)}var Is=gi||La;function ro(p){var P=Rt(p)?Mt.call(p):"";return P==d||P==h}function Es(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=o}function Rt(p){var P=typeof p;return!!p&&(P=="object"||P=="function")}function ks(p){return!!p&&typeof p=="object"}function ao(p){return Ci(p)?bi(p):va(p)}function Sa(){return[]}function La(){return!1}i.exports=Ps})(Cy,rs);const Iy=rs;var as={},Ey={get exports(){return as},set exports(i){as=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]",C="[object Promise]",k="[object Proxy]",S="[object RegExp]",I="[object Set]",T="[object String]",D="[object Symbol]",X="[object Undefined]",J="[object WeakMap]",G="[object ArrayBuffer]",R="[object DataView]",F="[object Float32Array]",Q="[object Float64Array]",W="[object Int8Array]",q="[object Int16Array]",U="[object Int32Array]",Z="[object Uint8Array]",ae="[object Uint8ClampedArray]",oe="[object Uint16Array]",ye="[object Uint32Array]",Ce=/[\\^$.*+?()[\]{}|]/g,Ae=/^\[object .+?Constructor\]$/,Ve=/^(?:0|[1-9]\d*)$/,be={};be[F]=be[Q]=be[W]=be[q]=be[U]=be[Z]=be[ae]=be[oe]=be[ye]=!0,be[a]=be[l]=be[G]=be[d]=be[R]=be[h]=be[u]=be[m]=be[g]=be[A]=be[y]=be[S]=be[I]=be[T]=be[J]=!1;var Ne=typeof wt=="object"&&wt&&wt.Object===Object&&wt,fe=typeof self=="object"&&self&&self.Object===Object&&self,we=Ne||fe||Function("return this")(),Te=t&&!t.nodeType&&t,pe=Te&&!0&&i&&!i.nodeType&&i,Ze=pe&&pe.exports===Te,dt=Ze&&Ne.process,De=function(){try{return dt&&dt.binding&&dt.binding("util")}catch(p){}}(),ot=De&&De.isTypedArray;function re(p,P){for(var M=-1,H=p==null?0:p.length,Ie=0,ge=[];++M<H;){var Me=p[M];P(Me,M,p)&&(ge[Ie++]=Me)}return ge}function xe(p,P){for(var M=-1,H=P.length,Ie=p.length;++M<H;)p[Ie+M]=P[M];return p}function Fe(p,P){for(var M=-1,H=p==null?0:p.length;++M<H;)if(P(p[M],M,p))return!0;return!1}function ft(p,P){for(var M=-1,H=Array(p);++M<p;)H[M]=P(M);return H}function Yt(p){return function(P){return p(P)}}function At(p,P){return p.has(P)}function bt(p,P){return p==null?void 0:p[P]}function _e(p){var P=-1,M=Array(p.size);return p.forEach(function(H,Ie){M[++P]=[Ie,H]}),M}function Qe(p,P){return function(M){return p(P(M))}}function Ue(p){var P=-1,M=Array(p.size);return p.forEach(function(H){M[++P]=H}),M}var Mt=Array.prototype,Ui=Function.prototype,Ot=Object.prototype,fn=we["__core-js_shared__"],Dn=Ui.toString,mt=Ot.hasOwnProperty,mi=function(){var p=/[^.]+$/.exec(fn&&fn.keys&&fn.keys.IE_PROTO||"");return p?"Symbol(src)_1."+p:""}(),pi=Ot.toString,Ur=RegExp("^"+Dn.call(mt).replace(Ce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qi=Ze?we.Buffer:void 0,gi=we.Symbol,ps=we.Uint8Array,vi=Ot.propertyIsEnumerable,Mn=Mt.splice,St=gi?gi.toStringTag:void 0,Ai=Object.getOwnPropertySymbols,Ji=qi?qi.isBuffer:void 0,Sn=Qe(Object.keys,Object),Zi=qt(we,"DataView"),Ln=qt(we,"Map"),Ki=qt(we,"Promise"),$i=qt(we,"Set"),eo=qt(we,"WeakMap"),mn=qt(Object,"create"),gs=ht(Zi),Ut=ht(Ln),qr=ht(Ki),Jr=ht($i),Zr=ht(eo),vs=gi?gi.prototype:void 0,to=vs?vs.valueOf:void 0;function Ke(p){var P=-1,M=p==null?0:p.length;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function Kr(){this.__data__=mn?mn(null):{},this.size=0}function $r(p){var P=this.has(p)&&delete this.__data__[p];return this.size-=P?1:0,P}function ea(p){var P=this.__data__;if(mn){var M=P[p];return M===n?void 0:M}return mt.call(P,p)?P[p]:void 0}function ta(p){var P=this.__data__;return mn?P[p]!==void 0:mt.call(P,p)}function na(p,P){var M=this.__data__;return this.size+=this.has(p)?0:1,M[p]=mn&&P===void 0?n:P,this}Ke.prototype.clear=Kr,Ke.prototype.delete=$r,Ke.prototype.get=ea,Ke.prototype.has=ta,Ke.prototype.set=na;function st(p){var P=-1,M=p==null?0:p.length;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function ia(){this.__data__=[],this.size=0}function oa(p){var P=this.__data__,M=wi(P,p);if(M<0)return!1;var H=P.length-1;return M==H?P.pop():Mn.call(P,M,1),--this.size,!0}function sa(p){var P=this.__data__,M=wi(P,p);return M<0?void 0:P[M][1]}function ra(p){return wi(this.__data__,p)>-1}function aa(p,P){var M=this.__data__,H=wi(M,p);return H<0?(++this.size,M.push([p,P])):M[H][1]=P,this}st.prototype.clear=ia,st.prototype.delete=oa,st.prototype.get=sa,st.prototype.has=ra,st.prototype.set=aa;function pt(p){var P=-1,M=p==null?0:p.length;for(this.clear();++P<M;){var H=p[P];this.set(H[0],H[1])}}function la(){this.size=0,this.__data__={hash:new Ke,map:new(Ln||st),string:new Ke}}function ca(p){var P=Lt(this,p).delete(p);return this.size-=P?1:0,P}function da(p){return Lt(this,p).get(p)}function ha(p){return Lt(this,p).has(p)}function ua(p,P){var M=Lt(this,p),H=M.size;return M.set(p,P),this.size+=M.size==H?0:1,this}pt.prototype.clear=la,pt.prototype.delete=ca,pt.prototype.get=da,pt.prototype.has=ha,pt.prototype.set=ua;function bi(p){var P=-1,M=p==null?0:p.length;for(this.__data__=new pt;++P<M;)this.add(p[P])}function As(p){return this.__data__.set(p,n),this}function yi(p){return this.__data__.has(p)}bi.prototype.add=bi.prototype.push=As,bi.prototype.has=yi;function Bt(p){var P=this.__data__=new st(p);this.size=P.size}function no(){this.__data__=new st,this.size=0}function fa(p){var P=this.__data__,M=P.delete(p);return this.size=P.size,M}function ma(p){return this.__data__.get(p)}function pa(p){return this.__data__.has(p)}function ga(p,P){var M=this.__data__;if(M instanceof st){var H=M.__data__;if(!Ln||H.length<e-1)return H.push([p,P]),this.size=++M.size,this;M=this.__data__=new pt(H)}return M.set(p,P),this.size=M.size,this}Bt.prototype.clear=no,Bt.prototype.delete=fa,Bt.prototype.get=ma,Bt.prototype.has=pa,Bt.prototype.set=ga;function va(p,P){var M=Pi(p),H=!M&&Cs(p),Ie=!M&&!H&&Ci(p),ge=!M&&!H&&!Ie&&ks(p),Me=M||H||Ie||ge,Le=Me?ft(p.length,String):[],He=Le.length;for(var je in p)(P||mt.call(p,je))&&!(Me&&(je=="length"||Ie&&(je=="offset"||je=="parent")||ge&&(je=="buffer"||je=="byteLength"||je=="byteOffset")||Ea(je,He)))&&Le.push(je);return Le}function wi(p,P){for(var M=p.length;M--;)if(Ps(p[M][0],P))return M;return-1}function io(p,P,M){var H=P(p);return Pi(p)?H:xe(H,M(p))}function Tn(p){return p==null?p===void 0?X:b:St&&St in Object(p)?Jt(p):ws(p)}function bs(p){return Rt(p)&&Tn(p)==a}function ys(p,P,M,H,Ie){return p===P?!0:p==null||P==null||!Rt(p)&&!Rt(P)?p!==p&&P!==P:Aa(p,P,M,H,ys,Ie)}function Aa(p,P,M,H,Ie,ge){var Me=Pi(p),Le=Pi(P),He=Me?l:Qt(p),je=Le?l:Qt(P);He=He==a?y:He,je=je==a?y:je;var rt=He==y,gt=je==y,Xe=He==je;if(Xe&&Ci(p)){if(!Ci(P))return!1;Me=!0,rt=!1}if(Xe&&!rt)return ge||(ge=new Bt),Me||ks(p)?oo(p,P,M,H,Ie,ge):Pa(p,P,He,M,H,Ie,ge);if(!(M&o)){var at=rt&&mt.call(p,"__wrapped__"),$e=gt&&mt.call(P,"__wrapped__");if(at||$e){var pn=at?p.value():p,Zt=$e?P.value():P;return ge||(ge=new Bt),Ie(pn,Zt,M,H,ge)}}return Xe?(ge||(ge=new Bt),Ca(p,P,M,H,Ie,ge)):!1}function ba(p){if(!Es(p)||xa(p))return!1;var P=Is(p)?Ur:Ae;return P.test(ht(p))}function ya(p){return Rt(p)&&ro(p.length)&&!!be[Tn(p)]}function wa(p){if(!Da(p))return Sn(p);var P=[];for(var M in Object(p))mt.call(p,M)&&M!="constructor"&&P.push(M);return P}function oo(p,P,M,H,Ie,ge){var Me=M&o,Le=p.length,He=P.length;if(Le!=He&&!(Me&&He>Le))return!1;var je=ge.get(p);if(je&&ge.get(P))return je==P;var rt=-1,gt=!0,Xe=M&s?new bi:void 0;for(ge.set(p,P),ge.set(P,p);++rt<Le;){var at=p[rt],$e=P[rt];if(H)var pn=Me?H($e,at,rt,P,p,ge):H(at,$e,rt,p,P,ge);if(pn!==void 0){if(pn)continue;gt=!1;break}if(Xe){if(!Fe(P,function(Zt,jn){if(!At(Xe,jn)&&(at===Zt||Ie(at,Zt,M,H,ge)))return Xe.push(jn)})){gt=!1;break}}else if(!(at===$e||Ie(at,$e,M,H,ge))){gt=!1;break}}return ge.delete(p),ge.delete(P),gt}function Pa(p,P,M,H,Ie,ge,Me){switch(M){case R:if(p.byteLength!=P.byteLength||p.byteOffset!=P.byteOffset)return!1;p=p.buffer,P=P.buffer;case G:return!(p.byteLength!=P.byteLength||!ge(new ps(p),new ps(P)));case d:case h:case A:return Ps(+p,+P);case u:return p.name==P.name&&p.message==P.message;case S:case T:return p==P+"";case g:var Le=_e;case I:var He=H&o;if(Le||(Le=Ue),p.size!=P.size&&!He)return!1;var je=Me.get(p);if(je)return je==P;H|=s,Me.set(p,P);var rt=oo(Le(p),Le(P),H,Ie,ge,Me);return Me.delete(p),rt;case D:if(to)return to.call(p)==to.call(P)}return!1}function Ca(p,P,M,H,Ie,ge){var Me=M&o,Le=zn(p),He=Le.length,je=zn(P),rt=je.length;if(He!=rt&&!Me)return!1;for(var gt=He;gt--;){var Xe=Le[gt];if(!(Me?Xe in P:mt.call(P,Xe)))return!1}var at=ge.get(p);if(at&&ge.get(P))return at==P;var $e=!0;ge.set(p,P),ge.set(P,p);for(var pn=Me;++gt<He;){Xe=Le[gt];var Zt=p[Xe],jn=P[Xe];if(H)var vu=Me?H(jn,Zt,Xe,P,p,ge):H(Zt,jn,Xe,p,P,ge);if(!(vu===void 0?Zt===jn||Ie(Zt,jn,M,H,ge):vu)){$e=!1;break}pn||(pn=Xe=="constructor")}if($e&&!pn){var xs=p.constructor,Ds=P.constructor;xs!=Ds&&"constructor"in p&&"constructor"in P&&!(typeof xs=="function"&&xs instanceof xs&&typeof Ds=="function"&&Ds instanceof Ds)&&($e=!1)}return ge.delete(p),ge.delete(P),$e}function zn(p){return io(p,ao,Ia)}function Lt(p,P){var M=p.__data__;return ka(P)?M[typeof P=="string"?"string":"hash"]:M.map}function qt(p,P){var M=bt(p,P);return ba(M)?M:void 0}function Jt(p){var P=mt.call(p,St),M=p[St];try{p[St]=void 0;var H=!0}catch(ge){}var Ie=pi.call(p);return H&&(P?p[St]=M:delete p[St]),Ie}var Ia=Ai?function(p){return p==null?[]:(p=Object(p),re(Ai(p),function(P){return vi.call(p,P)}))}:Sa,Qt=Tn;(Zi&&Qt(new Zi(new ArrayBuffer(1)))!=R||Ln&&Qt(new Ln)!=g||Ki&&Qt(Ki.resolve())!=C||$i&&Qt(new $i)!=I||eo&&Qt(new eo)!=J)&&(Qt=function(p){var P=Tn(p),M=P==y?p.constructor:void 0,H=M?ht(M):"";if(H)switch(H){case gs:return R;case Ut:return g;case qr:return C;case Jr:return I;case Zr:return J}return P});function Ea(p,P){return P=P==null?r:P,!!P&&(typeof p=="number"||Ve.test(p))&&p>-1&&p%1==0&&p<P}function ka(p){var P=typeof p;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?p!=="__proto__":p===null}function xa(p){return!!mi&&mi in p}function Da(p){var P=p&&p.constructor,M=typeof P=="function"&&P.prototype||Ot;return p===M}function ws(p){return pi.call(p)}function ht(p){if(p!=null){try{return Dn.call(p)}catch(P){}try{return p+""}catch(P){}}return""}function Ps(p,P){return p===P||p!==p&&P!==P}var Cs=bs(function(){return arguments}())?bs:function(p){return Rt(p)&&mt.call(p,"callee")&&!vi.call(p,"callee")},Pi=Array.isArray;function so(p){return p!=null&&ro(p.length)&&!Is(p)}var Ci=Ji||La;function Ma(p,P){return ys(p,P)}function Is(p){if(!Es(p))return!1;var P=Tn(p);return P==m||P==v||P==c||P==k}function ro(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=r}function Es(p){var P=typeof p;return p!=null&&(P=="object"||P=="function")}function Rt(p){return p!=null&&typeof p=="object"}var ks=ot?Yt(ot):ya;function ao(p){return so(p)?va(p):wa(p)}function Sa(){return[]}function La(){return!1}i.exports=Ma})(Ey,as);const ky=as,xy=(i,t)=>ky(i,t),Dy=i=>Object.keys(i||{}),My=(i,t)=>{const e={};return i.forEach(n=>{e[n]=t[n]}),e},Sy=()=>{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=Dy(s);if(a.includes(n)){const l=My(a,e);xy(s,l)||(i[o].deps=l,r())}})}}},Ly=()=>{let i=null;return{targetWatcher(t,e){i={watcherName:t,fn:e},i.fn(),i=null},getTarget(){return i}}};function Ty(i,t){const e=ss(i,"data",{}),n=ss(i,"watch",{}),o=ss(i,"methods",{}),s=ss(t,"onChange",()=>{}),{subscribe:r,notify:a,subscribers:l}=Sy(),{targetWatcher:c,getTarget:d}=Ly();let h;const u={},m=()=>({data:h,methods:u});let v=!1;const g=b=>(...y)=>{v=!0;const C=b(...y);return v=!1,C};Object.entries(o).forEach(([b,y])=>{u[b]=g((...C)=>y(m(),...C)),Object.defineProperty(u[b],"name",{value:b})}),h=new Proxy(Iy(e),{get(b,y){return d()&&!v&&r(d(),{prop:y,value:b[y]}),Reflect.get(...arguments)},set(b,y,C){return b[y]===C||(Reflect.set(...arguments),d()||(s&&s(y,C),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 zy({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 jy({infinite:i,pageIndex:t,pagesCount:e,particlesCount:n,particlesToShow:o,particlesToScroll:s}){const r=di(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=>zy({pageIndex:h,particlesToShow:o,particlesToScroll:s,particlesCount:n}));return{pageIndexes:c,particleIndexes:[...new Set(d)].sort((h,u)=>h-u)}}const Vy=(i,t)=>(i(),setInterval(i,t)),_y=35,oh=1;class Oy{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(_y,Math.max(this._autoplayDuration,1));let o=-n;this._interval=Vy(()=>Y(this,null,function*(){if(this._paused)return;o+=n;const s=o/this._autoplayDuration;this._onProgressValueChange(s),s>oh&&(this.reset(),yield t(),e())}),n)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(oh)}}function By(i){const t=new Oy({onProgressValueChange:r=>{i("progressValue",1-r)}}),e=Ty({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=jy({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=v1({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=Hd({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:a,tail:l}=k1({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=b1({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=di(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=di(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=Mr({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=Mr({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=di(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===hn&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===ci&&r.currentParticleIndex===0)){t.reset();return}if(r.autoplay){const c=()=>Sr({[hn]:()=>Y(this,null,function*(){return a.showNextPage()}),[ci]:()=>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 Mr({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){me(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 Ry=i=>({currentPageIndex:i[0]&32,pagesCount:i[0]&1024,loaded:i[0]&64}),sh=i=>({currentPageIndex:i[5],pagesCount:i[10],showPage:i[15],loaded:i[6]}),Gy=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),rh=i=>({showNextPage:i[14].showNextPage,loaded:i[6],currentPageIndex:i[5]}),Fy=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),ah=i=>({loaded:i[6],currentPageIndex:i[5]}),Wy=i=>({loaded:i[0]&64,currentPageIndex:i[0]&32}),lh=i=>({showPrevPage:i[14].showPrevPage,loaded:i[6],currentPageIndex:i[5]});function ch(i){let t;const e=i[37].prev,n=Wn(e,i,i[36],lh),o=n||Ny(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)&&Hn(n,e,s,s[36],t?Nn(e,s[36],r,Wy):Xn(s[36]),lh):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 Ny(i){let t,e,n;return e=new Bd({props:{direction:"prev",disabled:!i[2]&&i[5]===0}}),e.$on("click",i[23]),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function dh(i){let t,e,n;return e=new Jb({props:{value:i[7]}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","sc-carousel-progress__container svelte-sme1z4")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function hh(i){let t;const e=i[37].next,n=Wn(e,i,i[36],rh),o=n||Hy(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)&&Hn(n,e,s,s[36],t?Nn(e,s[36],r,Gy):Xn(s[36]),rh):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 Hy(i){let t,e,n;return e=new Bd({props:{direction:"next",disabled:!i[2]&&i[5]===i[10]-1}}),e.$on("click",i[14].showNextPage),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","sc-carousel__arrow-container svelte-sme1z4")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function uh(i){let t;const e=i[37].dots,n=Wn(e,i,i[36],sh),o=n||Xy(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)&&Hn(n,e,s,s[36],t?Nn(e,s[36],r,Ry):Xn(s[36]),sh):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 Xy(i){let t,e;return t=new Wb({props:{pagesCount:i[10],currentPageIndex:i[5]}}),t.$on("pageChange",i[41]),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Yy(i){let t,e,n,o,s,r,a,l,c,d,h,u,m=i[1]&&ch(i);const v=i[37].default,g=Wn(v,i,i[36],ah);let A=i[3]&&dh(i),b=i[1]&&hh(i),y=i[4]&&uh(i);return{c(){t=V("div"),e=V("div"),m&&m.c(),n=se(),o=V("div"),s=V("div"),g&&g.c(),a=se(),A&&A.c(),l=se(),b&&b.c(),c=se(),y&&y.c(),w(s,"class","sc-carousel__pages-container svelte-sme1z4"),z(s,"transform","translateX("+i[8]+"px)"),z(s,"transition-duration",i[9]+"ms"),z(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(C,k){_(C,t,k),B(t,e),m&&m.m(e,null),B(e,n),B(e,o),B(o,s),g&&g.m(s,null),i[39](s),B(o,a),A&&A.m(o,null),i[40](o),B(e,l),b&&b.m(e,null),B(t,c),y&&y.m(t,null),d=!0,h||(u=[Wt(r=s1.call(null,s,{thresholdProvider:i[38]})),ke(s,"swipeStart",i[16]),ke(s,"swipeMove",i[18]),ke(s,"swipeEnd",i[19]),ke(s,"swipeFailed",i[20]),ke(s,"swipeThresholdReached",i[17]),Wt(c1.call(null,o)),ke(o,"hovered",i[21]),Wt(m1.call(null,o)),ke(o,"tapped",i[22])],h=!0)},p(C,k){C[1]?m?(m.p(C,k),k[0]&2&&x(m,1)):(m=ch(C),m.c(),x(m,1),m.m(e,n)):m&&(he(),L(m,1,1,()=>{m=null}),ue()),g&&g.p&&(!d||k[0]&96|k[1]&32)&&Hn(g,v,C,C[36],d?Nn(v,C[36],k,Fy):Xn(C[36]),ah),(!d||k[0]&256)&&z(s,"transform","translateX("+C[8]+"px)"),(!d||k[0]&512)&&z(s,"transition-duration",C[9]+"ms"),(!d||k[0]&1)&&z(s,"transition-timing-function",C[0]),r&&Fn(r.update)&&k[0]&2048&&r.update.call(null,{thresholdProvider:C[38]}),C[3]?A?(A.p(C,k),k[0]&8&&x(A,1)):(A=dh(C),A.c(),x(A,1),A.m(o,null)):A&&(he(),L(A,1,1,()=>{A=null}),ue()),C[1]?b?(b.p(C,k),k[0]&2&&x(b,1)):(b=hh(C),b.c(),x(b,1),b.m(e,null)):b&&(he(),L(b,1,1,()=>{b=null}),ue()),C[4]?y?(y.p(C,k),k[0]&16&&x(y,1)):(y=uh(C),y.c(),x(y,1),y.m(t,null)):y&&(he(),L(y,1,1,()=>{y=null}),ue())},i(C){d||(x(m),x(g,C),x(A),x(b),x(y),d=!0)},o(C){L(m),L(g,C),L(A),L(b),L(y),d=!1},d(C){C&&j(t),m&&m.d(),g&&g.d(C),i[39](null),A&&A.d(),i[40](null),b&&b.d(),y&&y.d(),h=!1,et(u)}}}function Uy(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]=By((re,xe)=>{Sr({currentPageIndex:()=>e(5,r=xe),progressValue:()=>e(7,a=xe),offset:()=>e(8,l=xe),durationMs:()=>e(9,c=xe),pagesCount:()=>e(10,d=xe),loaded:()=>e(6,s=xe)})(re)}),g=Mo();let{timingFunction:A="ease-in-out"}=t,{arrows:b=!0}=t,{infinite:y=!0}=t,{initialPageIndex:C=0}=t,{duration:k=500}=t,{autoplay:S=!1}=t,{autoplayDuration:I=3e3}=t,{autoplayDirection:T=hn}=t,{pauseOnFocus:D=!1}=t,{autoplayProgressVisible:X=!1}=t,{dots:J=!0}=t,{swiping:G=!0}=t,{particlesToShow:R=1}=t,{particlesToScroll:F=1}=t;function Q(re,xe){return Y(this,null,function*(){const Fe=Wi(xe,"animated",!0);if(typeof re!="number")throw new Error("pageIndex should be a number");yield m.showPage(re,{animated:Fe})})}function W(re){return Y(this,null,function*(){const xe=Wi(re,"animated",!0);yield m.showPrevPage({animated:xe})})}function q(re){return Y(this,null,function*(){const xe=Wi(re,"animated",!0);yield m.showNextPage({animated:xe})})}let U=0,Z,ae;const oe=C1(({width:re})=>{e(11,U=re),h.particleWidth=U/h.particlesToShow,P1({particlesContainerChildren:ae.children,particleWidth:h.particleWidth}),m.offsetPage({animated:!1})});function ye(){const{clonesToAppend:re,clonesToPrepend:xe}=I1({clonesCountHead:h.clonesCountHead,clonesCountTail:h.clonesCountTail,particlesContainerChildren:ae.children});E1({particlesContainer:ae,clonesToAppend:re,clonesToPrepend:xe})}kt(()=>{Y(this,null,function*(){yield pl(),ae&&Z&&(h.particlesCountWithoutClones=ae.children.length,yield pl(),h.infinite&&ye(),h.particlesCount=ae.children.length,m.showPage(C,{animated:!1}),oe.observe(Z))})}),on(()=>{oe.disconnect(),u.reset()});function Ce(re){return Y(this,null,function*(){yield m.showPage(re,{animated:!0})})}function Ae(){G&&(h.durationMs=0)}function Ve(re){return Y(this,null,function*(){G&&(yield Sr({[hn]:m.showNextPage,[ci]:m.showPrevPage})(re.detail.direction))})}function be(re){G&&(h.offset+=re.detail.dx)}function Ne(){G&&m.showParticle(h.currentParticleIndex)}function fe(){return Y(this,null,function*(){G&&(yield m.offsetPage({animated:!0}))})}function we(re){h.focused=re.detail.value}function Te(){m.toggleFocused()}function pe(){m.showPrevPage()}const Ze=()=>U/3;function dt(re){Je[re?"unshift":"push"](()=>{ae=re,e(13,ae)})}function De(re){Je[re?"unshift":"push"](()=>{Z=re,e(12,Z)})}const ot=re=>Ce(re.detail);return i.$$set=re=>{"timingFunction"in re&&e(0,A=re.timingFunction),"arrows"in re&&e(1,b=re.arrows),"infinite"in re&&e(2,y=re.infinite),"initialPageIndex"in re&&e(24,C=re.initialPageIndex),"duration"in re&&e(25,k=re.duration),"autoplay"in re&&e(26,S=re.autoplay),"autoplayDuration"in re&&e(27,I=re.autoplayDuration),"autoplayDirection"in re&&e(28,T=re.autoplayDirection),"pauseOnFocus"in re&&e(29,D=re.pauseOnFocus),"autoplayProgressVisible"in re&&e(3,X=re.autoplayProgressVisible),"dots"in re&&e(4,J=re.dots),"swiping"in re&&e(30,G=re.swiping),"particlesToShow"in re&&e(31,R=re.particlesToShow),"particlesToScroll"in re&&e(32,F=re.particlesToScroll),"$$scope"in re&&e(36,o=re.$$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=I),i.$$.dirty[0]&268435456&&(h.autoplayDirection=T),i.$$.dirty[0]&536870912&&(h.pauseOnFocus=D),i.$$.dirty[1]&1&&(h.particlesToShowInit=R),i.$$.dirty[1]&2&&(h.particlesToScrollInit=F)},[A,b,y,X,J,r,s,a,l,c,d,U,Z,ae,m,Ce,Ae,Ve,be,Ne,fe,we,Te,pe,C,k,S,I,T,D,G,R,F,Q,W,q,o,n,Ze,dt,De,ot]}class qy extends de{constructor(t){super(),ce(this,t,Uy,Yy,le,{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 Jy(i){me(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 fh(i){let t;function e(s,r){if(s[2].type==="Image")return Ky;if(s[2].type==="Video")return Zy}let n=e(i),o=n&&n(i);return{c(){t=V("div"),o&&o.c(),w(t,"class","media-item svelte-159ski6"),w(t,"draggable","false")},m(s,r){_(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&&j(t),o&&o.d()}}}function Zy(i){let t,e,n,o,s,r;function a(d,h){return d[7]&&d[2].videoCoverUrl?ew:$y}let l=a(i),c=l(i);return{c(){c.c(),t=se(),e=V("div"),n=V("div"),o=V("div"),w(o,"class","video-icon-img svelte-159ski6"),z(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),_(d,t,h),_(d,e,h),B(e,n),B(n,o),s||(r=ke(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&&z(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&&j(t),d&&j(e),s=!1,r()}}}function Ky(i){let t,e,n,o;return{c(){t=V("img"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),yt(t.src,n=i[2].url)||w(t,"src",n),w(t,"alt",o=i[2].name),w(t,"draggable",!1)},m(s,r){_(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&w(t,"style",e),r&4&&!yt(t.src,n=s[2].url)&&w(t,"src",n),r&4&&o!==(o=s[2].name)&&w(t,"alt",o)},d(s){s&&j(t)}}}function $y(i){let t,e,n,o,s,r,a;return{c(){t=V("video"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),yt(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){_(l,t,c),i[19](t),r||(a=[ke(t,"play",i[14]),ke(t,"pause",i[15]),ke(t,"error",i[16]),ke(t,"ended",i[17]),ke(t,"click",i[18])],r=!0)},p(l,c){c&64&&e!==(e=`object-fit: ${l[6]};`)&&w(t,"style",e),c&4&&!yt(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&&j(t),i[19](null),r=!1,et(a)}}}function ew(i){let t,e,n,o;return{c(){t=V("img"),w(t,"class","media-content svelte-159ski6"),w(t,"style",e=`object-fit: ${i[6]};`),yt(t.src,n=i[2].videoCoverUrl)||w(t,"src",n),w(t,"alt",o=i[2].name),w(t,"draggable",!1)},m(s,r){_(s,t,r)},p(s,r){r&64&&e!==(e=`object-fit: ${s[6]};`)&&w(t,"style",e),r&4&&!yt(t.src,n=s[2].videoCoverUrl)&&w(t,"src",n),r&4&&o!==(o=s[2].name)&&w(t,"alt",o)},d(s){s&&j(t)}}}function tw(i){let t,e=i[2]&&fh(i);return{c(){e&&e.c(),t=Ee()},m(n,o){e&&e.m(n,o),_(n,t,o)},p(n,[o]){n[2]?e?e.p(n,o):(e=fh(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&&j(t)}}}function nw(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=sn("mediaStore"),b=sn("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),kt(()=>{A.subscribe(({currentMediaElement:G})=>{G!==n&&(n==null||n.pause())})});const C=G=>{e(10,m=!1),e(0,s.paused=!1,s),e(8,v=!0),n&&A.set({currentMediaElement:n}),b.emit("playStateChange",{event:G,state:"playing",tag:r,mediaInstance:n})},k=G=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:G,state:"paused",tag:r,mediaInstance:n})},S=G=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:G,state:"paused",tag:r,mediaInstance:n})},I=G=>{e(10,m=!0),e(0,s.paused=!0,s),b.emit("playStateChange",{event:G,state:"paused",tag:r,mediaInstance:n})},T=G=>{n&&n.pause()};function D(G){Je[G?"unshift":"push"](()=>{s.videoInstance=G,e(0,s)})}const X=()=>l==="withText"?vd:l==="withoutText"?Pr:l,J=G=>{d&&n&&(e(9,n.muted=!1,n),n.play())};return i.$$set=G=>{"mediaInstance"in G&&e(0,s=G.mediaInstance),"tag"in G&&e(1,r=G.tag),"media"in G&&e(2,a=G.media),"playButtonIfNeed"in G&&e(3,l=G.playButtonIfNeed),"playButtonSizeIfNeed"in G&&e(4,c=G.playButtonSizeIfNeed),"canPlay"in G&&e(5,d=G.canPlay),"objectFit"in G&&e(6,h=G.objectFit),"disableVideoIfHavePoster"in G&&e(7,u=G.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 G=navigator.userAgent.toLowerCase().indexOf("micromessenger")!==-1,F=navigator.userAgent.toLowerCase().indexOf("iphone")!==-1&&G;n&&F&&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,C,k,S,I,T,D,X,J]}class mh extends de{constructor(t){super(),ce(this,t,nw,tw,le,{mediaInstance:0,tag:1,media:2,playButtonIfNeed:3,playButtonSizeIfNeed:4,canPlay:5,objectFit:6,disableVideoIfHavePoster:7},Jy)}}function iw(i){me(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 ph(i,t,e){const n=i.slice();return n[28]=t[e],n[29]=t,n[30]=e,n}function gh(i){let t,e,n,o,s,r,a;const l=[sw,ow],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=V("div"),e=V("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){_(h,t,u),B(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):(he(),L(c[m],1,1,()=>{c[m]=null}),ue(),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&&tt(()=>{a&&(r&&r.end(1),s=An(t,Ll,i[6]?{y:4,duration:i[4],delay:i[2],easing:tn}:void 0),s.start())}),a=!0)},o(h){L(o),s&&s.invalidate(),h&&(r=Kn(t,Ll,i[6]?{y:4,duration:i[4],delay:i[3],easing:tn}:void 0)),a=!1},d(h){h&&j(t),c[n].d(),h&&r&&r.end()}}}function ow(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=qe(r,o[a]);return i[8][0]!==void 0&&(r.mediaInstance=i[8][0]),t=new mh({props:r}),Je.push(()=>wl(t,"mediaInstance",s)),{c(){ie(t.$$.fragment)},m(a,l){te(t,a,l),n=!0},p(a,l){const c=l[0]&131?nt(o,[l[0]&2&&{media:a[1][0]},l[0]&128&&yl(a[7]),l[0]&1&&{tag:a[0]}]):{};!e&&l[0]&256&&(e=!0,c.mediaInstance=a[8][0],gl(()=>e=!1)),t.$set(c)},i(a){n||(x(t.$$.fragment,a),n=!0)},o(a){L(t.$$.fragment,a),n=!1},d(a){ne(t,a)}}}function sw(i){let t,e,n={dots:!1,arrows:!1,$$slots:{default:[rw]},$$scope:{ctx:i}};return t=new qy({props:n}),i[18](t),t.$on("pageChange",i[19]),{c(){ie(t.$$.fragment)},m(o,s){te(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),ne(t,o)}}}function vh(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=qe(r,o[a]);return i[8][i[30]]!==void 0&&(r.mediaInstance=i[8][i[30]]),t=new mh({props:r}),Je.push(()=>wl(t,"mediaInstance",s)),{c(){ie(t.$$.fragment)},m(a,l){te(t,a,l),n=!0},p(a,l){i=a;const c=l[0]&1153?nt(o,[l[0]&128&&yl(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]],gl(()=>e=!1)),t.$set(c)},i(a){n||(x(t.$$.fragment,a),n=!0)},o(a){L(t.$$.fragment,a),n=!1},d(a){ne(t,a)}}}function rw(i){let t,e,n=i[10],o=[];for(let r=0;r<n.length;r+=1)o[r]=vh(ph(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);_(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=ph(r,n,l);o[l]?(o[l].p(c,a),x(o[l],1)):(o[l]=vh(c),o[l].c(),x(o[l],1),o[l].m(t.parentNode,t))}for(he(),l=n.length;l<o.length;l+=1)s(l);ue()}},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){Nt(o,r),r&&j(t)}}}function aw(i){let t,e,n=i[5]&&gh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,s){o[5]?n?(n.p(o,s),s[0]&32&&x(n,1)):(n=gh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function lw(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:C=!1}=A;let k=[],S=0,I,T=null;const D=sn("hooks"),X=sn("mediaStore");function J(){const W=k[S],q=W==null?void 0:W.videoInstance;q&&(q.paused?(q.muted=!1,q.play()):q.pause())}kt(()=>{D.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()}),T=setInterval(()=>{r&&(I==null||I.goToNext())},3e3)}),on(()=>{clearInterval(T),D.off("click",J)});function G(W,q){i.$$.not_equal(k[q],W)&&(k[q]=W,e(8,k))}function R(W){Je[W?"unshift":"push"](()=>{I=W,e(12,I)})}const F=W=>{n||X.set({currentMediaElement:null}),e(11,S=W.detail)};function Q(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,I,o,X,g,A,G,R,F,Q]}class Ah extends de{constructor(t){super(),ce(this,t,lw,aw,le,{tag:0,mediaData:1,inDelay:2,outDelay:3,duration:4,unfolded:5,animation:6,mediaItemConfig:7,enableCarousel:15,autoplayConfig:16},iw,[-1,-1])}}function cw(i){me(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 bh(i){let t,e,n,o,s,r,a,l;t=new Vt({props:{visible:i[3],left:61,bottom:57,width:2,blurRadius:150,spreadRadius:75}}),o=new Vb({props:{unfolded:i[3],outDelay:400}});let c=i[2]&&yh(i),d=i[1]&&wh(i);return{c(){ie(t.$$.fragment),e=se(),n=V("div"),ie(o.$$.fragment),s=se(),c&&c.c(),r=se(),d&&d.c(),a=Ee(),w(n,"class","line svelte-1f7m1lj")},m(h,u){te(t,h,u),_(h,e,u),_(h,n,u),te(o,n,null),_(h,s,u),c&&c.m(h,u),_(h,r,u),d&&d.m(h,u),_(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=yh(h),c.c(),x(c,1),c.m(r.parentNode,r)):c&&(he(),L(c,1,1,()=>{c=null}),ue()),h[1]?d?(d.p(h,u),u&2&&x(d,1)):(d=wh(h),d.c(),x(d,1),d.m(a.parentNode,a)):d&&(he(),L(d,1,1,()=>{d=null}),ue())},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){ne(t,h),h&&j(e),h&&j(n),ne(o),h&&j(s),c&&c.d(h),h&&j(r),d&&d.d(h),h&&j(a)}}}function yh(i){let t,e,n;return e=new Ed({props:{unfolded:i[3],content:i[2],inDelay:500}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","text svelte-1f7m1lj")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function wh(i){let t,e,n;return e=new Ah({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=V("div"),ie(e.$$.fragment),w(t,"class","media-wrapper svelte-1f7m1lj")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function dw(i){let t,e,n=i[0].state&&bh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=bh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function hw(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 uw extends de{constructor(t){super(),ce(this,t,hw,dw,le,{tag:0},cw)}}function fw(i){me(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 Ph(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ch(i,t,e){const n=i.slice();return n[0]=t[e],n}function Ih(i){let t,e;return{c(){t=V("img"),w(t,"class","headerImage svelte-sezqcq"),yt(t.src,e=i[3].headerPictureUrl)||w(t,"src",e),w(t,"alt","")},m(n,o){_(n,t,o)},p(n,o){o&8&&!yt(t.src,e=n[3].headerPictureUrl)&&w(t,"src",e)},d(n){n&&j(t)}}}function Eh(i){let t,e,n,o,s=i[2]||[],r=[];for(let c=0;c<s.length;c+=1)r[c]=kh(Ch(i,s,c));let a=i[5]||[],l=[];for(let c=0;c<a.length;c+=1)l[c]=xh(Ph(i,a,c));return{c(){t=V("div"),e=V("div");for(let c=0;c<r.length;c+=1)r[c].c();n=se();for(let c=0;c<l.length;c+=1)l[c].c();w(e,"class","tags svelte-sezqcq"),tt(()=>i[11].call(e)),w(t,"class","tags-wrapper svelte-sezqcq")},m(c,d){_(c,t,d),B(t,e);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(e,null);B(e,n);for(let h=0;h<l.length;h+=1)l[h]&&l[h].m(e,null);o=Eo(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=Ch(c,s,h);r[h]?r[h].p(u,d):(r[h]=kh(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=Ph(c,a,h);l[h]?l[h].p(u,d):(l[h]=xh(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&&j(t),Nt(r,c),Nt(l,c),o()}}}function kh(i){let t,e=i[0]+"",n;return{c(){t=V("div"),n=Be(e),w(t,"class","tag primary-tag svelte-sezqcq"),z(t,"min-width",_r)},m(o,s){_(o,t,s),B(t,n)},p(o,s){s&4&&e!==(e=o[0]+"")&&Re(n,e)},d(o){o&&j(t)}}}function xh(i){let t,e=i[0]+"",n;return{c(){t=V("div"),n=Be(e),w(t,"class","tag secondary-tag svelte-sezqcq"),z(t,"min-width",_r)},m(o,s){_(o,t,s),B(t,n)},p(o,s){s&32&&e!==(e=o[0]+"")&&Re(n,e)},d(o){o&&j(t)}}}function Dh(i){let t,e,n=i[7]&&Mh(i),o=i[3].highlightText&&Lh(i);return{c(){t=V("div"),n&&n.c(),e=se(),o&&o.c(),w(t,"class","footer svelte-sezqcq")},m(s,r){_(s,t,r),n&&n.m(t,null),B(t,e),o&&o.m(t,null)},p(s,r){s[7]?n?n.p(s,r):(n=Mh(s),n.c(),n.m(t,e)):n&&(n.d(1),n=null),s[3].highlightText?o?o.p(s,r):(o=Lh(s),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(s){s&&j(t),n&&n.d(),o&&o.d()}}}function Mh(i){let t,e,n=i[3].price.value+"",o,s,r=i[3].price.unit&&Sh(i);return{c(){t=V("div"),e=V("span"),o=Be(n),s=se(),r&&r.c(),w(e,"class","value svelte-sezqcq"),w(t,"class","price svelte-sezqcq")},m(a,l){_(a,t,l),B(t,e),B(e,o),B(t,s),r&&r.m(t,null)},p(a,l){l&8&&n!==(n=a[3].price.value+"")&&Re(o,n),a[3].price.unit?r?r.p(a,l):(r=Sh(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&j(t),r&&r.d()}}}function Sh(i){let t,e=i[3].price.unit+"",n;return{c(){t=V("span"),n=Be(e),w(t,"class","unit svelte-sezqcq")},m(o,s){_(o,t,s),B(t,n)},p(o,s){s&8&&e!==(e=o[3].price.unit+"")&&Re(n,e)},d(o){o&&j(t)}}}function Lh(i){let t,e,n,o,s=i[3].highlightText+"",r,a,l;return{c(){t=V("div"),e=V("div"),n=se(),o=V("span"),r=Be(s),a=se(),l=V("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){_(c,t,d),B(t,e),B(t,n),B(t,o),B(o,r),_(c,a,d),_(c,l,d)},p(c,d){d&8&&s!==(s=c[3].highlightText+"")&&Re(r,s)},d(c){c&&j(t),c&&j(a),c&&j(l)}}}function mw(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 Vt({props:{visible:i[4],outDelay:500,left:61,bottom:87,blurRadius:150,spreadRadius:75}});let b=i[3].headerPictureUrl&&Ih(i),y=((k=i[2].length)!=null?k:0)+((S=i[5].length)!=null?S:0)>0&&Eh(i),C=(i[7]||i[3].highlightText)&&Dh(i);return{c(){t=V("div"),ie(e.$$.fragment),n=se(),o=V("div"),s=se(),r=V("div"),b&&b.c(),a=se(),l=V("div"),c=V("div"),d=V("div"),u=Be(h),m=se(),y&&y.c(),v=se(),C&&C.c(),w(o,"class","line svelte-sezqcq"),z(o,"transition-delay",i[4]?ls+"ms":cs+zh-Th-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"),z(r,"max-width",_t(i[9])),z(r,"transition-delay",i[4]?ls+cs+"ms":"0ms"),w(t,"class",g=Oe(`marketing ${i[6]}`)+" svelte-sezqcq"),$(t,"unfolded",i[4]),$(t,"folded",i[8])},m(I,T){_(I,t,T),te(e,t,null),B(t,n),B(t,o),B(t,s),B(t,r),b&&b.m(r,null),B(r,a),B(r,l),B(l,c),B(c,d),B(d,u),B(r,m),y&&y.m(r,null),B(r,v),C&&C.m(r,null),A=!0},p(I,[T]){var X,J;const D={};T&16&&(D.visible=I[4]),e.$set(D),T&16&&z(o,"transition-delay",I[4]?ls+"ms":cs+zh-Th-40+"ms"),I[3].headerPictureUrl?b?b.p(I,T):(b=Ih(I),b.c(),b.m(r,a)):b&&(b.d(1),b=null),(!A||T&8)&&h!==(h=I[3].title+"")&&Re(u,h),((X=I[2].length)!=null?X:0)+((J=I[5].length)!=null?J:0)>0?y?y.p(I,T):(y=Eh(I),y.c(),y.m(r,v)):y&&(y.d(1),y=null),I[7]||I[3].highlightText?C?C.p(I,T):(C=Dh(I),C.c(),C.m(r,null)):C&&(C.d(1),C=null),T&16&&z(r,"transition-delay",I[4]?ls+cs+"ms":"0ms"),(!A||T&64&&g!==(g=Oe(`marketing ${I[6]}`)+" svelte-sezqcq"))&&w(t,"class",g),(!A||T&80)&&$(t,"unfolded",I[4]),(!A||T&320)&&$(t,"folded",I[8])},i(I){A||(x(e.$$.fragment,I),A=!0)},o(I){L(e.$$.fragment,I),A=!1},d(I){I&&j(t),ne(e),b&&b.d(),y&&y.d(),C&&C.d()}}}const _r=40,ls=400,Th=500,cs=180,zh=500;function pw(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,C,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=Gn((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=((C=s.brandTags)==null?void 0:C.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)/_r),[h,u,c,s,n,d,a,r,o,m,l,v]}class gw extends de{constructor(t){super(),ce(this,t,pw,mw,le,{tag:0},fw)}}class vw 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=TA(this.sharedAudioSrc,{namespace:yr.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 Aw(i){me(i,"svelte-13e7hxv",".audio.svelte-13e7hxv{pointer-events:auto;cursor:pointer;width:100%;height:100%}")}function bw(i){let t,e,n,o;const s=i[8].default,r=Wn(s,i,i[7],null);return{c(){t=V("div"),r&&r.c(),w(t,"class","audio svelte-13e7hxv"),w(t,"style",i[0])},m(a,l){_(a,t,l),r&&r.m(t,null),e=!0,n||(o=ke(t,"click",ll(i[1])),n=!0)},p(a,[l]){r&&r.p&&(!e||l&128)&&Hn(r,s,a,a[7],e?Nn(s,a[7],l,null):Xn(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&&j(t),r&&r.d(a),n=!1,o()}}}function yw(i,t,e){let{$$slots:n={},$$scope:o}=t,{url:s}=t,{enable:r=!0}=t,{style:a=""}=t,{hooksInfo:l}=t;const c=Mo(),d=sn("hooks"),h=sn("mediaStore");let u,m=!0;function v(){e(5,u.onplay=A=>{d.emit("playStateChange",N({event:A,state:"playing",mediaInstance:u},l)),c("play"),e(6,m=!1)},u),e(5,u.onpause=A=>{d.emit("playStateChange",N({event:A,state:"paused",mediaInstance:u},l)),c("pause"),e(6,m=!0)},u),e(5,u.onended=A=>{d.emit("playStateChange",N({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",N({event:A,target:"AudioTagPlayIcon",audioInstance:u},l)),h.set({currentMediaElement:u}),d.emit("playStateChange",N({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 vw(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 jh=class extends de{constructor(t){super(),ce(this,t,yw,bw,le,{url:2,enable:3,style:0,hooksInfo:4},Aw)}};function ww(i){me(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 Vh(i){let t,e;return t=new Vt({props:{center:!0,blurRadius:12,spreadRadius:5}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function Pw(i){let t,e,n,o,s,r=i[1]&&Vh();return{c(){t=V("div"),r&&r.c(),e=se(),n=V("div"),o=V("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]),z(t,"width",i[5]),z(t,"height",i[5])},m(a,l){_(a,t,l),r&&r.m(t,null),B(t,e),B(t,n),B(n,o),i[7](o),i[8](t),s=!0},p(a,[l]){a[1]?r?l&2&&x(r,1):(r=Vh(),r.c(),x(r,1),r.m(t,e)):r&&(he(),L(r,1,1,()=>{r=null}),ue()),(!s||l&1)&&$(n,"playing",a[0]),(!s||l&4)&&w(t,"style",a[2]);const c=l&4;(c||l&36)&&z(t,"width",a[5]),(c||l&36)&&z(t,"height",a[5])},i(a){s||(x(r),s=!0)},o(a){L(r),s=!1},d(a){a&&j(t),r&&r.d(),i[7](null),i[8](null)}}}function Cw(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){Je[u?"unshift":"push"](()=>{c=u,e(4,c)})}function h(u){Je[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"?_t(a):a)},[o,s,r,l,c,n,a,d,h]}class _h extends de{constructor(t){super(),ce(this,t,Cw,Pw,le,{playing:0,shadow:1,style:2,width:6},ww)}}function Iw(i){me(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 Oh(i){var A,b;let t,e,n,o,s,r,a,l,c,d,h,u,m,v;e=new Vt({props:{visible:i[6],left:i[3]/2+"px",bottom:12,width:2,blurRadius:120,spreadRadius:60}});let g=i[6]&&Bh(i);return c=new Md({props:{visible:i[6],textUnfolded:i[1],content:i[5]}}),h=new Ir({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=V("div"),ie(e.$$.fragment),n=se(),o=V("div"),s=V("div"),r=V("div"),g&&g.c(),a=se(),l=V("div"),ie(c.$$.fragment),d=se(),ie(h.$$.fragment),w(r,"class","audio-icon svelte-1s6gk4a"),z(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,C){_(y,t,C),te(e,t,null),B(t,n),B(t,o),B(o,s),B(s,r),g&&g.m(r,null),B(s,a),B(s,l),te(c,l,null),B(t,d),te(h,t,null),u=!0,m||(v=[ke(l,"click",i[7]),Wt(ei.call(null,l)),ke(l,"clientWidth",i[12])],m=!0)},p(y,C){var T,D;const k={};C&64&&(k.visible=y[6]),C&8&&(k.left=y[3]/2+"px"),e.$set(k),y[6]?g?(g.p(y,C),C&64&&x(g,1)):(g=Bh(y),g.c(),x(g,1),g.m(r,null)):g&&(he(),L(g,1,1,()=>{g=null}),ue());const S={};C&64&&(S.visible=y[6]),C&2&&(S.textUnfolded=y[1]),C&32&&(S.content=y[5]),c.$set(S);const I={};C&64&&(I.unfolded=y[6]),C&8&&(I.length=y[3]),C&48&&(I.outDelay=y[4]+20*Math.min((D=(T=y[5])==null?void 0:T.length)!=null?D:10,15)),h.$set(I),(!u||C&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&&j(t),ne(e),g&&g.d(),ne(c),ne(h),m=!1,et(v)}}}function Bh(i){let t,e,n,o,s,r,a;return e=new Vt({props:{center:!0,blurRadius:15,spreadRadius:6}}),o=new jh({props:{enable:i[6],url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[Ew]},$$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=V("div"),ie(e.$$.fragment),n=se(),ie(o.$$.fragment),w(t,"class","audio svelte-1s6gk4a")},m(l,c){_(l,t,c),te(e,t,null),B(t,n),te(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&&tt(()=>{a&&(r&&r.end(1),s=An(t,bn,{duration:1e3,delay:0,easing:ni}),s.start())}),a=!0)},o(l){var c,d;L(e.$$.fragment,l),L(o.$$.fragment,l),s&&s.invalidate(),l&&(r=Kn(t,bn,{duration:1e3,delay:20*Math.min((d=(c=i[5])==null?void 0:c.length)!=null?d:10,15),easing:ni})),a=!1},d(l){l&&j(t),ne(e),ne(o),l&&r&&r.end()}}}function Ew(i){let t,e,n;return e=new _h({props:{playing:i[2]}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class","audio-icon__wrapper svelte-1s6gk4a")},m(o,s){_(o,t,s),te(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&&j(t),ne(e)}}}function kw(i){let t,e,n=i[0].state&&Oh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=Oh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function xw(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){Un.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 Dw extends de{constructor(t){super(),ce(this,t,xw,kw,le,{tag:0},Iw)}}function Mw(i){me(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 Qh(i){let t,e,n,o;return n=new jh({props:{style:"width: max-content; height: max-content;",enable:i[0].state.visible,url:i[0].data.audioUrl,hooksInfo:{tag:i[0]},$$slots:{default:[Lw]},$$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=V("div"),e=V("div"),ie(n.$$.fragment),w(e,"class","audio-tag svelte-58hfjf"),z(e,"background-color",i[4].bgColor),z(e,"color",i[4].fontColor),w(t,"class","audio-tag__wrapper svelte-58hfjf")},m(s,r){_(s,t,r),B(t,e),te(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&&z(e,"background-color",s[4].bgColor),r&16&&z(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&&j(t),ne(n)}}}function Sw(i){let t;return{c(){t=Be(i[5])},m(e,n){_(e,t,n)},p(e,n){n&32&&Re(t,e[5])},d(e){e&&j(t)}}}function Lw(i){let t,e,n,o,s,r,a;return n=new _h({props:{playing:i[3]}}),r=new kr({props:{maxWidth:72,$$slots:{default:[Sw]},$$scope:{ctx:i}}}),{c(){t=V("div"),e=V("div"),ie(n.$$.fragment),o=se(),s=V("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){_(l,t,c),B(t,e),te(n,e,null),B(t,o),B(t,s),te(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&&j(t),ne(n),ne(r)}}}function Tw(i){let t,e,n=i[0].state&&Qh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state?n?(n.p(o,s),s&1&&x(n,1)):(n=Qh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function zw(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){Un.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 jw extends de{constructor(t){super(),ce(this,t,zw,Tw,le,{tag:0},Mw)}}function Vw(i){let t,e;return t=new jw({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function _w(i){let t,e;return t=new Dw({props:{tag:i[0]}}),t.$on("audioRef",i[2]),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function Ow(i){let t,e,n,o;const s=[_w,Vw],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),_(l,n,c),o=!0},p(l,[c]){let d=t;t=a(l),t===d?~t&&r[t].p(l,c):(e&&(he(),L(r[d],1,1,()=>{r[d]=null}),ue()),~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&&j(n)}}}function Bw(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 de{constructor(t){super(),ce(this,t,Bw,Ow,le,{tag:0})}}function Rw(i){me(i,"svelte-10cw0el",".media-wrapper.svelte-10cw0el{position:absolute;width:100%;height:100%}")}function Rh(i){var o;let t,e,n;return e=new Ah({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=V("div"),ie(e.$$.fragment),w(t,"class","media-wrapper svelte-10cw0el")},m(s,r){_(s,t,r),te(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&&j(t),ne(e)}}}function Gw(i){let t,e,n=i[0].state&&i[5]&&Rh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[0].state&&o[5]?n?(n.p(o,s),s&33&&x(n,1)):(n=Rh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function Fw(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 Ww extends de{constructor(t){super(),ce(this,t,Fw,Gw,le,{tag:0},Rw)}}function Gh(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 Nw(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 Gh(t);return Pe(N({},i),{width:n/e,height:o/e})})}function Hw(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 Gh(e),a=s/n,l=r/n,c=a/t,d=l,h=1/o*t+"s";return Pe(N({},i),{width:c,height:d,duration:h})})}function Xw(i){me(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 Fh(i){i[1]=i[19].width}function Wh(i){i[1]=i[19].width,i[16]=i[19].height,i[17]=i[19].steps,i[18]=i[19].duration}function Nh(i){let t,e,n,o=i[0]&&Hh();function s(l,c){return l[8]?Uw:Yw}let r=s(i),a=r(i);return{c(){t=V("div"),o&&o.c(),e=se(),a.c(),w(t,"class","icon"),z(t,"width",i[1])},m(l,c){_(l,t,c),o&&o.m(t,null),B(t,e),a.m(t,null),n=!0},p(l,c){l[0]?o?c&1&&x(o,1):(o=Hh(),o.c(),x(o,1),o.m(t,e)):o&&(he(),L(o,1,1,()=>{o=null}),ue()),r===(r=s(l))&&a?a.p(l,c):(a.d(1),a=r(l),a&&(a.c(),a.m(t,null))),c&2&&z(t,"width",l[1])},i(l){n||(x(o),n=!0)},o(l){L(o),n=!1},d(l){l&&j(t),o&&o.d(),a.d()}}}function Hh(i){let t,e;return t=new Vt({props:{center:!0,blurRadius:24,spreadRadius:16}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function Yw(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:Zw,then:Jw,catch:qw,value:19};return To(e=i[11](Ge({url:i[7],ratio:i[5]})),n),{c(){t=Ee(),n.block.c()},m(o,s){_(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](Ge({url:i[7],ratio:i[5]})))&&To(e,n)||bl(n,i,s)},d(o){o&&j(t),n.block.d(o),n.token=null,n=null}}}function Uw(i){let t,e,n={ctx:i,current:null,token:null,hasCatch:!1,pending:eP,then:$w,catch:Kw,value:19};return To(e=i[10](Ge({url:i[7],steps:i[2],fps:i[6],ratio:i[5]})),n),{c(){t=Ee(),n.block.c()},m(o,s){_(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](Ge({url:i[7],steps:i[2],fps:i[6],ratio:i[5]})))&&To(e,n)||bl(n,i,s)},d(o){o&&j(t),n.block.d(o),n.token=null,n=null}}}function qw(i){return{c:K,m:K,p:K,d:K}}function Jw(i){Fh(i);let t,e;return{c(){t=V("img"),w(t,"alt","tag-icon"),w(t,"class","icon-image svelte-316sq3"),yt(t.src,e=i[7])||w(t,"src",e),z(t,"width",_t(ui({originWidth:i[1],scale:i[4],wantedWidth:i[3]}).width))},m(n,o){_(n,t,o)},p(n,o){Fh(n),o&128&&!yt(t.src,e=n[7])&&w(t,"src",e),o&184&&z(t,"width",_t(ui({originWidth:n[1],scale:n[4],wantedWidth:n[3]}).width))},d(n){n&&j(t)}}}function Zw(i){return{c:K,m:K,p:K,d:K}}function Kw(i){return{c:K,m:K,p:K,d:K}}function $w(i){Wh(i);let t,e=`url(${i[7]})`,n=`steps(${i[17]}, jump-none)`;return{c(){t=V("div"),w(t,"class","icon-keyframe svelte-316sq3"),z(t,"width",_t(ui({originWidth:i[1],originHeight:i[16],scale:i[4],wantedWidth:i[3]}).width)),z(t,"height",_t(ui({originWidth:i[1],originHeight:i[16],scale:i[4],wantedWidth:i[3]}).height)),z(t,"background-image",e),z(t,"animation-duration",i[18]),z(t,"animation-timing-function",n)},m(o,s){_(o,t,s)},p(o,s){Wh(o),s&252&&z(t,"width",_t(ui({originWidth:o[1],originHeight:o[16],scale:o[4],wantedWidth:o[3]}).width)),s&252&&z(t,"height",_t(ui({originWidth:o[1],originHeight:o[16],scale:o[4],wantedWidth:o[3]}).height)),s&128&&e!==(e=`url(${o[7]})`)&&z(t,"background-image",e),s&228&&z(t,"animation-duration",o[18]),s&228&&n!==(n=`steps(${o[17]}, jump-none)`)&&z(t,"animation-timing-function",n)},d(o){o&&j(t)}}}function eP(i){return{c:K,m:K,p:K,d:K}}function tP(i){let t,e,n=i[9]&&Nh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[9]?n?(n.p(o,s),s&512&&x(n,1)):(n=Nh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function ui(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 Pe(N({},i),{width:s,height:r})}function nP(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=Mo();function A(C){return Y(this,null,function*(){const k=yield Hw(C);return g("iconLoaded",k),k})}function b(C){return Y(this,null,function*(){if(typeof h=="number")return Pe(N({},C),{width:h});const k=yield Nw(C);return g("iconLoaded",k),k})}function y(){d||g("iconLoaded")}return kt(()=>{y()}),i.$$set=C=>{"width"in C&&e(1,u=C.width),"icon"in C&&e(12,m=C.icon),"shadow"in C&&e(0,v=C.shadow)},i.$$.update=()=>{var C,k;i.$$.dirty&4096&&e(7,n=m==null?void 0:m.url),i.$$.dirty&4096&&e(2,o=(C=m==null?void 0:m.steps)!=null?C: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=Ge({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 Xh extends de{constructor(t){super(),ce(this,t,nP,tP,le,{width:1,icon:12,shadow:0},Xw)}}function iP(i){me(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 Yh(i){let t,e,n,o,s,r;return e=new Vt({props:{outDelay:0,inDelay:0,center:!0,width:"80%",blurRadius:40,spreadRadius:16,opacity:.08}}),{c(){t=V("div"),ie(e.$$.fragment),n=se(),o=V("div"),s=Be(i[1]),w(o,"class","text svelte-e58ijk"),w(t,"class","text-wrapper svelte-e58ijk")},m(a,l){_(a,t,l),te(e,t,null),B(t,n),B(t,o),B(o,s),r=!0},p(a,l){(!r||l&2)&&Re(s,a[1])},i(a){r||(x(e.$$.fragment,a),r=!0)},o(a){L(e.$$.fragment,a),r=!1},d(a){a&&j(t),ne(e)}}}function oP(i){let t,e,n,o;e=new Xh({props:{icon:i[0],shadow:!0}}),e.$on("iconLoaded",i[4]);let s=i[1]&&i[2]&&Yh(i);return{c(){t=V("div"),ie(e.$$.fragment),n=se(),s&&s.c(),w(t,"class","wrapper svelte-e58ijk")},m(r,a){_(r,t,a),te(e,t,null),B(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=Yh(r),s.c(),x(s,1),s.m(t,null)):s&&(he(),L(s,1,1,()=>{s=null}),ue())},i(r){o||(x(e.$$.fragment,r),x(s),o=!0)},o(r){L(e.$$.fragment,r),L(s),o=!1},d(r){r&&j(t),ne(e),s&&s.d()}}}function sP(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 rP extends de{constructor(t){super(),ce(this,t,sP,oP,le,{tag:3},iP)}}function aP(i){me(i,"svelte-kzl2aj",".customElement__container.svelte-kzl2aj{position:relative}")}function lP(i){let t,e;return{c(){t=new ko(!1),e=Ee(),t.a=e},m(n,o){t.m(i[2],n,o),_(n,e,o)},p:K,d(n){n&&j(e),n&&t.d()}}}function cP(i){let t,e=typeof i[2]=="string"&&lP(i);return{c(){t=V("div"),e&&e.c(),w(t,"class","customElement__container svelte-kzl2aj"),$(t,"unfolded",i[1])},m(n,o){_(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&&j(t),e&&e.d(),i[5](null)}}}function dP(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;kt(()=>{r&&(a instanceof Element?(r.appendChild(a),l=()=>{a instanceof Element&&a.remove()}):typeof a=="function"&&(l=a(r,o)))}),on(()=>{l==null||l()});function c(u){Je[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 hP extends de{constructor(t){super(),ce(this,t,dP,cP,le,{tag:3,renderMap:4},aP)}}function uP(i){me(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/OAHgAyAAAQADAAIAAAAAAAAB9ABdAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACWAAAAlgAAAJYAAACCAA7AcwAdwIIADMCCAA0AhwAMwISADkCCAAuAfQANAH+ACsB/gApAggANAEeAFABHgBQAR4AUAIIADQCCAAuAR4AUAEeAFABfAAxAAEAAAPo/zgAAAIcACkAKQHgAAEAAAAAAAAAAAAAAAAAAABJAAMCLgGQAAUACAKKAlgAAABLAooCWAAAAV4AMgEsAAAAAAgAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFVLV04AIAAg/xsDIP84AMgD6ADIAAAAAQAAAAAB9AK8AAAAIAAAAAAAEADGAAEAAAAAAAEADAAAAAEAAAAAAAIABAAMAAEAAAAAAAMAGwAQAAEAAAAAAAQAEQArAAEAAAAAAAUAPAA8AAEAAAAAAAYAEAB4AAEAAAAAAAgADAAAAAEAAAAAAAkADAAAAAMAAQQJAAEAGACIAAMAAQQJAAIACACgAAMAAQQJAAMANgCoAAMAAQQJAAQAIgDeAAMAAQQJAAUAeAEAAAMAAQQJAAYAIAF4AAMAAQQJAAgAGACIAAMAAQQJAAkAGACIQUxJQkFCQSBGb250Qm9sZDEuMDAwO1VLV047QUxJQkFCQUZvbnQtQm9sZEFMSUJBQkEgRm9udCBCb2xkVmVyc2lvbiAxLjAwMDtQUyAwMDEuMDAwO2hvdGNvbnYgMS4wLjg4O21ha2VvdGYubGliMi41LjY0Nzc1QUxJQkFCQUZvbnQtQm9sZABBAEwASQBCAEEAQgBBACAARgBvAG4AdABCAG8AbABkADEALgAwADAAMAA7AFUASwBXAE4AOwBBAEwASQBCAEEAQgBBAEYAbwBuAHQALQBCAG8AbABkAEEATABJAEIAQQBCAEEAIABGAG8AbgB0ACAAQgBvAGwAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAMAAwADsAUABTACAAMAAwADEALgAwADAAMAA7AGgAbwB0AGMAbwBuAHYAIAAxAC4AMAAuADgAOAA7AG0AYQBrAGUAbwB0AGYALgBsAGkAYgAyAC4ANQAuADYANAA3ADcANQBBAEwASQBCAEEAQgBBAEYAbwBuAHQALQBCAG8AbABkAAAAAAADAAAAAwAAASIAAQAAAAAAHAADAAEAAAEiAAABBgAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAABCSEMANjc4OTo7PD0+PwAAAAAAAAACAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGwAAAAAAABwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAFoAAAAQABAAAwAAACAALgA5AFoAegCl/xv//wAAACAALAAwAEEAYQCl/xr////hAAAABv/B/7v/nwAAAAEAAAAOAAAAAAAAAAAACgAAAEIASABDAEYARwADAAAAAAAA/7UAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAQAEAgABAQERQUxJQkFCQUZvbnQtQm9sZAABAQEg+A8A+CAB+CEC+BgEtPtc+HT5tAX3KA/3UBGcHAZWEgAHAQENExoiKTpLbmluZS4wMDEuMDAxbW9uZXkudW5pRkYxQm5pbmUuMDAxdW5pRkYxQWNvcHlyaWdodCBtaXNzaW5nQUxJQkFCQSBGb250IEJvbGQAAAEAAQAAIhkAQhkAEQkBhwABigAADQAADwAAZAABiAABiwABiQAADgAASQIAAQCtAK4ArwCwALEAsgCzALQAtQC2ALcAuAC5ALoAuwC8AL0AvgC/AMAAwQDCAMMAxADFAMYAxwDIAMkAygDLAMwAzQDOAM8A0ADRANIA0wDUANUA1gDXANgA2QDaANsA3ADdAN4A3wDgAOEA4gFDAVoBqwIsAloCuAMcAzkDzwQ4BDoEPARRBFMEVQTNBOIE8QUEmPtc0Ky6rKKsuqzHrKPDoa2irLCspq2vraWssKzOAejVrKytrKzYA/gu+bQV+9H+fPfRBj76ORVqSWbNavs6rM2wSqwH7vsVFUXNafs68wfNaRVqZ6wG704VaklFJ6zNsEmsB/c6TxUn+zqt9xnNB6z7DhX7Bfs69wWsO++6anRpwwfv+0EV+wX7OvcFB/cZahUnXO8GrFMVamsHRVwF8Wr7OqwG0boFRawGDg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4OrIr5UQH3OPdUA/ebihVmaZSdbB9Mr2TL0xr3vgewlK2eqh7Kr86y1BuvrIJ5qh/HZrJIQhr7vgdngmp5bR5OZ0tkQxv46ARUX2FSH/u+B1a5YMDAs7TCHve+B8RjtVYeDnD4utkB93HzA/cL+QgVPfH8vPP5UgcOrIn5UgG++DYD+GmJFfw28wb3svfUBZ2glKSnGsNduFBWXF1UiB4ijgaMsJWsnqoIyLHMstYbsa6Ceawfy2ezSUAaVndXZ2Me+2/7jQX3pwYOrIvy92Tz90ryEr/zM/L3SvMu8hPy+B/3/xUT7LCwpMDDGq6CrHqoHsZnTK5DG2lrg3puH09pZk5EGobykAe4tba6vrViXFZiYlcedyOfBhPyxLpdUlJcW1JSXLvEH5ojfAdllGiebB5LsM5j1xuwrpSeqx/KsLPO1xrKcMNerx4OwPL1Affi8gP4dPdlFWD4fPshBvuJ/HkF+wH3ryPy87YH+8z1Ffc69+QF++QHDrb3ZNf3ZfAB9zX3YwP3nRZlaJSebB9LsGPO1xrzBlK6XMTEubrEHtcHxF26UlJcXFIeI/g0+BYh+677JAaorK2ZsBuwroJ4qx/LZrNHPxo/B2aCaHhrHktmR2NAGw6si/X3b/IBufX3b/ID95n4QBWAg4uKhh/3EfelBfsHBvtK/CMFfnCFbm0aZJVnnmoeSrLPYdobsq6Vnqwfy7K10dgasoGueKwey2RHtT4b+9YETlu7yMe8vcfHvVlPT1laTx8OmIr5UQG/+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 fP(i){let t,e;return{c(){t=V("div"),w(t,"data-info","tag content is keep folded"),w(t,"data-id",e=i[1].id)},m(n,o){_(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&&j(t)}}}function mP(i){let t,e,n,o,s,r,a,l,c,d;const h=[wP,yP,bP,AP,vP,gP],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=V("div"),e=V("div"),n=V("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=Oe(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),z(t,"width",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0),z(t,"height",i[1].stickType==="Plane"||i[1].contentType==="MediaModel"?"100%":0)},m(v,g){_(v,t,g),B(t,e),B(e,n),~o&&u[o].m(n,null),l=!0,c||(d=ke(t,"click",ll(i[15])),c=!0)},p(v,g){var b;let A=o;o=m(v),o===A?~o&&u[o].p(v,g):(s&&(he(),L(u[A],1,1,()=>{u[A]=null}),ue()),~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=Oe(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&&z(t,"width",v[1].stickType==="Plane"||v[1].contentType==="MediaModel"?"100%":0),g&2&&z(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&&j(t),~o&&u[o].d(),c=!1,d()}}}function pP(i){let t,e,n,o,s,r,a;return e=new hP({props:{tag:Ge(i[1]),renderMap:i[3]}}),{c(){t=V("div"),ie(e.$$.fragment),w(t,"class",n=Oe(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){_(l,t,c),te(e,t,null),s=!0,r||(a=ke(t,"click",i[14]),r=!0)},p(l,c){const d={};c&2&&(d.tag=Ge(l[1])),c&8&&(d.renderMap=l[3]),e.$set(d),(!s||c&2&&n!==(n=Oe(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&&j(t),ne(e),r=!1,a()}}}function gP(i){let t,e;return t=new Ww({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function vP(i){let t,e;return t=new rP({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function AP(i){let t,e;return t=new gw({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function bP(i){let t,e;return t=new Qw({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function yP(i){let t,e;return t=new uw({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function wP(i){let t,e;return t=new Lb({props:{tag:Ge(i[1])}}),{c(){ie(t.$$.fragment)},m(n,o){te(t,n,o),e=!0},p(n,o){const s={};o&2&&(s.tag=Ge(n[1])),t.$set(s)},i(n){e||(x(t.$$.fragment,n),e=!0)},o(n){L(t.$$.fragment,n),e=!1},d(n){ne(t,n)}}}function PP(i){let t,e,n,o,s;const r=[pP,mP,fP],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),_(c,o,d),s=!0},p(c,[d]){let h=e;e=l(c,d),e===h?a[e].p(c,d):(he(),L(a[h],1,1,()=>{a[h]=null}),ue(),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&&j(o)}}}function CP(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;Ws("hooks",h),Ws("mediaStore",v);let A,b;function y(I){I?h.emit("exposure",{id:r,type:"start"}):h.emit("exposure",{id:r,type:"end"})}function C(I,T,D){var X,J;return!(!T.visible||!T.enabled||!D.visible||!((X=I.state)!=null&&X.visible)||((J=I.temporaryState)==null?void 0:J.visible)===!1||ut(I)&&!I.mediaVisible)}const k=I=>h.emit("click",{event:I,target:"TagContent",tag:d}),S=I=>h.emit("click",{event:I,target:"TagContent",tag:d});return i.$$set=I=>{"withAnimation"in I&&e(0,c=I.withAnimation),"tag"in I&&e(1,d=I.tag),"hooks"in I&&e(2,h=I.hooks),"renderMap"in I&&e(3,u=I.renderMap),"state"in I&&e(6,m=I.state),"mediaStore"in I&&e(7,v=I.mediaStore),"temporaryState"in I&&e(8,g=I.temporaryState)},i.$$.update=()=>{var I,T,D,X,J,G,R,F,Q,W,q;i.$$.dirty&2&&e(12,n=(I=d.state)==null?void 0:I.unfolded),i.$$.dirty&2&&e(11,o=(T=d.state)==null?void 0:T.visible),i.$$.dirty&322&&e(13,s=m.visible&&g.visible&&((D=d.state)==null?void 0:D.visible)),i.$$.dirty&2&&(r=d.id),i.$$.dirty&322&&e(5,a=!C(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"):(R=d==null?void 0:(G=d.hooks).emit)==null||R.call(G,"folded")),o!==void 0&&o!==A&&(e(9,A=o),o?(Q=(F=d.hooks).emit)==null||Q.call(F,"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 Uh=class extends de{constructor(t){super(),ce(this,t,CP,PP,le,{withAnimation:0,tag:1,hooks:2,renderMap:3,state:6,mediaStore:7,temporaryState:8},uP)}};function IP(i){me(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 EP(i){let t,e,n,o,s,r,a,l,c,d,h,u;return o=new Vt({props:{center:!0,blurRadius:15,spreadRadius:5,opacity:.3}}),c=new Xh({props:{icon:i[2],width:i[1]}}),c.$on("iconLoaded",i[7]),{c(){t=V("div"),e=V("div"),n=se(),ie(o.$$.fragment),s=se(),r=V("div"),a=se(),l=V("div"),ie(c.$$.fragment),w(e,"class","tag-point-click-helper svelte-7aiuwz"),w(r,"class","tag-unfolded-point svelte-7aiuwz"),z(r,"transition-delay",(i[3]?i[5]:0)+"ms"),w(l,"class","tag-folded-point svelte-7aiuwz"),z(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){_(m,t,v),B(t,e),B(t,n),te(o,t,null),B(t,s),B(t,r),B(t,a),B(t,l),te(c,l,null),d=!0,h||(u=ke(e,"click",i[4]),h=!0)},p(m,[v]){v&8&&z(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&&z(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&&j(t),ne(o),ne(c),h=!1,u()}}}function kP(i,t,e){let n,o,s,r;const a=sn("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){Un.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:GA}),i.$$.dirty&64&&e(1,r=(()=>{var S,I,T,D;const C=(I=(S=l.style)==null?void 0:S.point)==null?void 0:I.width;if(typeof C=="number")return C;const k=(D=(T=l.style)==null?void 0:T.point)==null?void 0:D.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 xP extends de{constructor(t){super(),ce(this,t,kP,EP,le,{tag:6},IP)}}function DP(i){me(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 MP(i){let t;return{c(){t=V("div"),w(t,"data-info","tag point is disable")},m(e,n){_(e,t,n)},p:K,i:K,o:K,d(e){e&&j(t)}}}function SP(i){let t,e;return t=new xP({props:{tag:i[1]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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){ne(t,n)}}}function LP(i){let t;return{c(){t=V("div"),w(t,"data-info","tag content is disable")},m(e,n){_(e,t,n)},p:K,i:K,o:K,d(e){e&&j(t)}}}function TP(i){let t,e;return t=new Uh({props:{mediaStore:i[2],withAnimation:i[0],tag:Ge(i[1]),hooks:i[15],state:i[4],temporaryState:i[5],renderMap:i[3]}}),{c(){ie(t.$$.fragment)},m(n,o){te(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=Ge(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){ne(t,n)}}}function zP(i){let t,e,n,o,s,r,a,l,c,d;const h=[SP,MP],u=[];function m(b,y){return b[14]?0:1}n=m(i),o=u[n]=h[n](i);const v=[TP,LP],g=[];function A(b,y){return b[13]?0:1}return r=A(i),a=g[r]=v[r](i),{c(){t=V("div"),e=V("div"),o.c(),s=se(),a.c(),w(e,"class",l=Oe(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),z(e,"left",i[9]),z(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]),z(t,"z-index",i[7])},m(b,y){_(b,t,y),B(t,e),u[n].m(e,null),B(e,s),g[r].m(e,null),d=!0},p(b,[y]){let C=n;n=m(b),n===C?u[n].p(b,y):(he(),L(u[C],1,1,()=>{u[C]=null}),ue(),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):(he(),L(g[k],1,1,()=>{g[k]=null}),ue(),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=Oe(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&&z(e,"left",b[9]),y&256&&z(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&&z(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&&j(t),u[n].d(),g[r].d()}}}function jP(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=sn("hooks");return i.$$set=C=>{"withAnimation"in C&&e(0,u=C.withAnimation),"tag"in C&&e(1,m=C.tag),"mediaStore"in C&&e(2,v=C.mediaStore),"renderMap"in C&&e(3,g=C.renderMap),"state"in C&&e(4,A=C.state),"temporaryState"in C&&e(5,b=C.temporaryState)},i.$$.update=()=>{var C,k,S,I,T,D,X,J;i.$$.dirty&2&&e(14,n=(()=>{var G,R;return!(((R=(G=m.style)==null?void 0:G.point)==null?void 0:R.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=!((C=m.screenPosition)!=null&&C.leftPercent)||!((k=m.screenPosition)!=null&&k.topPercent)||m.enabled===!1||!m.state),i.$$.dirty&2&&e(10,a=!((S=m.state)!=null&&S.visible)||((I=m.temporaryState)==null?void 0:I.visible)===!1),i.$$.dirty&2&&e(6,l=(T=m.state)==null?void 0:T.unfolded),i.$$.dirty&2&&e(9,c=((D=m.screenPosition)==null?void 0:D.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?9999:0))},[u,m,v,g,A,b,l,h,d,c,a,r,s,o,n,y]}class VP extends de{constructor(t){super(),ce(this,t,jP,zP,le,{withAnimation:0,tag:1,mediaStore:2,renderMap:3,state:4,temporaryState:5},DP)}}function _P(i){me(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 qh(i,t,e){const n=i.slice();return n[7]=t[e],n}function Jh(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=qh(i,s,a),c=r(l);n.set(c,e[a]=Zh(c,l))}return{c(){t=V("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){_(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],he(),e=xt(e,l,r,1,a,s,n,t,an,Zh,null,qh),ue()),(!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&&j(t);for(let l=0;l<e.length;l+=1)e[l].d()}}}function Zh(i,t){let e,n,o;return n=new VP({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){_(s,e,r),te(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&&j(e),ne(n,s)}}}function OP(i){let t,e,n=i[4].enabled&&Jh(i);return{c(){n&&n.c(),t=Ee()},m(o,s){n&&n.m(o,s),_(o,t,s),e=!0},p(o,[s]){o[4].enabled?n?(n.p(o,s),s&16&&x(n,1)):(n=Jh(o),n.c(),x(n,1),n.m(t.parentNode,t)):n&&(he(),L(n,1,1,()=>{n=null}),ue())},i(o){e||(x(n),e=!0)},o(o){L(n),e=!1},d(o){n&&n.d(o),o&&j(t)}}}function BP(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 Ws("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 de{constructor(t){super(),ce(this,t,BP,OP,le,{withAnimation:0,tags:1,hooks:6,mediaStore:2,renderMap:3,state:4,temporaryState:5},_P)}}const RP=new Gt.GLTFLoader;function GP(i){return new Promise((t,e)=>{function n(s){t(s)}function o(s){e(s)}RP.load(i,n,void 0,o)})}const FP=new Map,WP=new Map;class NP extends XA{constructor(e){super(e);f(this,"group",new O.Group);f(this,"renderMap",new Map);f(this,"imagePlaneGroup",new O.Group);f(this,"gltfObjectGroup",new O.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=GP(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 O.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(),ut(e)){if(this.getRenderType(e)==="Mesh"&&!e.mediaPlane){const l=e.data.mediaPosition.map(It);e.mediaPlane=new bd(e.data.mediaData[0].url,e.data.mediaPosition.map(It),{objectFit:e.data.objectFit});const c=new O.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 Cr&&((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(It);if(n.mediaPlane&&n.mediaPlane.removeFromParent(),r==="Image")n.mediaPlane=new bd(s,a,{objectFit:n.data.objectFit}),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 Cr(s,a,{videoCoverSrc:o.videoCoverUrl,playButton:n.data.playIcon,paused:!((u=n.data.autoplayConfig)!=null&&u.autoplayVideo),objectFit:n.data.objectFit,videoTextureMap:FP,ImageTextureMap:WP});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 O.Quaternion().setFromUnitVectors(d,h);c.css3DObject.setRotationFromQuaternion(u)}return}else{if(ut(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=Bs(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 Uh({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()}},ut(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=ut(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 O.Vector3().fromArray(r[0]),c=new O.Vector3().fromArray(r[2]),d=vn(l,c).add(new O.Vector3(0,0,5e-4)),h=new O.Matrix4().setPosition(d),u=new O.Matrix4().makeScale(o,o,o),m=new O.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(EA).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 Kh="Dnalogel-PanoTagPlugin",HP=i=>`${Kh}--${i}`;class ds extends NP{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=>{ut(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},N({},n)),this.debug=this.params.debug,this.config=this.params.config,zA(1,{namespace:yr.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(Kh," 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{yA(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 c,d;const a=this.getTagConfig(r);return Pe(N({},r),{enabled:(c=r.enabled)!=null?c:!0,id:(d=r.id)!=null?d:lt(),data:Ye(r.data,a.initialData,r.data),state:N({visible:void 0,unfolded:!this.can("fold",r)},a.initialState),hooks:new ve.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:h=>this.changeDataById(r.id,h)})}).filter(r=>r.position);return s.forEach(LA),this.tags.push(...s),xA(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=N({},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=It(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=N(N({},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=It(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}=fd(MA(()=>{this.store.resizeObserverDisposer&&o()},500),e),{observe:a,unobserve:l}=fd(ud(()=>n(),400),e);return s(),a(),()=>{r(),l()}}handleFiveModeChange(e){this.setModelMedialVisible(),this.tags.forEach(n=>{ut(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=Pe(N({},e.temporaryState),{visible:n.visibleConfig.keep==="visible"}):e.temporaryState=Pe(N({},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 ud(()=>{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=Pe(N({},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(IA).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 E.Mesh(new E.BoxGeometry,new E.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=yo();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 $h=(i=>(i.PointTag="PointTag",i.PlaneTag="PlaneTag",i))($h||{}),eu=(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))(eu||{}),tu=(i=>(i.Two="2D",i.Three="3D",i))(tu||{});const XP=(i,t)=>new ds(i,t);function YP(i){me(i,"svelte-m8w0ju",".guide-line__tag.svelte-m8w0ju{position:relative}.guide-line__tag-point.svelte-m8w0ju{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-m8w0ju{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-m8w0ju{position:absolute;left:-0.9375rem;bottom:1.9375rem;display:flex}.guide-line__tag-icon.svelte-m8w0ju{width:1.875rem;height:1.875rem;background-size:100%}.guide-line__tag-text.svelte-m8w0ju{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 nu(i){let t,e;return{c(){t=V("div"),e=Be(i[0]),w(t,"class","guide-line__tag-text svelte-m8w0ju"),z(t,"border-image-source",`url(${i[3]})`)},m(n,o){_(n,t,o),B(t,e)},p(n,o){o&1&&Re(e,n[0])},d(n){n&&j(t)}}}function UP(i){let t,e,n,o,s,r,a,l,c=i[0]&&nu(i);return{c(){t=V("div"),e=V("div"),n=se(),o=V("div"),s=se(),r=V("div"),a=V("div"),l=se(),c&&c.c(),w(e,"class","guide-line__tag-point svelte-m8w0ju"),w(o,"class","guide-line__tag-line svelte-m8w0ju"),w(a,"class","guide-line__tag-icon svelte-m8w0ju"),z(a,"background-image",`url(${i[1]})`),w(r,"class","guide-line__tag-content svelte-m8w0ju"),w(t,"class","guide-line__tag svelte-m8w0ju"),z(t,"opacity",i[2])},m(d,h){_(d,t,h),B(t,e),B(t,n),B(t,o),B(t,s),B(t,r),B(r,a),B(r,l),c&&c.m(r,null)},p(d,[h]){h&2&&z(a,"background-image",`url(${d[1]})`),d[0]?c?c.p(d,h):(c=nu(d),c.c(),c.m(r,null)):c&&(c.d(1),c=null),h&4&&z(t,"opacity",d[2])},i:K,o:K,d(d){d&&j(t),c&&c.d()}}}function qP(i,t,e){let{text:n=""}=t,{icon_url:o=""}=t,{opacity:s=1}=t;const r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHUAAAA2CAMAAADOFiZMAAACEFBMVEUAAACIiIheXl5oaGh6enpsbGxiYmJ9fX1wcHBXV1eBgYFzc3NSUlKNjY2Dg4NOTk51dXVXV1dmZmZTU1N3d3dcXFyMjIyEhIRNTU2QkJC0tLS5ubnHx8fOzs6np6exsbHKysqoqKi9vb3U1NTPz8/Nzc2vr6/Dw8OysrK/v7/X19fS0tKurq62traqqqrJycmurq64uLifn5/Dw8O6urqQkJC6urro6Ojt7e3o6OjU1NS3t7fBwcGjo6Ozs7Orq6u1tbXAwMCurq6rq6vy8vLx8fHr6+vp6enZ2dnd3d3a2trX19fV1dW/v7/IyMihoaGampqVlZWLi4uCgoK+vr6urq7m5ubw8PDk5OTu7u7i4uLg4ODe3t7q6urS0tLi4uLOzs7e3t7Hx8fa2tqrq6vExMTAwMCnp6efn5+WlpaHh4ezs7OoqKiJiYm6urqZmZmurq59fX29vb23t7e4uLipqanp6enc3Nza2trW1tbT09Pm5ubj4+PQ0NDg4ODExMTCwsK7u7vBwcG8vLy5ubm8vLy+vr64uLiysrKdnZ3CwsJoaGisrKzHx8ekpKTExMTv7+/i4uLa2trm5ubk5OTLy8vKysrExMTQ0NDX19ecnJzT09N/f3+dnZ12dnaQkJCXl5etra3Pz8+4uLiXl5fGxsaqqqrr6+vQ0NDKysrNzc3W1takpKShoaGsrKysrKyduRZkAAAAsHRSTlMATE1NTExMTUxNTExMTExNTExMTU1MTU1MTICFc313fnl0iIWAe3h3aYqIgXx7eXZzcnFwaGggxLiog4J0dG9mZF82FMfEtK2pkYqKh3x4cm1rZmEmH8G/vry6trOxoZ2clpKOe3ptbWZjYmFgXFpaVlFPSDYlx7CspaSjoJ6akY6HfXt4bGpmY1xUU0g2LSzCuK6lopiWhoF3YmFaVlZUUU5KPyEJCcl/fXNdXFxZUIUrIQsAAAV6SURBVFjDvZj3VxNBEMePBBIOQgmEQGghISSASSBBUQFBVIpUEaR3aVJExN4F6fbee6//opPN2507E3P7fD4+b54z+935zt7lvPsBYbZ5lyXT7R5xms2ppaVpV615eVeuXL48PPzw4YPBwYsX+/vPnT1bW1t75u7p0729PT13urs7O9vbt2/ffurUp1OQ2ts7O7u77/T09PaevnvmTG3t2XPn+vsvDg4+GH5UVjl/SAjGe29La2vr5EFgm4+WlpYDgNfrbW7etQuuKDPTPTIy4nSa4bJ8lKYBV69arXmA1WpN81FamgqYzU6n0+12ZwI+qzPtyvDlR0dPCoGsecW4FEZcShwEyUDIGvtD+DcOZlrzFvcE3qylFXZ1cTqIgGk0K1xRSL84abaWtwl/8KM5kTiok04B2BpAPUWXAoGnQK3gn0xNW90ryDhpafXvJsYlJuoSdRCyTJHqBOxR9IvbUl1/PN5pL9tFR4gTJJmi7N+wl8qf7k33S+YQE0VRJwZz42RogDZcAxx+sTn1jSDho6VFBKAbp9K1XqfXi3oRgmSqQ2AGePziNpfs2GN2lV5Pp+IJkkwIrDFz+Y+Y90h/Yvtz+f0o1YGnc/lVXvshASk8IHUm6ZMIYhI6YAEyqyHkE/n8Kkuh5AX6ZVdBlypJpRJVIgTJ0IluEGCb1BDYCzWFx79h/yl5ZV3PVUSVAQIDFhCyLO/h9E9KfuOPriOqzUFjmRYYueOqTWLGfhPfHZcGrkOlgcAGskZdAV7/eIVA2eN6qZGA3Yhcxxozn3+mkD3ZQ64Z3EnQJEBouMB+Xr+68LpAuTZBOokDoPXfNIK85vZP5AqUreNqdYI6AUINkBrAtUatgaA67mEft38GvxRThWopOAFrBbj9kYXsa3z0mnrTsLAHe3yRzxGhjoBQ0BT848foqfONkT6FAAWrce3PeEpA5vZPsDf23aIhgpfIiEiIiH/mKftPfKJxTjaNv8bM6zlSzk5dmIsMDk7EGrMEbj+e+q5xLjoyOrQbGiCCaZh5/PgLzy8YiIrgNPmaZtQovP6J3ezNafTvxEfHQ2An8v/2K47hV4J0ExVBDbNCD4e/nH0lKj1+1RBvMEQboiEMUJI1BOmmGq0pVOP1z3nYF3G53EAIN4SHx4djNyxAkutQA1QnGeD2z3rY199RIZ+EtVxDPaDm9VdspYcWj65pteFaonIDBghpzeXyzNNTbyy8CpgCyCehjnvYx+uf9RTTU9cbo7SbRPmKQBnzaKMI2igthD8jVAvIuM/rXytjfyz4MFqBDgLWPGuA05/sqRQobaOzsBMbFQsRhaAWco/A6Z92FAuU446wWL+aHJWcHJtMOzEDwWrU+PyvHEcFRlkutELInT4NFiCRGqA6yQDWfH5jWdFegXLL8V3qDIsNIySHoRsWIGMN/wBY8/mXRosFxrrDCE20EwJzCGQ9XP7crBN46AdHbthmkPvluICccLzgchnDjBD/eqaxKOOtIKGyiEzDqSFOCt7D4X/dlHFDkNCWPu3fjTHGQBgpbI06TkeIpuQ37bbltAlSKstM/g6EdYcEr0jJv2rLfrZXkFKcPhVjMsWY0GGSrTn00H7TakbD11sChd7qa+gCSKdJVitpyvWLlab6uifsieKtLk1N7QZWtvpYXl4aGxsrAtIJBQVNWVlZOTkZGRm2z7bHW0q2lJRkZ2c3NOTn19fV19fn5zfAsmQL8Nhmg66cHOhvKigoSC/Iysk+vH9//jd2n8g6TG7yjbXZYCAMq6s7fBiah4aGLl0aGLhw4f758zuBmpq+vurq6h07dnR1dXTcrqqq2uejqup2R0dXF8jV1X19NTU1O3feu3f+/oWBgUtD++uePHtbLAThNzRClbi+VnseAAAAAElFTkSuQmCC";return i.$$set=a=>{"text"in a&&e(0,n=a.text),"icon_url"in a&&e(1,o=a.icon_url),"opacity"in a&&e(2,s=a.opacity)},[n,o,s,r]}class JP extends de{constructor(t){super(),ce(this,t,qP,UP,le,{text:0,icon_url:1,opacity:2},YP)}}function ZP(i){return i.length===0?[]:i.filter((t,e)=>t!==i[e-1])}const KP=`
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 Or{constructor(t,e){f(this,"startTagContainer");f(this,"endTagContainer");f(this,"mesh");f(this,"five");f(this,"mode");f(this,"path",[]);f(this,"_panoGroup",null);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 bo({progress:0}).to({progress:1}).duration(1500).repeat(1/0));f(this,"flickerAnime",yo(300).yoyo(!0).repeat(5));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"?Vs(t):Xa(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&&Br(this.startTagContainer.tag)&&((o=this.startTagContainer.app)==null||o.$set(Pe(N({},this.startTagContainer.tag.data),{opacity:n}))),this.endTagContainer.tag&&Br(this.endTagContainer.tag)&&((s=this.endTagContainer.app)==null||s.$set(Pe(N({},this.endTagContainer.tag.data),{opacity:n})))});f(this,"logWarning",t=>Z0("GuideLineModeItem: ",t));f(this,"logError",t=>rd("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 ds(this.five)},this.endTagContainer={tag:null,plugin:new ds(this.five)};const n=new E.BufferGeometry,o=new E.ShaderMaterial({vertexShader:KP,fragmentShader:$P,transparent:!0,uniforms:{map:{value:null},useMapColor:{value:0},mapColor:{value:new E.Color},mapOpacity:{value:1},backgroundColor:{value:new E.Color},backgroundOpacity:{value:0},borderColor:{value:new E.Color},borderOpacity:{value:0},opacity:{value:1},flicker:{value:1},maxU:{value:0},vOffset:{value:0}}});this.mesh=new E.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}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=ZP(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 l,c,d;if(this.disposed)return this.logError("disposed");const n=(l=e==null?void 0:e.scale)!=null?l:this.scale,o=(c=e==null?void 0:e.width)!=null?c:this.width,s=(d=e==null?void 0:e.unit_length)!=null?d:this.unitLength;this.path=t,this.scale=n,this.width=o,this.unitLength=s;const{geometry:r,maxU:a}=gA({path:t,width:o*n,unitLength:s*n,skipPositions:this.skippedPositions});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 E.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 E.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 E.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,ji(t).then(e=>{this.disposed||this.textureUrl===t&&(e.wrapT=E.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()}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,Br(s)&&(n.tag.element=r=>{var l;(l=n.app)==null||l.$destroy();const a=new JP({target:r,intro:!0,props:s.data});return n.app=a,()=>a.$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[N({type:"CatmullRomCurve3",points:s},n)]}}function Br(i){return i.contentType==="Custom"}const eC=Object.freeze(Object.defineProperty({__proto__:null,GuideLineModeItem:Or},Symbol.toStringTag,{value:"Module"}));function iu(i){const t=Math.abs(Math.cos(i.latitude));return new E.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function tC(i,t){const e=iu(i),n=iu(t);return e.angleTo(n)}const nC=i=>Y(this,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),hs=Math.PI*2;function iC(i){return i>=0&&i<hs?i:(i%hs+hs)%hs}function oC(i){return{longitude:iC(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function sC(i,t,e,n){const o=-i/e,s=i;return o*n+s}function rC(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const ou="v1.0.6",su="CruisePlugin",us=`${su}@${ou}`,ru=()=>{console.error(`${us} is disposed`)},aC=()=>{console.warn(`${us} is disabled`)},lC=()=>{console.error(`${us} is disabled`)},Qr=new Map;class Hi extends yn{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,{[`__${su}_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 ru();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,C;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]=[...(C=a[k])!=null?C:[],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=du(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(`${us} 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(Pe(N({},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 ru();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return lC();const o=N({},this.state);this.state=N(N({},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),zt(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:lt(),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 Pe(N({id:(c=s.uuid)!=null?c:lt(),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,C;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)!==((C=n[u])==null?void 0:C.floorIndex))return;const g=new E.Vector3().subVectors(v,m);return oC(g.normalize())})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:d,stay:o.stay,data:N({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:N({effect:"Rotate",panoIndex:c},h)}))}),{keyframesId:lt(),keyframes:s.map((c,d)=>N({id:lt(),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=lt();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 rC(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 tC(h,e)/l}return 800})();r.currentPlayKeyframe&&(r.currentPlayKeyframe.originDuration=c);const d=this.getSpeededDuration(c);return new Promise(h=>{nC(()=>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 Qr.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return Qr.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 Qr.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&&aC()}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-sC(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){this.privateState.fiveOriginGetProgress&&(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}f(Hi,"PluginVersion",ou);const cC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),dC=i=>new Hi(i);class au{constructor(t){f(this,"id");f(this,"renderID");f(this,"isGuideLine",!0);f(this,"panoramaItem");f(this,"modelItem");f(this,"hooks",new ve.Subscribe);f(this,"_visible",!0);f(this,"plugin");f(this,"five");f(this,"logError",t=>rd("GuideLineItem: ",t));this.id=t.id,this.five=t.five,this.plugin=t.plugin,this.panoramaItem=new Or(this.five,{mode:"panorama",plugin:this.plugin,parent:this}),this.modelItem=new Or(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,N({skipPanoGroup:c},r))}else e.path&&n.setGeometryByPath(s,r);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=N({panoIndexList:this.panoramaItem.panoGroup},t);this.hooks.emit("walkStart",{userAction:!0});const[n]=yield ti(hC(this.five,e));if(this.hooks.emit("walkEnded",{userAction:!0}),n)return this.logError(n.message)})}}function hC(i,t){return Y(this,null,function*(){if(t.panoIndexList.length===0)return;const e=i.getCurrentState();e.mode!=="Panorama"&&(yield ir(i,["Panorama",{longitude:e.longitude,latitude:0,panoIndex:t.panoIndexList[0]}]));const n=new Hi(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 uC=Object.freeze(Object.defineProperty({__proto__:null,GuideLineItem:au},Symbol.toStringTag,{value:"Module"})),lu="v1.1.0",Rr="GuideLinePlugin",cu=`${Rr}@${lu}`;class fC extends yn{constructor(e,n){super(e,n);f(this,"version",lu);f(this,"name",Rr);f(this,"cruisePlugin");f(this,"itemMap",new Map);f(this,"heightOffset",0);f(this,"state",{visible:!1,enabled:!0});f(this,"data");f(this,"_disposed",!1);f(this,"disposedErrorLog",()=>{console.error(`${cu} is disposed`)});this.cruisePlugin=new Hi(e,{useGuideLine:!1}),Object.assign(window,{[`__${Rr}_DEBUG__`]:this})}get disposed(){return this._disposed}load(e,n,o=!0){return Y(this,null,function*(){var u,m,v,g,A,b,y;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,l={panorama_style:{visible:!1,unit_length:(u=a==null?void 0:a.unitHeight)!=null?u:.4,width:(m=a==null?void 0:a.unitWidth)!=null?m:.6,texture:{url:(v=a==null?void 0:a.arrowTextureUrl)!=null?v:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"}}},c=(A=(g=r.routes)==null?void 0:g.map(C=>{var k;return Ye({},l,{id:(k=C.id)!=null?k:Date.now(),pano_group:C.panoIndexList})}))!=null?A:[],d=(y=(b=r.lines)==null?void 0:b.map(C=>Ye({},l,C)))!=null?y:[],h=[...c,...d];yield this.waitFiveLoaded(),this.clear(),h.forEach(C=>{this.addGuideLineItem(C)}),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(`${cu} 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=N({},this.state);this.state=N(N({},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),zt(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 au({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 E.Vector3().fromArray(r).distanceTo(new E.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 du=(i,t)=>new fC(i,t);function hu(i,t,e){if(e){const o=new E.Vector3().subVectors(i.position,e).applyQuaternion(i.quaternion.clone().inverse()).applyQuaternion(t).add(e);i.position.copy(o)}i.quaternion.copy(t)}class mC extends O.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 fs extends mC{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){hu(this,e,n)}applyHelperQuaternion(e,n){if(n){const o=new O.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class pC extends fs{}class gC extends fs{}class vC extends fs{}class uu extends fs{}class AC extends uu{}class bC extends E.Group{constructor(e){super();f(this,"direction");this.direction=e||"x"}}class fu extends E.Mesh{constructor(e,n,o){super(e,n);f(this,"direction");this.direction=o||"x"}}function yC(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new E.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function Gr(i,t,e){if(!t||!e||!i)return;const n=yC(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new E.Raycaster;return o.setFromCamera(n,i),o}function wC(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 Fr extends bC{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 E.Color((d=e.color)!=null?d:16214315),o=new E.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:E.DoubleSide}),s=new E.ConeGeometry(.04,.1,32),r=new fu(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new E.CylinderGeometry(a,a,.4,32),c=new fu(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 Wr={X:15618642,Y:4765519,Z:4227839};class fi{static get X(){return new E.Color(Wr.X).convertSRGBToLinear().clone()}static get Y(){return new E.Color(Wr.Y).convertSRGBToLinear().clone()}static get Z(){return new E.Color(Wr.Z).convertSRGBToLinear().clone()}}class PC extends pC{constructor(e){super(e);f(this,"xArrow",new Fr({direction:"x",color:fi.X}));f(this,"yArrow",new Fr({direction:"y",color:fi.Y}));f(this,"zArrow",new Fr({direction:"z",color:fi.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 xn(i,t){return CC(document.createElement(t!=null?t:"div"),i)}function CC(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function IC(i){const t=xn(N({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"9999",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 EC extends vC{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 Nr({direction:"x",color:fi.X})),(n==null?void 0:n.xzCircleEnable)!==!1&&(this.yCircle=new Nr({direction:"y",color:fi.Y})),(n==null?void 0:n.xyCircleEnable)!==!1&&(this.zCircle=new Nr({direction:"z",color:fi.Z})),n!=null&&n.container&&(n==null?void 0:n.angleTipsEnable)!==!1&&(this.container=n==null?void 0:n.container,this.angleTips=IC({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 Nr extends E.Group{constructor(e){super();f(this,"direction");f(this,"circle");f(this,"ring");f(this,"angleSector");this.direction=e.direction,this.circle=new kC(e),this.ring=new xC(e),this.angleSector=new DC(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 kC extends E.Mesh{constructor(e){var n;super();f(this,"direction");f(this,"gapAngle",.02);f(this,"geometry",new E.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new E.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:E.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}}class xC extends E.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 E.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new E.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:E.DoubleSide}),c=new E.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...o)}}class DC extends E.Mesh{constructor(e){var o;super();f(this,"direction");f(this,"baseAxes");f(this,"angleDirection");switch(e.direction){case"x":this.baseAxes=new E.Vector3(0,0,1);break;case"y":this.baseAxes=new E.Vector3(1,0,0);break;case"z":this.baseAxes=new E.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new E.CircleGeometry(n,48,0,1e-4),this.material=new E.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:E.DoubleSide}),this.direction=e.direction,this.angleDirection=this.direction==="z"?1:-1}}function MC(){const i=xn({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=xn({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=xn({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:un({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:un({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:un({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:un({cursor:"ew-resize",right:n})},l={direction:"nesw",element:un({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:un({cursor:"ns-resize",top:n})},d={direction:"nwse",element:un({cursor:"nwse-resize",left:n,top:n})},h={direction:"ew",element:un({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 un(i){const t=xn(N({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=xn({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=xn({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 SC extends AC{constructor(e,n,o,s){super(e);f(this,"points",[]);f(this,"cornerPositions",[]);f(this,"css3DInstance");f(this,"plane");f(this,"css3DRenderer",new Rn);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 E.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new E.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 E.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}=MC();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 mu(i){const t=new E.Box3,e=new E.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 LC extends gC{constructor(e){super(e);f(this,"box");f(this,"outline");f(this,"originObject");f(this,"positionAttribute");this.originObject=e,this.positionAttribute=new E.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=mu(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 E.BufferGeometry;n.setIndex(new E.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new E.LineBasicMaterial({color:64767,linewidth:1,opacity:1,depthTest:!1,transparent:!0,toneMapped:!1}),s=new E.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 E.BufferGeometry;n.setIndex(new E.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new E.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new E.Mesh(n,o)}}class Xi{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 Bn,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 Se(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 E.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),o=new E.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(Gn),s=[];for(const r of o)if(r instanceof E.Mesh||r instanceof E.Group){const a=r instanceof E.Group?r.children.filter(u=>u instanceof E.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 E.Vector3(0,0,0);if(!t)return o;const s=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=mu(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 TC extends Xi{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 E.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new E.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new E.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 E.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=Gr(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 E.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new E.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 Yi{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 Hr="Object3DHelper@v1.0.1",zC=()=>{console.error(`${Hr} is disposed`)},jC=()=>{console.warn(`${Hr} is disabled`)},VC=()=>{console.error(`${Hr} is disabled`)};class _C{constructor(t){f(this,"controllers",{});f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"hooks",new Bn);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 zC();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return VC();const n=N({},this.state);this.state=N(N({},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=N(N({},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&&jC()}}function Xr(i){return i*Math.PI/180}class OC extends Xi{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 E.Euler(Xr(n),Xr(o),Xr(s)),a=new E.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:d}=this;hu(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 E.Vector3(1,0,0).applyQuaternion(this.originObject3D.quaternion);if(o==="y")return new E.Vector3(0,1,0).applyQuaternion(this.originObject3D.quaternion);if(o==="z")return new E.Vector3(0,0,1).applyQuaternion(this.originObject3D.quaternion)})(),c=new E.Plane().setFromNormalAndCoplanarPoint(l,s),h=c.projectPoint(s.clone(),new E.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=Gr(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 E.Vector3);if(!c)return;const d=this.rotateCenter.clone(),u=o.projectPoint(c.clone(),new E.Vector3).clone().sub(d);if(n.angleTo(u)===0)return;const m=new E.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize()),v=l.quaternion.clone().premultiply(m);if(this.hooks.emit("wantToRotate",v))return;const b=new E.Euler().setFromQuaternion(new E.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(Tl(this.startInfo.angle)),d){const y=new E.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 E.Mesh&&o.geometry instanceof E.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new E.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 E.Mesh&&r.geometry instanceof E.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new E.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 BC extends Xi{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 E.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new O.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=Gr(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 O.Vector3);if(!a||wC(a,this.camera.position))return;const l=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=o,h=new O.Vector3().subVectors(r[1],r[0]),u=new O.Vector3().subVectors(r[3],r[0]),m=G=>{const R=new O.Vector3(0,0,0);if(!this.startInfo)return R;const F=(G==="ew"?h:u).clone(),Q=c.clone().projectOnVector(F),W=a.clone().projectOnVector(F),q=l.clone().projectOnVector(F);if(W.equals(Q))return R;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const ae=new O.Vector3().subVectors(W,q),oe=ae.x<0&&F.x>=0,ye=ae.y<0&&F.y>=0,Ce=ae.z<0&&F.z>=0;this.startInfo.dragPointInCenterBottom=oe||ye||Ce}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const ae=new O.Vector3().subVectors(W,q),oe=ae.x<0&&F.x>=0,ye=ae.y<0&&F.y>=0,Ce=ae.z<0&&F.z>=0;this.startInfo.dragPointInCenterLeft=oe||ye||Ce}const U=new O.Vector3().subVectors(W,Q),Z=U.length();return Z>.3?(console.warn("offset.length() > 0.3, skipped",Z),R):U},v=m("ew"),g=m("ns"),A=()=>{const G=v;this.helperObject3D.cornerPositions.forEach((R,F)=>{var Q;(Q=this.startInfo)!=null&&Q.dragPointInCenterLeft?(F===0||F===3)&&R.add(G):(F===1||F===2)&&R.add(G)})},b=()=>{const G=g;this.helperObject3D.cornerPositions.forEach((R,F)=>{var Q;(Q=this.startInfo)!=null&&Q.dragPointInCenterBottom?(F===0||F===1)&&R.add(G):(F===2||F===3)&&R.add(G)})};switch(d){case"ew":A();break;case"ns":b();break;case"nesw":case"nwse":A(),b()}const y=new O.Vector3().subVectors(r[1],r[0]).length()/h.length(),C=new O.Vector3().subVectors(r[3],r[0]).length()/u.length(),k=new O.Vector3(y,C,1),S=new E.Matrix4().scale(k);n.isCSS3DObjectPlus?n.applyScaleMatrix4(S):n.scale.applyMatrix4(S),o.position.copy(a);const I=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),T=new O.Vector3().subVectors(I,l),D=new E.Matrix4().setPosition(T);n.applyMatrix4(D),(X=this.helperObject3D.css3DInstance)==null||X.css3DObject.applyMatrix4(D),(J=this.helperObject3D.plane)==null||J.applyMatrix4(D),this.hooks.emit("applyObjectScale",{matrix:S}),this.hooks.emit("applyObjectPosition",{matrix:D}),this.render()}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render())}}class QC extends BC{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 RC extends Xi{constructor(...e){super(...e);f(this,"name","BoundingBoxController")}}class GC extends uu{constructor(t){super(t)}}class FC extends Xi{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 E.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 Yr="Object3DHelperPlugin",ms=Yr,WC=()=>{console.error(`${ms} is disposed`)},NC=()=>{console.warn(`${ms} is disabled`)},HC=()=>{console.error(`${ms} is disabled`)};class pu extends zi{constructor(e){super(e);f(this,"name",Yr);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 Rn(this.five.scene),console.warn("Object3DHelper: 使用此插件,需要在初始化five时,设置five参数: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${Yr.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 WC();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return HC();const o=N({},this.state);this.state=N(N({},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 _C,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 ve.Subscribe;if(l){const v=new PC(e),g=this.getConfig(n.moveHelper),A=new Yi(this.five,TC,e,v,g,u);o.addControllers({moveController:A.helperController}),s.push(()=>A.dispose())}if(c){const v=this.getConfig(n.rotateHelper),g=new EC(e,N({container:r},v)),A=new Yi(this.five,OC,e,g,v,u);o.addControllers({rotateController:A.helperController}),s.push(()=>A.dispose())}if(h){const v=new LC(e),g=new Yi(this.five,RC,e,v,void 0,u);o.addControllers({boundingBoxController:g.helperController})}if(d)if(e.isCSS3DObjectPlus&&r){const v=new SC(e,r,a,this.five.scene),g=new Yi(this.five,QC,e,v,void 0,u);o.addControllers({scaleController:g.helperController}),s.push(()=>g.dispose()),Na(this.five).then(()=>{var A,b;if(e.isCSS3DObjectPlus){const y=e;if(!y||y.mode!=="front")return;const C=(A=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?A:Ha(this.five);C&&(this.css3DObjectParentMap.set(y,y.parent),y.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(C),(b=this.css3DRender.getBehindCSS3DObjectGroup())==null||b.add(y),this.css3DRender.render(this.five.camera))}})}else{const v=new GC(e),g=new Yi(this.five,FC,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&&NC()}getConfig(e){if(e&&typeof e!="boolean"&&e.enable)return e}}const XC=i=>new pu(i),YC=`
668
+ `;class Or{constructor(t,e){f(this,"startTagContainer");f(this,"endTagContainer");f(this,"mesh");f(this,"five");f(this,"mode");f(this,"path",[]);f(this,"_panoGroup",null);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 bo({progress:0}).to({progress:1}).duration(1500).repeat(1/0));f(this,"flickerAnime",yo(300).yoyo(!0).repeat(5));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"?Vs(t):Xa(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&&Br(this.startTagContainer.tag)&&((o=this.startTagContainer.app)==null||o.$set(Pe(N({},this.startTagContainer.tag.data),{opacity:n}))),this.endTagContainer.tag&&Br(this.endTagContainer.tag)&&((s=this.endTagContainer.app)==null||s.$set(Pe(N({},this.endTagContainer.tag.data),{opacity:n})))});f(this,"logWarning",t=>Z0("GuideLineModeItem: ",t));f(this,"logError",t=>rd("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 ds(this.five)},this.endTagContainer={tag:null,plugin:new ds(this.five)};const n=new E.BufferGeometry,o=new E.ShaderMaterial({vertexShader:KP,fragmentShader:$P,transparent:!0,uniforms:{map:{value:null},useMapColor:{value:0},mapColor:{value:new E.Color},mapOpacity:{value:1},backgroundColor:{value:new E.Color},backgroundOpacity:{value:0},borderColor:{value:new E.Color},borderOpacity:{value:0},opacity:{value:1},flicker:{value:1},maxU:{value:0},vOffset:{value:0}}});this.mesh=new E.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}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=ZP(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 l,c,d;if(this.disposed)return this.logError("disposed");const n=(l=e==null?void 0:e.scale)!=null?l:this.scale,o=(c=e==null?void 0:e.width)!=null?c:this.width,s=(d=e==null?void 0:e.unit_length)!=null?d:this.unitLength;this.path=t,this.scale=n,this.width=o,this.unitLength=s;const{geometry:r,maxU:a}=gA({path:t,width:o*n,unitLength:s*n,skipPositions:this.skippedPositions});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 E.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 E.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 E.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,ji(t).then(e=>{this.disposed||this.textureUrl===t&&(e.wrapT=E.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()}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,Br(s)&&(n.tag.element=r=>{var l;(l=n.app)==null||l.$destroy();const a=new JP({target:r,intro:!0,props:s.data});return n.app=a,()=>a.$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[N({type:"CatmullRomCurve3",points:s},n)]}}function Br(i){return i.contentType==="Custom"}const eC=Object.freeze(Object.defineProperty({__proto__:null,GuideLineModeItem:Or},Symbol.toStringTag,{value:"Module"}));function iu(i){const t=Math.abs(Math.cos(i.latitude));return new E.Vector3(-Math.sin(i.longitude)*t,-Math.sin(i.latitude),-Math.cos(i.longitude)*t)}function tC(i,t){const e=iu(i),n=iu(t);return e.angleTo(n)}const nC=i=>Y(this,null,function*(){try{i().then(()=>{},()=>{}).catch(()=>{})}catch(t){}}),hs=Math.PI*2;function iC(i){return i>=0&&i<hs?i:(i%hs+hs)%hs}function oC(i){return{longitude:iC(-Math.atan2(i.x,-i.z)),latitude:-Math.asin(i.y/1)}}function sC(i,t,e,n){const o=-i/e,s=i;return o*n+s}function rC(i){return new Promise(t=>{setTimeout(()=>{t()},i)})}const ou="v1.0.6",su="CruisePlugin",us=`${su}@${ou}`,ru=()=>{console.error(`${us} is disposed`)},aC=()=>{console.warn(`${us} is disabled`)},lC=()=>{console.error(`${us} is disabled`)},Qr=new Map;class Hi extends yn{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,{[`__${su}_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 ru();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,C;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]=[...(C=a[k])!=null?C:[],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=du(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(`${us} 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(Pe(N({},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 ru();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return lC();const o=N({},this.state);this.state=N(N({},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),zt(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:lt(),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 Pe(N({id:(c=s.uuid)!=null?c:lt(),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,C;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)!==((C=n[u])==null?void 0:C.floorIndex))return;const g=new E.Vector3().subVectors(v,m);return oC(g.normalize())})();o.moveType===void 0||o.moveType==="justMove"?s.push({moveIndex:d,stay:o.stay,data:N({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:N({effect:"Rotate",panoIndex:c},h)}))}),{keyframesId:lt(),keyframes:s.map((c,d)=>N({id:lt(),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=lt();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 rC(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 tC(h,e)/l}return 800})();r.currentPlayKeyframe&&(r.currentPlayKeyframe.originDuration=c);const d=this.getSpeededDuration(c);return new Promise(h=>{nC(()=>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 Qr.get((n=this.data)==null?void 0:n.keyframesId)}setPauseData(){var e,n,o,s;if((e=this.data)!=null&&e.keyframesId)return Qr.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 Qr.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&&aC()}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-sC(1,n.startVelocity,n.duration,o)})}setFiveOriginUpdateCamera(){this.privateState.fiveOriginGetProgress&&(this.five.controller.cameraMotion.getProgress=this.privateState.fiveOriginGetProgress)}}f(Hi,"PluginVersion",ou);const cC=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),dC=i=>new Hi(i);class au{constructor(t){f(this,"id");f(this,"renderID");f(this,"isGuideLine",!0);f(this,"panoramaItem");f(this,"modelItem");f(this,"hooks",new ve.Subscribe);f(this,"_visible",!0);f(this,"plugin");f(this,"five");f(this,"logError",t=>rd("GuideLineItem: ",t));this.id=t.id,this.five=t.five,this.plugin=t.plugin,this.panoramaItem=new Or(this.five,{mode:"panorama",plugin:this.plugin,parent:this}),this.modelItem=new Or(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,N({skipPanoGroup:c},r))}else e.path&&n.setGeometryByPath(s,r);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=N({panoIndexList:this.panoramaItem.panoGroup},t);this.hooks.emit("walkStart",{userAction:!0});const[n]=yield ti(hC(this.five,e));if(this.hooks.emit("walkEnded",{userAction:!0}),n)return this.logError(n.message)})}}function hC(i,t){return Y(this,null,function*(){if(t.panoIndexList.length===0)return;const e=i.getCurrentState();e.mode!=="Panorama"&&(yield ir(i,["Panorama",{longitude:e.longitude,latitude:0,panoIndex:t.panoIndexList[0]}]));const n=new Hi(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 uC=Object.freeze(Object.defineProperty({__proto__:null,GuideLineItem:au},Symbol.toStringTag,{value:"Module"})),lu="v1.1.0",Rr="GuideLinePlugin",cu=`${Rr}@${lu}`;class fC extends yn{constructor(e,n){super(e,n);f(this,"version",lu);f(this,"name",Rr);f(this,"cruisePlugin");f(this,"itemMap",new Map);f(this,"heightOffset",0);f(this,"state",{visible:!1,enabled:!0});f(this,"data");f(this,"_disposed",!1);f(this,"disposedErrorLog",()=>{console.error(`${cu} is disposed`)});this.cruisePlugin=new Hi(e,{useGuideLine:!1}),Object.assign(window,{[`__${Rr}_DEBUG__`]:this})}get disposed(){return this._disposed}load(e,n,o=!0){return Y(this,null,function*(){var u,m,v,g,A,b,y;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,l={panorama_style:{visible:!1,unit_length:(u=a==null?void 0:a.unitHeight)!=null?u:.4,width:(m=a==null?void 0:a.unitWidth)!=null?m:.6,texture:{url:(v=a==null?void 0:a.arrowTextureUrl)!=null?v:this.staticPrefix+"/release/web/arrow6.b6ce0c62.png"}}},c=(A=(g=r.routes)==null?void 0:g.map(C=>{var k;return Ye({},l,{id:(k=C.id)!=null?k:Date.now(),pano_group:C.panoIndexList})}))!=null?A:[],d=(y=(b=r.lines)==null?void 0:b.map(C=>Ye({},l,C)))!=null?y:[],h=[...c,...d];yield this.waitFiveLoaded(),this.clear(),h.forEach(C=>{this.addGuideLineItem(C)}),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(`${cu} 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=N({},this.state);this.state=N(N({},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),zt(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 au({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 E.Vector3().fromArray(r).distanceTo(new E.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 du=(i,t)=>new fC(i,t);function hu(i,t,e){if(e){const o=new E.Vector3().subVectors(i.position,e).applyQuaternion(i.quaternion.clone().inverse()).applyQuaternion(t).add(e);i.position.copy(o)}i.quaternion.copy(t)}class mC extends O.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 fs extends mC{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){hu(this,e,n)}applyHelperQuaternion(e,n){if(n){const o=new O.Vector3().subVectors(this.position,n).applyQuaternion(e).add(n);this.position.copy(o)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}}class pC extends fs{}class gC extends fs{}class vC extends fs{}class uu extends fs{}class AC extends uu{}class bC extends E.Group{constructor(e){super();f(this,"direction");this.direction=e||"x"}}class fu extends E.Mesh{constructor(e,n,o){super(e,n);f(this,"direction");this.direction=o||"x"}}function yC(i,t){const{offsetWidth:e,offsetHeight:n}=t,{top:o,left:s}=t.getBoundingClientRect();return Object.assign(new E.Vector2,{x:(i.x-s)/e*2-1,y:-(i.y-o)/n*2+1})}function Gr(i,t,e){if(!t||!e||!i)return;const n=yC(t,e);if(Math.abs(n.x)===1||Math.abs(n.y)===1)return;const o=new E.Raycaster;return o.setFromCamera(n,i),o}function wC(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 Fr extends bC{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 E.Color((d=e.color)!=null?d:16214315),o=new E.MeshBasicMaterial({color:n,depthTest:!1,opacity:1,transparent:!0,side:E.DoubleSide}),s=new E.ConeGeometry(.04,.1,32),r=new fu(s,o.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,l=new E.CylinderGeometry(a,a,.4,32),c=new fu(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 Wr={X:15618642,Y:4765519,Z:4227839};class fi{static get X(){return new E.Color(Wr.X).convertSRGBToLinear().clone()}static get Y(){return new E.Color(Wr.Y).convertSRGBToLinear().clone()}static get Z(){return new E.Color(Wr.Z).convertSRGBToLinear().clone()}}class PC extends pC{constructor(e){super(e);f(this,"xArrow",new Fr({direction:"x",color:fi.X}));f(this,"yArrow",new Fr({direction:"y",color:fi.Y}));f(this,"zArrow",new Fr({direction:"z",color:fi.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 xn(i,t){return CC(document.createElement(t!=null?t:"div"),i)}function CC(i,t){if(!t)return i;for(const e in t)e&&t[e]&&(i.style[e]=t[e]);return i}function IC(i){const t=xn(N({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 EC extends vC{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 Nr({direction:"x",color:fi.X})),(n==null?void 0:n.xzCircleEnable)!==!1&&(this.yCircle=new Nr({direction:"y",color:fi.Y})),(n==null?void 0:n.xyCircleEnable)!==!1&&(this.zCircle=new Nr({direction:"z",color:fi.Z})),n!=null&&n.container&&(n==null?void 0:n.angleTipsEnable)!==!1&&(this.container=n==null?void 0:n.container,this.angleTips=IC({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 Nr extends E.Group{constructor(e){super();f(this,"direction");f(this,"circle");f(this,"ring");f(this,"angleSector");this.direction=e.direction,this.circle=new kC(e),this.ring=new xC(e),this.angleSector=new DC(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 kC extends E.Mesh{constructor(e){var n;super();f(this,"direction");f(this,"gapAngle",.02);f(this,"geometry",new E.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new E.MeshBasicMaterial({opacity:.6,color:(n=e.color)!=null?n:16777215,transparent:!0,side:E.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}}class xC extends E.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 E.RingGeometry(.25,.3,20,8,Math.PI/4*r+n,Math.PI/4-n*2),l=new E.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:E.DoubleSide}),c=new E.Mesh(a,l);return c.name=`AxesDashedRing-${this.direction}-${r}`,c});this.add(...o)}}class DC extends E.Mesh{constructor(e){var o;super();f(this,"direction");f(this,"baseAxes");f(this,"angleDirection");switch(e.direction){case"x":this.baseAxes=new E.Vector3(0,0,1);break;case"y":this.baseAxes=new E.Vector3(1,0,0);break;case"z":this.baseAxes=new E.Vector3(1,0,0);break}const n=.3+5e-4;this.geometry=new E.CircleGeometry(n,48,0,1e-4),this.material=new E.MeshBasicMaterial({opacity:.4,color:(o=e.color)!=null?o:16777215,depthTest:!1,transparent:!0,side:E.DoubleSide}),this.direction=e.direction,this.angleDirection=this.direction==="z"?1:-1}}function MC(){const i=xn({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),t=xn({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=xn({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:un({cursor:"nesw-resize",left:n,bottom:n})},s={direction:"ns",element:un({cursor:"ns-resize",bottom:n})},r={direction:"nwse",element:un({cursor:"nwse-resize",right:n,bottom:n})},a={direction:"ew",element:un({cursor:"ew-resize",right:n})},l={direction:"nesw",element:un({cursor:"nesw-resize",right:n,top:n})},c={direction:"ns",element:un({cursor:"ns-resize",top:n})},d={direction:"nwse",element:un({cursor:"nwse-resize",left:n,top:n})},h={direction:"ew",element:un({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 un(i){const t=xn(N({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},i)),e=xn({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),n=xn({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 SC extends AC{constructor(e,n,o,s){super(e);f(this,"points",[]);f(this,"cornerPositions",[]);f(this,"css3DInstance");f(this,"plane");f(this,"css3DRenderer",new Rn);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 E.Vector3().subVectors(o.position,n).applyQuaternion(e).add(n);o.position.copy(r),o.applyQuaternion(e)}if(this.plane){const r=new E.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 E.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}=MC();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 mu(i){const t=new E.Box3,e=new E.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 LC extends gC{constructor(e){super(e);f(this,"box");f(this,"outline");f(this,"originObject");f(this,"positionAttribute");this.originObject=e,this.positionAttribute=new E.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=mu(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 E.BufferGeometry;n.setIndex(new E.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new E.LineBasicMaterial({color:64767,linewidth:1,opacity:1,depthTest:!1,transparent:!0,toneMapped:!1}),s=new E.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 E.BufferGeometry;n.setIndex(new E.BufferAttribute(e,1)),n.setAttribute("position",this.positionAttribute);const o=new E.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new E.Mesh(n,o)}}class Xi{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 Bn,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 Se(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 E.Vector3().subVectors(this.boundingBox.max,e).multiply(t).add(e),o=new E.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(Gn),s=[];for(const r of o)if(r instanceof E.Mesh||r instanceof E.Group){const a=r instanceof E.Group?r.children.filter(u=>u instanceof E.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 E.Vector3(0,0,0);if(!t)return o;const s=()=>e||(this.boundingBox?this.boundingBox:(this.boundingBox=mu(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 TC extends Xi{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 E.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new E.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new E.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 E.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=Gr(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 E.Vector3);if(!a)return;const l=a.clone().projectOnVector(o),c=l.clone().sub(s),d=new E.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 Yi{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 Hr="Object3DHelper@v1.0.1",zC=()=>{console.error(`${Hr} is disposed`)},jC=()=>{console.warn(`${Hr} is disabled`)},VC=()=>{console.error(`${Hr} is disabled`)};class _C{constructor(t){f(this,"controllers",{});f(this,"state",{visible:!0,enabled:!0,disposed:!1});f(this,"hooks",new Bn);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 zC();if(!this.state.enabled&&t.enabled!==!0&&t.disposed!==!0)return VC();const n=N({},this.state);this.state=N(N({},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=N(N({},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&&jC()}}function Xr(i){return i*Math.PI/180}class OC extends Xi{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 E.Euler(Xr(n),Xr(o),Xr(s)),a=new E.Quaternion().setFromEuler(r);if(this.hooks.emit("wantToRotate",a))return;const{originObject3D:c,rotateCenter:d}=this;hu(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 E.Vector3(1,0,0).applyQuaternion(this.originObject3D.quaternion);if(o==="y")return new E.Vector3(0,1,0).applyQuaternion(this.originObject3D.quaternion);if(o==="z")return new E.Vector3(0,0,1).applyQuaternion(this.originObject3D.quaternion)})(),c=new E.Plane().setFromNormalAndCoplanarPoint(l,s),h=c.projectPoint(s.clone(),new E.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=Gr(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 E.Vector3);if(!c)return;const d=this.rotateCenter.clone(),u=o.projectPoint(c.clone(),new E.Vector3).clone().sub(d);if(n.angleTo(u)===0)return;const m=new E.Quaternion().setFromUnitVectors(n.clone().normalize(),u.clone().normalize()),v=l.quaternion.clone().premultiply(m);if(this.hooks.emit("wantToRotate",v))return;const b=new E.Euler().setFromQuaternion(new E.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(Tl(this.startInfo.angle)),d){const y=new E.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 E.Mesh&&o.geometry instanceof E.CircleGeometry){const{radius:s,segments:r,thetaLength:a}=o.geometry.parameters;o.geometry=new E.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 E.Mesh&&r.geometry instanceof E.CircleGeometry){const{radius:a,thetaStart:l}=r.geometry.parameters,c=Math.ceil(Math.abs(s)*(40/(2*Math.PI)));r.geometry=new E.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 BC extends Xi{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 E.Plane,n=this.helperObject3D.cornerPositions;if(n.length!==0)return n.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new O.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=Gr(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 O.Vector3);if(!a||wC(a,this.camera.position))return;const l=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:c,direction:d}=o,h=new O.Vector3().subVectors(r[1],r[0]),u=new O.Vector3().subVectors(r[3],r[0]),m=G=>{const R=new O.Vector3(0,0,0);if(!this.startInfo)return R;const F=(G==="ew"?h:u).clone(),Q=c.clone().projectOnVector(F),W=a.clone().projectOnVector(F),q=l.clone().projectOnVector(F);if(W.equals(Q))return R;if(G==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const ae=new O.Vector3().subVectors(W,q),oe=ae.x<0&&F.x>=0,ye=ae.y<0&&F.y>=0,Ce=ae.z<0&&F.z>=0;this.startInfo.dragPointInCenterBottom=oe||ye||Ce}if(G==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const ae=new O.Vector3().subVectors(W,q),oe=ae.x<0&&F.x>=0,ye=ae.y<0&&F.y>=0,Ce=ae.z<0&&F.z>=0;this.startInfo.dragPointInCenterLeft=oe||ye||Ce}const U=new O.Vector3().subVectors(W,Q),Z=U.length();return Z>.3?(console.warn("offset.length() > 0.3, skipped",Z),R):U},v=m("ew"),g=m("ns"),A=()=>{const G=v;this.helperObject3D.cornerPositions.forEach((R,F)=>{var Q;(Q=this.startInfo)!=null&&Q.dragPointInCenterLeft?(F===0||F===3)&&R.add(G):(F===1||F===2)&&R.add(G)})},b=()=>{const G=g;this.helperObject3D.cornerPositions.forEach((R,F)=>{var Q;(Q=this.startInfo)!=null&&Q.dragPointInCenterBottom?(F===0||F===1)&&R.add(G):(F===2||F===3)&&R.add(G)})};switch(d){case"ew":A();break;case"ns":b();break;case"nesw":case"nwse":A(),b()}const y=new O.Vector3().subVectors(r[1],r[0]).length()/h.length(),C=new O.Vector3().subVectors(r[3],r[0]).length()/u.length(),k=new O.Vector3(y,C,1),S=new E.Matrix4().scale(k);n.isCSS3DObjectPlus?n.applyScaleMatrix4(S):n.scale.applyMatrix4(S),o.position.copy(a);const I=new O.Vector3().addVectors(r[0],r[2]).divideScalar(2),T=new O.Vector3().subVectors(I,l),D=new E.Matrix4().setPosition(T);n.applyMatrix4(D),(X=this.helperObject3D.css3DInstance)==null||X.css3DObject.applyMatrix4(D),(J=this.helperObject3D.plane)==null||J.applyMatrix4(D),this.hooks.emit("applyObjectScale",{matrix:S}),this.hooks.emit("applyObjectPosition",{matrix:D}),this.render()}dragEnd(){this.isDragging&&(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render())}}class QC extends BC{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 RC extends Xi{constructor(...e){super(...e);f(this,"name","BoundingBoxController")}}class GC extends uu{constructor(t){super(t)}}class FC extends Xi{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 E.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 Yr="Object3DHelperPlugin",ms=Yr,WC=()=>{console.error(`${ms} is disposed`)},NC=()=>{console.warn(`${ms} is disabled`)},HC=()=>{console.error(`${ms} is disabled`)};class pu extends zi{constructor(e){super(e);f(this,"name",Yr);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 Rn(this.five.scene),console.warn("Object3DHelper: 使用此插件,需要在初始化five时,设置five参数: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${Yr.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 WC();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return HC();const o=N({},this.state);this.state=N(N({},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 _C,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 ve.Subscribe;if(l){const v=new PC(e),g=this.getConfig(n.moveHelper),A=new Yi(this.five,TC,e,v,g,u);o.addControllers({moveController:A.helperController}),s.push(()=>A.dispose())}if(c){const v=this.getConfig(n.rotateHelper),g=new EC(e,N({container:r},v)),A=new Yi(this.five,OC,e,g,v,u);o.addControllers({rotateController:A.helperController}),s.push(()=>A.dispose())}if(h){const v=new LC(e),g=new Yi(this.five,RC,e,v,void 0,u);o.addControllers({boundingBoxController:g.helperController})}if(d)if(e.isCSS3DObjectPlus&&r){const v=new SC(e,r,a,this.five.scene),g=new Yi(this.five,QC,e,v,void 0,u);o.addControllers({scaleController:g.helperController}),s.push(()=>g.dispose()),Na(this.five).then(()=>{var A,b;if(e.isCSS3DObjectPlus){const y=e;if(!y||y.mode!=="front")return;const C=(A=this.css3DRender.behindModeCSS3DRenderer.wrapper)!=null?A:Ha(this.five);C&&(this.css3DObjectParentMap.set(y,y.parent),y.removeFromParent(),this.css3DRender.behindModeCSS3DRenderer.setWrapper(C),(b=this.css3DRender.getBehindCSS3DObjectGroup())==null||b.add(y),this.css3DRender.render(this.five.camera))}})}else{const v=new GC(e),g=new Yi(this.five,FC,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&&NC()}getConfig(e){if(e&&typeof e!="boolean"&&e.enable)return e}}const XC=i=>new pu(i),YC=`
669
669
  varying vec2 vUv;
670
670
  void main() {
671
671
  vUv = uv;