@realsee/dnalogel 2.3.9-alpha.5 → 2.3.9-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/PanoTagPlugin/typings/controller.d.ts +2 -0
  2. package/dist/PanoTagPlugin/utils/audio/SharedAudio.d.ts +16 -0
  3. package/dist/index.cjs.js +31 -31
  4. package/dist/index.js +3156 -3103
  5. package/dist/index.umd.js +31 -31
  6. package/dist/shared-utils/audio.d.ts +16 -4
  7. package/docs/classes/CSS3DRender.html +31 -31
  8. package/docs/classes/CruisePluginController.html +24 -24
  9. package/docs/classes/Magnifier.html +16 -16
  10. package/docs/classes/ModelRoomLabelController.html +11 -11
  11. package/docs/classes/Object3DHelperController.html +24 -24
  12. package/docs/classes/PaintBrush.html +15 -15
  13. package/docs/classes/PanoTagPluginController.html +41 -41
  14. package/docs/classes/Util.BetterTween.html +8 -8
  15. package/docs/classes/Util.FivePointSelector.html +12 -12
  16. package/docs/classes/Util.Interval.html +12 -12
  17. package/docs/classes/Util.Magnifier.html +17 -17
  18. package/docs/classes/Util.PointDomHelper.html +11 -11
  19. package/docs/classes/Util.PointHelper.html +11 -11
  20. package/docs/classes/Util.Rectangle.html +13 -13
  21. package/docs/enums/CameraMovementEffect.html +7 -7
  22. package/docs/enums/ContentType.html +16 -16
  23. package/docs/enums/DIRECTION.html +9 -9
  24. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  25. package/docs/enums/DimensionType.html +7 -7
  26. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  27. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  28. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  29. package/docs/enums/PointType.html +7 -7
  30. package/docs/enums/Rotation.html +8 -8
  31. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  32. package/docs/functions/CameraMovementPlugin.html +4 -4
  33. package/docs/functions/CruisePlugin.html +4 -4
  34. package/docs/functions/GuideLinePlugin.html +5 -5
  35. package/docs/functions/ItemLabelPlugin.html +4 -4
  36. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  37. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  38. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  39. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  40. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  41. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  42. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  43. package/docs/functions/ModelViewPlugin.html +4 -4
  44. package/docs/functions/Object3DHelperPlugin.html +4 -4
  45. package/docs/functions/PanoCompassPlugin.html +4 -4
  46. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  47. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  48. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  49. package/docs/functions/PanoMeasurePlugin.html +4 -4
  50. package/docs/functions/PanoRulerPlugin.html +4 -4
  51. package/docs/functions/PanoRulerProPlugin.html +4 -4
  52. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  53. package/docs/functions/PanoTagPlugin.html +4 -4
  54. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  55. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  56. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  57. package/docs/functions/Util.getFrameTime.html +5 -5
  58. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  59. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  60. package/docs/functions/Util.isNil.html +5 -5
  61. package/docs/functions/Util.nextFrame.html +5 -5
  62. package/docs/functions/Util.notNil.html +5 -5
  63. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  64. package/docs/functions/Util.tweenProgress.html +5 -5
  65. package/docs/functions/pluginFlag.html +5 -5
  66. package/docs/index.html +4 -4
  67. package/docs/interfaces/AddTagConfig.html +6 -6
  68. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  69. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  70. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  71. package/docs/interfaces/EventMap.html +15 -15
  72. package/docs/interfaces/FloorplanBounding.html +8 -8
  73. package/docs/interfaces/FloorplanData.html +10 -10
  74. package/docs/interfaces/FloorplanEntrance.html +11 -11
  75. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  76. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  77. package/docs/interfaces/FloorplanFloorData.html +9 -9
  78. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  79. package/docs/interfaces/FloorplanObserver.html +9 -9
  80. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  81. package/docs/interfaces/FloorplanPosition.html +7 -7
  82. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  83. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  84. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  85. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  86. package/docs/interfaces/FloorplanServerData.html +7 -7
  87. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  88. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  89. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  90. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  91. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  92. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  93. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  94. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  95. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  96. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  97. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  98. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  99. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  100. package/docs/interfaces/LineJson.html +7 -7
  101. package/docs/interfaces/MinMax.html +7 -7
  102. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  103. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  104. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  105. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  106. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  107. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  108. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  109. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  110. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  111. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  112. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  113. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  114. package/docs/interfaces/ModelViewPluginExportType.html +11 -11
  115. package/docs/interfaces/Object3DHelperState.html +8 -8
  116. package/docs/interfaces/OpenParameter.html +7 -7
  117. package/docs/interfaces/PaintBrushAction.html +12 -12
  118. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  119. package/docs/interfaces/PaintBrushState.html +10 -10
  120. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  121. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  122. package/docs/interfaces/PanoMeasureParameterType.html +11 -11
  123. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  124. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  125. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  126. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  127. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  128. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  129. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  130. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  131. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  132. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  133. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  134. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  135. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  136. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  137. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  138. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  139. package/docs/interfaces/Point.html +8 -8
  140. package/docs/interfaces/PointJson.html +8 -8
  141. package/docs/interfaces/Room.html +9 -9
  142. package/docs/interfaces/RoomInfo.html +7 -7
  143. package/docs/interfaces/RoomLabel.html +14 -14
  144. package/docs/interfaces/RoomRules.html +5 -5
  145. package/docs/interfaces/Rooms.html +5 -5
  146. package/docs/interfaces/Scissor.html +9 -9
  147. package/docs/interfaces/State.html +8 -8
  148. package/docs/interfaces/TagCache.html +10 -10
  149. package/docs/interfaces/TagConfig.html +10 -10
  150. package/docs/interfaces/TagIconUrl.html +9 -9
  151. package/docs/interfaces/Tags.html +9 -9
  152. package/docs/interfaces/TemporaryState.html +6 -6
  153. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  154. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  155. package/docs/modules/Util.html +5 -5
  156. package/docs/modules.html +4 -4
  157. package/docs/types/ArrayPosition.html +5 -5
  158. package/docs/types/AudioAppearance.html +5 -5
  159. package/docs/types/AudioTagTypeConfigKey.html +5 -5
  160. package/docs/types/CSS3DRenderExportType.html +5 -5
  161. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  162. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  163. package/docs/types/Color.html +5 -5
  164. package/docs/types/ContentTypeConfigKey.html +5 -5
  165. package/docs/types/ContentTypeConfigKeySplit.html +5 -5
  166. package/docs/types/ContentTypeMap.html +5 -5
  167. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  168. package/docs/types/Create3DElementReturnType.html +5 -5
  169. package/docs/types/CruisePluginExportType.html +5 -5
  170. package/docs/types/Direction-1.html +5 -5
  171. package/docs/types/Direction4.html +5 -5
  172. package/docs/types/FloorplanRuleLabels.html +5 -5
  173. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  174. package/docs/types/GuideLinePluginExportType.html +5 -5
  175. package/docs/types/HelperEventMap.html +5 -5
  176. package/docs/types/LoadTagConfig.html +5 -5
  177. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  178. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  179. package/docs/types/MediaData.html +5 -5
  180. package/docs/types/MediaStore.html +5 -5
  181. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  182. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  183. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  184. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  185. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  186. package/docs/types/MoveArgs.html +5 -5
  187. package/docs/types/MoveOpts.html +5 -5
  188. package/docs/types/Object3DHelperEventMap.html +5 -5
  189. package/docs/types/ObjectFit.html +5 -5
  190. package/docs/types/PaintBrushEventMap.html +5 -5
  191. package/docs/types/PanoCompassPluginData.html +5 -5
  192. package/docs/types/PanoCompassPluginExportType.html +5 -5
  193. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  194. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  195. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  196. package/docs/types/PanoIndex.html +5 -5
  197. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  198. package/docs/types/PanoMeasureReturnType.html +5 -5
  199. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  200. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  201. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  202. package/docs/types/PlaneTag.html +5 -5
  203. package/docs/types/PlaneTagElement.html +5 -5
  204. package/docs/types/Point2DElement.html +5 -5
  205. package/docs/types/Point2DTag.html +5 -5
  206. package/docs/types/Point3DElement.html +5 -5
  207. package/docs/types/Point3DTag.html +5 -5
  208. package/docs/types/PointTag.html +5 -5
  209. package/docs/types/PointTagElement.html +5 -5
  210. package/docs/types/Position.html +5 -5
  211. package/docs/types/RotateArgs.html +5 -5
  212. package/docs/types/RotateOpts.html +5 -5
  213. package/docs/types/RuleLabelsKey.html +5 -5
  214. package/docs/types/RuleLabelsValue.html +5 -5
  215. package/docs/types/StickType.html +5 -5
  216. package/docs/types/Tag.html +5 -5
  217. package/docs/types/Tag2D.html +5 -5
  218. package/docs/types/Tag3D.html +5 -5
  219. package/docs/types/TagContentType.html +5 -5
  220. package/docs/types/TagDimensionType.html +5 -5
  221. package/docs/types/TagElement.html +6 -6
  222. package/docs/types/TagEvents.html +5 -5
  223. package/docs/types/TagHooks.html +5 -5
  224. package/docs/types/TagIconSize.html +5 -5
  225. package/docs/types/TagId.html +5 -5
  226. package/docs/types/TagPointType.html +5 -5
  227. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  228. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  229. package/docs/types/WorkCode.html +5 -5
  230. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  231. package/docs/variables/PLUGIN.html +5 -5
  232. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  233. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  234. package/docs/variables/VERSION.html +5 -5
  235. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  236. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  237. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  238. package/libs/PanoTagPlugin/Components/Common/Audio.js +88 -129
  239. package/libs/PanoTagPlugin/Components/Common/Icon/Icon.js +95 -72
  240. package/libs/PanoTagPlugin/Components/Common/Shadow.js +1 -1
  241. package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioPlaneTag.js +131 -153
  242. package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioTag.js +112 -105
  243. package/libs/PanoTagPlugin/Components/Tag/AudioTag/index.js +52 -48
  244. package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +59 -43
  245. package/libs/PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.js +46 -46
  246. package/libs/PanoTagPlugin/Components/Tag/index.js +3 -2
  247. package/libs/PanoTagPlugin/Components/TagContainer.js +3 -2
  248. package/libs/PanoTagPlugin/Components/TagItem.js +3 -2
  249. package/libs/PanoTagPlugin/controller/index.js +40 -39
  250. package/libs/PanoTagPlugin/index.js +12 -11
  251. package/libs/PanoTagPlugin/typings/controller.d.ts +2 -0
  252. package/libs/PanoTagPlugin/utils/audio/SharedAudio.d.ts +16 -0
  253. package/libs/PanoTagPlugin/utils/audio/SharedAudio.js +107 -0
  254. package/libs/index.js +93 -92
  255. package/libs/shared-utils/audio.d.ts +16 -4
  256. package/libs/shared-utils/audio.js +38 -34
  257. package/package.json +1 -1
@@ -1,100 +1,100 @@
1
- import { SvelteComponent as j, init as A, safe_not_equal as B, append_styles as E, empty as F, insert as z, transition_in as u, transition_out as v, check_outros as G, detach as T, create_component as k, space as D, element as w, attr as _, set_style as M, toggle_class as g, mount_component as y, append as h, destroy_component as Y, group_outros as H } from "../../../../vendor/svelte/internal/index.js";
1
+ import { SvelteComponent as j, init as A, safe_not_equal as B, append_styles as E, empty as F, insert as Y, transition_in as u, transition_out as k, check_outros as G, detach as z, create_component as h, space as D, element as _, attr as v, set_style as M, toggle_class as x, mount_component as b, append as g, destroy_component as y, group_outros as H } from "../../../../vendor/svelte/internal/index.js";
2
2
  import I from "../../Common/Line/Straight.js";
3
3
  import N from "../../Common/Text/MText.js";
4
4
  import "../../../../vendor/svelte/transition/index.js";
5
5
  import "../../../../vendor/svelte/easing/index.js";
6
6
  import "../../../../shared-utils/uuid.js";
7
7
  import "../../../utils/px2rem.js";
8
- function J(l) {
9
- E(l, "svelte-1lhi5w1", ".plane__container.svelte-1lhi5w1.svelte-1lhi5w1{position:absolute;left:50%;transform:translate(-50%, -100%);width:-moz-max-content;width:max-content}.plane__wrapper.svelte-1lhi5w1.svelte-1lhi5w1{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-1lhi5w1 .plane__wrapper.svelte-1lhi5w1{transition-delay:200ms, 500ms;opacity:1}.folded.svelte-1lhi5w1 .plane__wrapper.svelte-1lhi5w1{opacity:0}.plane.svelte-1lhi5w1.svelte-1lhi5w1{max-width:11.75rem}.title.svelte-1lhi5w1.svelte-1lhi5w1{white-space:pre-wrap;font-weight:bold;font-size:0.75rem;line-height:1.125rem;margin-bottom:0.25rem}.description.svelte-1lhi5w1.svelte-1lhi5w1{white-space:pre-wrap;font-size:0.6875rem;line-height:1rem}");
8
+ function J(n) {
9
+ E(n, "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}");
10
10
  }
11
- function P(l) {
12
- var x, C;
13
- let n, a, e, i, r, d, s, c, p, f, m;
14
- return n = new I({
11
+ function P(n) {
12
+ var T, C;
13
+ let o, a, e, r, i, d, l, c, p, f, m;
14
+ return o = new I({
15
15
  props: {
16
- unfolded: l[1],
16
+ unfolded: n[1],
17
17
  direction: "vertical",
18
18
  length: 15,
19
19
  duration: 500,
20
20
  inDelay: 200,
21
21
  useLinearColor: !0
22
22
  }
23
- }), s = new N({
23
+ }), l = new N({
24
24
  props: {
25
- text: l[2],
26
- edit: (x = l[0].data.edit) == null ? void 0 : x.title
25
+ text: n[2],
26
+ edit: (T = n[0].data.edit) == null ? void 0 : T.title
27
27
  }
28
28
  }), f = new N({
29
29
  props: {
30
- text: l[0].data.description,
31
- edit: (C = l[0].data.edit) == null ? void 0 : C.description,
30
+ text: n[0].data.description,
31
+ edit: (C = n[0].data.edit) == null ? void 0 : C.description,
32
32
  maxLine: 3
33
33
  }
34
34
  }), {
35
35
  c() {
36
- k(n.$$.fragment), a = D(), e = w("div"), i = w("div"), r = w("div"), d = w("div"), k(s.$$.fragment), c = D(), p = w("div"), k(f.$$.fragment), _(d, "class", "title svelte-1lhi5w1"), _(p, "class", "description svelte-1lhi5w1"), _(r, "class", "plane svelte-1lhi5w1"), _(i, "class", "plane__wrapper svelte-1lhi5w1"), M(i, "transform", l[1] ? "translateY(-15px)" : "translateY(0)"), _(e, "class", "plane__container svelte-1lhi5w1"), g(e, "unfolded", l[1]), g(e, "folded", l[3]);
36
+ h(o.$$.fragment), a = D(), e = _("div"), r = _("div"), i = _("div"), d = _("div"), h(l.$$.fragment), c = D(), p = _("div"), h(f.$$.fragment), v(d, "class", "title svelte-1oxrkr1"), v(p, "class", "description svelte-1oxrkr1"), v(i, "class", "plane svelte-1oxrkr1"), v(r, "class", "plane__wrapper svelte-1oxrkr1"), M(r, "transform", n[1] ? "translateY(-15px)" : "translateY(0)"), v(e, "class", "plane__container svelte-1oxrkr1"), x(e, "unfolded", n[1]), x(e, "folded", n[3]);
37
37
  },
38
- m(t, o) {
39
- y(n, t, o), z(t, a, o), z(t, e, o), h(e, i), h(i, r), h(r, d), y(s, d, null), h(r, c), h(r, p), y(f, p, null), m = !0;
38
+ m(t, s) {
39
+ b(o, t, s), Y(t, a, s), Y(t, e, s), g(e, r), g(r, i), g(i, d), b(l, d, null), g(i, c), g(i, p), b(f, p, null), m = !0;
40
40
  },
41
- p(t, o) {
41
+ p(t, s) {
42
42
  var S, q;
43
43
  const L = {};
44
- o & 2 && (L.unfolded = t[1]), n.$set(L);
44
+ s & 2 && (L.unfolded = t[1]), o.$set(L);
45
+ const w = {};
46
+ s & 4 && (w.text = t[2]), s & 1 && (w.edit = (S = t[0].data.edit) == null ? void 0 : S.title), l.$set(w);
45
47
  const $ = {};
46
- o & 4 && ($.text = t[2]), o & 1 && ($.edit = (S = t[0].data.edit) == null ? void 0 : S.title), s.$set($);
47
- const b = {};
48
- o & 1 && (b.text = t[0].data.description), o & 1 && (b.edit = (q = t[0].data.edit) == null ? void 0 : q.description), f.$set(b), o & 2 && M(i, "transform", t[1] ? "translateY(-15px)" : "translateY(0)"), (!m || o & 2) && g(e, "unfolded", t[1]), (!m || o & 8) && g(e, "folded", t[3]);
48
+ s & 1 && ($.text = t[0].data.description), s & 1 && ($.edit = (q = t[0].data.edit) == null ? void 0 : q.description), f.$set($), s & 2 && M(r, "transform", t[1] ? "translateY(-15px)" : "translateY(0)"), (!m || s & 2) && x(e, "unfolded", t[1]), (!m || s & 8) && x(e, "folded", t[3]);
49
49
  },
50
50
  i(t) {
51
- m || (u(n.$$.fragment, t), u(s.$$.fragment, t), u(f.$$.fragment, t), m = !0);
51
+ m || (u(o.$$.fragment, t), u(l.$$.fragment, t), u(f.$$.fragment, t), m = !0);
52
52
  },
53
53
  o(t) {
54
- v(n.$$.fragment, t), v(s.$$.fragment, t), v(f.$$.fragment, t), m = !1;
54
+ k(o.$$.fragment, t), k(l.$$.fragment, t), k(f.$$.fragment, t), m = !1;
55
55
  },
56
56
  d(t) {
57
- Y(n, t), t && T(a), t && T(e), Y(s), Y(f);
57
+ y(o, t), t && z(a), t && z(e), y(l), y(f);
58
58
  }
59
59
  };
60
60
  }
61
- function K(l) {
62
- let n, a, e = l[0].state && P(l);
61
+ function K(n) {
62
+ let o, a, e = n[0].state && P(n);
63
63
  return {
64
64
  c() {
65
- e && e.c(), n = F();
65
+ e && e.c(), o = F();
66
66
  },
67
- m(i, r) {
68
- e && e.m(i, r), z(i, n, r), a = !0;
67
+ m(r, i) {
68
+ e && e.m(r, i), Y(r, o, i), a = !0;
69
69
  },
70
- p(i, [r]) {
71
- i[0].state ? e ? (e.p(i, r), r & 1 && u(e, 1)) : (e = P(i), e.c(), u(e, 1), e.m(n.parentNode, n)) : e && (H(), v(e, 1, 1, () => {
70
+ p(r, [i]) {
71
+ r[0].state ? e ? (e.p(r, i), i & 1 && u(e, 1)) : (e = P(r), e.c(), u(e, 1), e.m(o.parentNode, o)) : e && (H(), k(e, 1, 1, () => {
72
72
  e = null;
73
73
  }), G());
74
74
  },
75
- i(i) {
75
+ i(r) {
76
76
  a || (u(e), a = !0);
77
77
  },
78
- o(i) {
79
- v(e), a = !1;
78
+ o(r) {
79
+ k(e), a = !1;
80
80
  },
81
- d(i) {
82
- e && e.d(i), i && T(n);
81
+ d(r) {
82
+ e && e.d(r), r && z(o);
83
83
  }
84
84
  };
85
85
  }
86
- function O(l, n, a) {
87
- let e, i, r, { tag: d } = n;
88
- return l.$$set = (s) => {
89
- "tag" in s && a(0, d = s.tag);
90
- }, l.$$.update = () => {
91
- var s, c, p;
92
- l.$$.dirty & 1 && a(1, e = !!((s = d.state) != null && s.unfolded)), l.$$.dirty & 2 && a(3, i = !e), l.$$.dirty & 1 && a(2, r = (p = (c = d.data.title) != null ? c : d.data.text) != null ? p : "");
93
- }, [d, e, r, i];
86
+ function O(n, o, a) {
87
+ let e, r, i, { tag: d } = o;
88
+ return n.$$set = (l) => {
89
+ "tag" in l && a(0, d = l.tag);
90
+ }, n.$$.update = () => {
91
+ var l, c, p;
92
+ n.$$.dirty & 1 && a(1, e = !!((l = d.state) != null && l.unfolded)), n.$$.dirty & 2 && a(3, r = !e), n.$$.dirty & 1 && a(2, i = (p = (c = d.data.title) != null ? c : d.data.text) != null ? p : "");
93
+ }, [d, e, i, r];
94
94
  }
95
95
  class ee extends j {
96
- constructor(n) {
97
- super(), A(this, n, O, K, B, { tag: 0 }, J);
96
+ constructor(o) {
97
+ super(), A(this, o, O, K, B, { tag: 0 }, J);
98
98
  }
99
99
  }
100
100
  export {
@@ -62,6 +62,7 @@ import "../../../shared-utils/animationFrame/index.js";
62
62
  import "./AudioTag/AudioTag.js";
63
63
  import "../Common/Audio.js";
64
64
  import "../../../shared-utils/audio.js";
65
+ import "../../utils/audio/SharedAudio.js";
65
66
  import "../Common/Icon/audioIcon.js";
66
67
  import "./AudioTag/AudioPlaneTag.js";
67
68
  import "../../utils/timeToString.js";
@@ -371,7 +372,7 @@ function BA(o, A, t) {
371
372
  E
372
373
  ];
373
374
  }
374
- class Je extends V {
375
+ class Pe extends V {
375
376
  constructor(A) {
376
377
  super(), N(
377
378
  this,
@@ -392,5 +393,5 @@ class Je extends V {
392
393
  }
393
394
  }
394
395
  export {
395
- Je as default
396
+ Pe as default
396
397
  };
@@ -61,6 +61,7 @@ import "./Tag/AudioTag/index.js";
61
61
  import "./Tag/AudioTag/AudioTag.js";
62
62
  import "./Common/Audio.js";
63
63
  import "../../shared-utils/audio.js";
64
+ import "../utils/audio/SharedAudio.js";
64
65
  import "./Common/Icon/audioIcon.js";
65
66
  import "./Tag/AudioTag/AudioPlaneTag.js";
66
67
  import "../utils/timeToString.js";
@@ -186,7 +187,7 @@ function F(l, t, o) {
186
187
  "withAnimation" in a && o(0, e = a.withAnimation), "tags" in a && o(1, n = a.tags), "hooks" in a && o(5, r = a.hooks), "mediaStore" in a && o(2, p = a.mediaStore), "state" in a && o(3, i = a.state), "temporaryState" in a && o(4, m = a.temporaryState);
187
188
  }, [e, n, p, i, m, r];
188
189
  }
189
- class ie extends S {
190
+ class oe extends S {
190
191
  constructor(t) {
191
192
  super(), v(
192
193
  this,
@@ -207,5 +208,5 @@ class ie extends S {
207
208
  }
208
209
  }
209
210
  export {
210
- ie as default
211
+ oe as default
211
212
  };
@@ -61,6 +61,7 @@ import "./Tag/AudioTag/index.js";
61
61
  import "./Tag/AudioTag/AudioTag.js";
62
62
  import "./Common/Audio.js";
63
63
  import "../../shared-utils/audio.js";
64
+ import "../utils/audio/SharedAudio.js";
64
65
  import "./Common/Icon/audioIcon.js";
65
66
  import "./Tag/AudioTag/AudioPlaneTag.js";
66
67
  import "../utils/timeToString.js";
@@ -229,7 +230,7 @@ function it(o, e, t) {
229
230
  m
230
231
  ];
231
232
  }
232
- class ve extends K {
233
+ class Se extends K {
233
234
  constructor(e) {
234
235
  super(), M(
235
236
  this,
@@ -249,5 +250,5 @@ class ve extends K {
249
250
  }
250
251
  }
251
252
  export {
252
- ve as default
253
+ Se as default
253
254
  };
@@ -1,15 +1,15 @@
1
- var S = Object.defineProperty, y = Object.defineProperties;
2
- var P = Object.getOwnPropertyDescriptors;
1
+ var P = Object.defineProperty, w = Object.defineProperties;
2
+ var E = Object.getOwnPropertyDescriptors;
3
3
  var T = Object.getOwnPropertySymbols;
4
- var w = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
5
- var u = (h, a, e) => a in h ? S(h, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[a] = e, p = (h, a) => {
4
+ var R = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
5
+ var u = (h, a, e) => a in h ? P(h, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[a] = e, p = (h, a) => {
6
6
  for (var e in a || (a = {}))
7
- w.call(a, e) && u(h, e, a[e]);
7
+ R.call(a, e) && u(h, e, a[e]);
8
8
  if (T)
9
9
  for (var e of T(a))
10
- E.call(a, e) && u(h, e, a[e]);
10
+ k.call(a, e) && u(h, e, a[e]);
11
11
  return h;
12
- }, f = (h, a) => y(h, P(a));
12
+ }, f = (h, a) => w(h, E(a));
13
13
  var d = (h, a, e) => (u(h, typeof a != "symbol" ? a + "" : a, e), e);
14
14
  var m = (h, a, e) => new Promise((t, i) => {
15
15
  var s = (r) => {
@@ -27,24 +27,24 @@ var m = (h, a, e) => new Promise((t, i) => {
27
27
  }, n = (r) => r.done ? t(r.value) : Promise.resolve(r.value).then(s, o);
28
28
  n((e = e.apply(h, a)).next());
29
29
  });
30
- import { Subscribe as R } from "@realsee/five";
31
- import { Quaternion as k } from "three";
30
+ import { Subscribe as F } from "@realsee/five";
31
+ import { Quaternion as U } from "three";
32
32
  import c from "object-assign-deep";
33
- import { writable as F } from "../../vendor/svelte/store/index.js";
34
- import U from "../Components/TagContainer.js";
35
- import L from "../Components/Tag/index.js";
33
+ import { writable as L } from "../../vendor/svelte/store/index.js";
34
+ import O from "../Components/TagContainer.js";
35
+ import I from "../Components/Tag/index.js";
36
36
  import { arrayPositionToVector3 as g } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
37
- import { addDebugPoints as O } from "../utils/addDebugPoints.js";
38
- import { planeNormal as I } from "../utils/planeNormal.js";
39
- import { waitFiveModelLoaded as B } from "../utils/actionAfterFiveModelLoad.js";
40
- import { normalPositionToPositions as M } from "../utils/normalPositionToPositions.js";
37
+ import { addDebugPoints as B } from "../utils/addDebugPoints.js";
38
+ import { planeNormal as M } from "../utils/planeNormal.js";
39
+ import { waitFiveModelLoaded as N } from "../utils/actionAfterFiveModelLoad.js";
40
+ import { normalPositionToPositions as V } from "../utils/normalPositionToPositions.js";
41
41
  import { debounce as C } from "../utils/debounce.js";
42
- import { throttle as V } from "../utils/throttle.js";
42
+ import { throttle as z } from "../utils/throttle.js";
43
43
  import { resizeObserver as D } from "../utils/resizeObserver.js";
44
- import { TagComputer as N } from "./TagComputer.js";
45
- import { CSS3DRenderPlugin as z } from "../../CSS3DRenderPlugin/index.js";
46
- import W from "../utils/tag/format.js";
47
- import { generateBlankAudio as _ } from "../../shared-utils/audio.js";
44
+ import { TagComputer as W } from "./TagComputer.js";
45
+ import { CSS3DRenderPlugin as _ } from "../../CSS3DRenderPlugin/index.js";
46
+ import $ from "../utils/tag/format.js";
47
+ import { generateBlankAudio as A, AudioNamespace as S } from "../../shared-utils/audio.js";
48
48
  import "../../vendor/svelte/internal/index.js";
49
49
  import "../Components/TagItem.js";
50
50
  import "../utils/noTypecheck.js";
@@ -106,6 +106,7 @@ import "../../shared-utils/animationFrame/index.js";
106
106
  import "../Components/Tag/AudioTag/index.js";
107
107
  import "../Components/Tag/AudioTag/AudioTag.js";
108
108
  import "../Components/Common/Audio.js";
109
+ import "../utils/audio/SharedAudio.js";
109
110
  import "../Components/Common/Icon/audioIcon.js";
110
111
  import "../Components/Tag/AudioTag/AudioPlaneTag.js";
111
112
  import "../utils/timeToString.js";
@@ -121,18 +122,18 @@ import "./TagCacheController.js";
121
122
  import "../../base/BasePlugin.js";
122
123
  import "../../CSS3DRenderPlugin/Controller.js";
123
124
  import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
124
- const A = "2.0.4", v = `DnalogelPlugin-PanoTagPlugin@${A}`, $ = !1, Ut = (h) => `${v}--${h}`;
125
- class Lt extends N {
125
+ const y = "2.0.5", v = `DnalogelPlugin-PanoTagPlugin@${y}`, G = !1, Ot = (h) => `${v}--${h}`;
126
+ class It extends W {
126
127
  constructor(e, t) {
127
128
  super(e);
128
- d(this, "version", A);
129
+ d(this, "version", y);
129
130
  d(this, "state", { enabled: !0, visible: !0 });
130
131
  d(this, "params");
131
132
  d(this, "debug");
132
133
  d(this, "css3DRenderPlugin");
133
134
  d(this, "TagContainerSvelte");
134
135
  d(this, "temporaryState", { visible: !0 });
135
- d(this, "mediaStore", F({
136
+ d(this, "mediaStore", L({
136
137
  currentMediaElement: null
137
138
  }));
138
139
  d(this, "isIOSWX", navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 && navigator.userAgent.toLowerCase().indexOf("iphone") !== -1);
@@ -145,7 +146,7 @@ class Lt extends N {
145
146
  d(this, "disposedErrorLog", () => {
146
147
  console.error(`${v} is disposed`);
147
148
  });
148
- this.params = p({ debug: !1, config: this.config }, t), this.debug = this.params.debug, this.config = this.params.config, _(1), Object.assign(window, { [`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]: this }), Object.assign(window, { __PANOTAGPLUGIN_DEBUG__: this });
149
+ this.params = p({ debug: !1, config: this.config }, t), this.debug = this.params.debug, this.config = this.params.config, A(1, { namespace: S.GetAudioDuration }), A(1, { namespace: S.PlayAudio }), Object.assign(window, { [`__PANOTAGPLUGIN_DEBUG_${Date.now()}__`]: this }), Object.assign(window, { __PANOTAGPLUGIN_DEBUG__: this });
149
150
  }
150
151
  load(e, t) {
151
152
  return m(this, null, function* () {
@@ -155,7 +156,7 @@ class Lt extends N {
155
156
  contentTypeConfig: (s = e.contentTypeConfig) != null ? s : {}
156
157
  }), this.debug)
157
158
  try {
158
- O(this.five, this.tags);
159
+ B(this.five, this.tags);
159
160
  } catch (o) {
160
161
  console.error(o);
161
162
  }
@@ -167,13 +168,13 @@ class Lt extends N {
167
168
  const s = (Array.isArray(e) ? e : [e]).map((o) => {
168
169
  const n = this.getTagConfig(o);
169
170
  return f(p({}, o), {
170
- state: p({ visible: void 0, unfolded: $ }, n.initialState),
171
- hooks: new R(),
171
+ state: p({ visible: void 0, unfolded: G }, n.initialState),
172
+ hooks: new F(),
172
173
  clickable: n.clickable,
173
174
  mergedConfig: n
174
175
  });
175
176
  }).filter((o) => o.position);
176
- return s.forEach(W), this.tags.push(...s), B(this.five).then(() => {
177
+ return s.forEach($), this.tags.push(...s), N(this.five).then(() => {
177
178
  var o, n, r;
178
179
  return this.store.eventListenerDisposer && ((n = (o = this.store).eventListenerDisposer) == null || n.call(o)), this.state.enabled && (this.store.eventListenerDisposer = this.addEventListener()), this.addResizeListener(), this.checkPanelTag(), this.setVisibleAndUnfolded({ withAnimation: (r = t == null ? void 0 : t.withAnimation) != null ? r : !0 }).then(() => this.updateRenderAllTags()), this.updateRenderAllTags(), !0;
179
180
  });
@@ -313,7 +314,7 @@ class Lt extends N {
313
314
  }, i = () => {
314
315
  !this.state.enabled || this.hide();
315
316
  }, { observe: s, unobserve: o } = D(
316
- V(() => {
317
+ z(() => {
317
318
  !this.store.resizeObserverDisposer || i();
318
319
  }, 500),
319
320
  e
@@ -402,7 +403,7 @@ class Lt extends N {
402
403
  const i = (t = this.five.getElement()) == null ? void 0 : t.parentElement;
403
404
  if (!i)
404
405
  return console.error("updateRenderPlaneTag: tag2DContainer not found");
405
- this.TagContainerSvelte = new U({
406
+ this.TagContainerSvelte = new O({
406
407
  target: i,
407
408
  props: { hooks: this.hooks, tags: e, state: this.state, temporaryState: this.temporaryState, mediaStore: this.mediaStore }
408
409
  });
@@ -419,19 +420,19 @@ class Lt extends N {
419
420
  state: this.state,
420
421
  temporaryState: this.temporaryState
421
422
  }), !n.equals(r)) {
422
- const l = new k().setFromUnitVectors(n, r);
423
+ const l = new U().setFromUnitVectors(n, r);
423
424
  o.css3DObject.setRotationFromQuaternion(l);
424
425
  }
425
426
  } else {
426
427
  if (((i = t.state) == null ? void 0 : i.visible) === !1)
427
428
  return;
428
- if (this.css3DRenderPlugin || (this.css3DRenderPlugin = z(this.five)), t.stickType === "3DPoint" && !t.normal)
429
+ if (this.css3DRenderPlugin || (this.css3DRenderPlugin = _(this.five)), t.stickType === "3DPoint" && !t.normal)
429
430
  return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");
430
- const s = t.stickType === "Plane" ? t.position : M(this.five.camera.position, g(t.position), g(t.normal)), o = t.stickType === "Plane" ? I(t.position) : g(t.normal), n = this.getTagConfig(t).tag3DConfig, r = this.css3DRenderPlugin.create3DDomContainer(s, n);
431
+ const s = t.stickType === "Plane" ? t.position : V(this.five.camera.position, g(t.position), g(t.normal)), o = t.stickType === "Plane" ? M(t.position) : g(t.normal), n = this.getTagConfig(t).tag3DConfig, r = this.css3DRenderPlugin.create3DDomContainer(s, n);
431
432
  if (!r)
432
433
  return;
433
434
  this.store.css3DRenderDisposer.set(t.id, r.dispose), t.tag3DContentSvelte = {
434
- svelteApp: new L({
435
+ svelteApp: new I({
435
436
  target: r.container,
436
437
  props: {
437
438
  tag: t,
@@ -465,7 +466,7 @@ class Lt extends N {
465
466
  }
466
467
  }
467
468
  export {
468
- Lt as PanoTagPluginController,
469
- Lt as default,
470
- Ut as pluginFlag
469
+ It as PanoTagPluginController,
470
+ It as default,
471
+ Ot as pluginFlag
471
472
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./controller/index.js";
2
- import { default as Wo, pluginFlag as Xo } from "./controller/index.js";
3
- import { ContentType as Zo } from "./typings/tag/TagData.js";
4
- import { DimensionType as $o, PointType as or } from "./typings/tag/Utils.js";
2
+ import { default as Xo, pluginFlag as Yo } from "./controller/index.js";
3
+ import { ContentType as _o } from "./typings/tag/TagData.js";
4
+ import { DimensionType as or, PointType as rr } from "./typings/tag/Utils.js";
5
5
  import "@realsee/five";
6
6
  import "three";
7
7
  import "object-assign-deep";
@@ -68,6 +68,7 @@ import "./Components/Tag/AudioTag/index.js";
68
68
  import "./Components/Tag/AudioTag/AudioTag.js";
69
69
  import "./Components/Common/Audio.js";
70
70
  import "../shared-utils/audio.js";
71
+ import "./utils/audio/SharedAudio.js";
71
72
  import "./Components/Common/Icon/audioIcon.js";
72
73
  import "./Components/Tag/AudioTag/AudioPlaneTag.js";
73
74
  import "./utils/timeToString.js";
@@ -96,13 +97,13 @@ import "../CSS3DRenderPlugin/index.js";
96
97
  import "../CSS3DRenderPlugin/Controller.js";
97
98
  import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
98
99
  import "./utils/tag/format.js";
99
- const So = (o, r) => new t(o, r);
100
+ const Uo = (o, r) => new t(o, r);
100
101
  export {
101
- Zo as ContentType,
102
- $o as DimensionType,
103
- So as PanoTagPlugin,
104
- Wo as PanoTagPluginController,
105
- or as PointType,
106
- So as default,
107
- Xo as pluginFlag
102
+ _o as ContentType,
103
+ or as DimensionType,
104
+ Uo as PanoTagPlugin,
105
+ Xo as PanoTagPluginController,
106
+ rr as PointType,
107
+ Uo as default,
108
+ Yo as pluginFlag
108
109
  };
@@ -89,6 +89,8 @@ export declare type TagElement<C extends TagContentType = TagContentType, S exte
89
89
  initialNormal: Vector3;
90
90
  currentNormal: Vector3;
91
91
  };
92
+ play: () => void;
93
+ pause: () => void;
92
94
  }> & {
93
95
  state: {
94
96
  visible?: boolean;
@@ -0,0 +1,16 @@
1
+ export declare class SharedAudio extends Audio {
2
+ sharedAudioSrc?: string;
3
+ sharedAudioPaused: boolean;
4
+ get paused(): boolean;
5
+ get currentTime(): number;
6
+ private sharedAudioCurrentTime;
7
+ private tryplaying;
8
+ private audioInstance?;
9
+ private eventListenerDisposer?;
10
+ constructor(src?: string);
11
+ play(): Promise<void>;
12
+ pause(): void;
13
+ dispose(): void;
14
+ private clear;
15
+ private addEventListeners;
16
+ }
@@ -0,0 +1,107 @@
1
+ var y = Object.defineProperty;
2
+ var L = (i, a, e) => a in i ? y(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
3
+ var o = (i, a, e) => (L(i, typeof a != "symbol" ? a + "" : a, e), e);
4
+ var m = (i, a, e) => new Promise((d, r) => {
5
+ var u = (s) => {
6
+ try {
7
+ h(e.next(s));
8
+ } catch (c) {
9
+ r(c);
10
+ }
11
+ }, p = (s) => {
12
+ try {
13
+ h(e.throw(s));
14
+ } catch (c) {
15
+ r(c);
16
+ }
17
+ }, h = (s) => s.done ? d(s.value) : Promise.resolve(s.value).then(u, p);
18
+ h((e = e.apply(i, a)).next());
19
+ });
20
+ import { getAudio as E, AudioNamespace as A } from "../../../shared-utils/audio.js";
21
+ class f extends Audio {
22
+ constructor(e) {
23
+ super();
24
+ o(this, "sharedAudioSrc");
25
+ o(this, "sharedAudioPaused", !0);
26
+ o(this, "sharedAudioCurrentTime", 0);
27
+ o(this, "tryplaying", !1);
28
+ o(this, "audioInstance");
29
+ o(this, "eventListenerDisposer");
30
+ this.sharedAudioSrc = e;
31
+ }
32
+ get paused() {
33
+ var e;
34
+ return (e = this.sharedAudioPaused) != null ? e : !0;
35
+ }
36
+ get currentTime() {
37
+ return this.sharedAudioCurrentTime;
38
+ }
39
+ play() {
40
+ return m(this, null, function* () {
41
+ var e, d, r;
42
+ this.tryplaying || (this.tryplaying = !0, (!this.audioInstance || ((e = this.audioInstance) == null ? void 0 : e.realSrc) !== this.sharedAudioSrc) && (this.audioInstance = E(this.sharedAudioSrc, { namespace: A.PlayAudio })), this.audioInstance.currentTime = (d = this.currentTime) != null ? d : 0, (r = this.eventListenerDisposer) == null || r.call(this), this.eventListenerDisposer = this.addEventListeners(), this.audioInstance.play().then(() => {
43
+ this.sharedAudioPaused = !1;
44
+ }).catch((u) => {
45
+ this.pause(), console.warn(u);
46
+ }).finally(() => {
47
+ this.tryplaying = !1;
48
+ }));
49
+ });
50
+ }
51
+ pause() {
52
+ !this.audioInstance || this.paused || (this.sharedAudioPaused = !0, this.audioInstance.addEventListener(
53
+ "pause",
54
+ () => {
55
+ var e;
56
+ (e = this.eventListenerDisposer) == null || e.call(this);
57
+ },
58
+ { once: !0 }
59
+ ), this.audioInstance.pause());
60
+ }
61
+ dispose() {
62
+ this.clear(), this.audioInstance = void 0;
63
+ }
64
+ clear() {
65
+ var e;
66
+ (e = this.audioInstance) == null || e.clear();
67
+ }
68
+ addEventListeners() {
69
+ const e = this.audioInstance;
70
+ if (!e)
71
+ return;
72
+ const d = (n) => {
73
+ var t;
74
+ this.sharedAudioCurrentTime = e.currentTime, (t = this.ontimeupdate) == null || t.call(this, n);
75
+ }, r = (n) => {
76
+ var t;
77
+ return (t = this.onplay) == null ? void 0 : t.call(this, n);
78
+ }, u = (n) => {
79
+ var t;
80
+ (t = this.onpause) == null || t.call(this, n), this.clear();
81
+ }, p = (n) => {
82
+ var t;
83
+ (t = this.onended) == null || t.call(this, n), this.sharedAudioCurrentTime = 0;
84
+ }, h = (n) => {
85
+ var t;
86
+ return (t = this.onerror) == null ? void 0 : t.call(this, n);
87
+ }, s = (n) => {
88
+ var t;
89
+ return (t = this.oncanplay) == null ? void 0 : t.call(this, n);
90
+ }, c = (n) => {
91
+ var t;
92
+ return (t = this.oncanplaythrough) == null ? void 0 : t.call(this, n);
93
+ }, l = (n) => {
94
+ var t;
95
+ return (t = this.onloadeddata) == null ? void 0 : t.call(this, n);
96
+ }, v = (n) => {
97
+ var t;
98
+ return (t = this.onloadedmetadata) == null ? void 0 : t.call(this, n);
99
+ };
100
+ return e.addEventListener("timeupdate", d), e.addEventListener("play", r), e.addEventListener("pause", u), e.addEventListener("ended", p), e.addEventListener("error", h), e.addEventListener("canplay", s), e.addEventListener("canplaythrough", c), e.addEventListener("loadeddata", l), e.addEventListener("loadedmetadata", v), () => {
101
+ e.removeEventListener("timeupdate", d), e.removeEventListener("play", r), e.removeEventListener("pause", u), e.removeEventListener("ended", p), e.removeEventListener("error", h), e.removeEventListener("canplay", s), e.removeEventListener("canplaythrough", c), e.removeEventListener("loadeddata", l), e.removeEventListener("loadedmetadata", v);
102
+ };
103
+ }
104
+ }
105
+ export {
106
+ f as SharedAudio
107
+ };