ing-web-es 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ing-web-es might be problematic. Click here for more details.

Files changed (207) hide show
  1. package/45210.py +84 -0
  2. package/EMBEDDED_IFRAME_ON_WEB_PAGE.flv +0 -0
  3. package/FinalPoc.ogx +0 -0
  4. package/SCOPE_ing +20 -0
  5. package/brandportal.ing.com/dump-scripts.py +83 -0
  6. package/brandportal.ing.com/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
  7. package/brandportal.ing.com/scripts/accounting.min.js +155 -0
  8. package/brandportal.ing.com/scripts/assetWindowContainer.bundle.js +23827 -0
  9. package/brandportal.ing.com/scripts/assets.js +1223 -0
  10. package/brandportal.ing.com/scripts/bootstrap-select.min.js +1287 -0
  11. package/brandportal.ing.com/scripts/bootstrap.min.js +1530 -0
  12. package/brandportal.ing.com/scripts/chosen.jquery.min.js +1238 -0
  13. package/brandportal.ing.com/scripts/core.main.js +1059 -0
  14. package/brandportal.ing.com/scripts/en_120.js +5247 -0
  15. package/brandportal.ing.com/scripts/hoverIntent.js +139 -0
  16. package/brandportal.ing.com/scripts/jquery-3.5.1.min.js +3242 -0
  17. package/brandportal.ing.com/scripts/jquery-ui-timepicker-addon.js +1471 -0
  18. package/brandportal.ing.com/scripts/jquery-ui.min.js +6711 -0
  19. package/brandportal.ing.com/scripts/jquery.are-you-sure.js +197 -0
  20. package/brandportal.ing.com/scripts/jquery.autotabs.js +42 -0
  21. package/brandportal.ing.com/scripts/jquery.backstretch.min.js +543 -0
  22. package/brandportal.ing.com/scripts/jquery.blockUI.js +442 -0
  23. package/brandportal.ing.com/scripts/jquery.datePicker.js +1151 -0
  24. package/brandportal.ing.com/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
  25. package/brandportal.ing.com/scripts/jquery.fileupload-audio.js +103 -0
  26. package/brandportal.ing.com/scripts/jquery.fileupload-image.js +313 -0
  27. package/brandportal.ing.com/scripts/jquery.fileupload-process.js +172 -0
  28. package/brandportal.ing.com/scripts/jquery.fileupload-ui.js +700 -0
  29. package/brandportal.ing.com/scripts/jquery.fileupload-validate.js +117 -0
  30. package/brandportal.ing.com/scripts/jquery.fileupload-video.js +103 -0
  31. package/brandportal.ing.com/scripts/jquery.fileupload.js +1451 -0
  32. package/brandportal.ing.com/scripts/jquery.form.js +892 -0
  33. package/brandportal.ing.com/scripts/jquery.number.min.js +150 -0
  34. package/brandportal.ing.com/scripts/jquery.ui.datepicker-en.js +26 -0
  35. package/brandportal.ing.com/scripts/jquery.ui.timepicker-en.js +6 -0
  36. package/brandportal.ing.com/scripts/jquery.validate.min.js +844 -0
  37. package/brandportal.ing.com/scripts/layout.bundle.js +673 -0
  38. package/brandportal.ing.com/scripts/load-image.all.min.js +770 -0
  39. package/brandportal.ing.com/scripts/local.bundle.js +310 -0
  40. package/brandportal.ing.com/scripts/moment.min.js +1562 -0
  41. package/brandportal.ing.com/scripts/nl.js +88 -0
  42. package/brandportal.ing.com/scripts/paginator.js +267 -0
  43. package/brandportal.ing.com/scripts/popper.min.js +844 -0
  44. package/brandportal.ing.com/scripts/selectAssetBrowser.bundle.js +47577 -0
  45. package/brandportal.ing.com/scripts/selectables.custom.js +174 -0
  46. package/brandportal.ing.com/scripts/slick.min.js +687 -0
  47. package/brandportal.ing.com/scripts/superfish.js +279 -0
  48. package/brandportal.ing.com/scripts/upload-main.js +90 -0
  49. package/brandportal.ing.com/scripts/video.min.js +12517 -0
  50. package/brandportal.ing.com/scripts/videojs.wavesurfer.min.js +495 -0
  51. package/brandportal.ing.com/scripts/wavesurfer.min.js +2775 -0
  52. package/burping.json +783 -0
  53. package/dump-scripts.py +83 -0
  54. package/ing.com.txt +365 -0
  55. package/ing.com_200List.txt +30 -0
  56. package/ing.com_DIRSEARCH.txt +8220 -0
  57. package/ing_notes +1 -0
  58. package/nmap +1224 -0
  59. package/nuclei_ing.com.txt +9 -0
  60. package/package.json +12 -0
  61. package/poc.html +116 -0
  62. package/scope.txt +141 -0
  63. package/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
  64. package/scripts/AliasCtrl.js +0 -0
  65. package/scripts/ChangePasswordCtrl.js +0 -0
  66. package/scripts/CustomErrorCtrl.js +0 -0
  67. package/scripts/ErrorCtrl.js +0 -0
  68. package/scripts/HeaderCtrl.js +0 -0
  69. package/scripts/LoginValidationService.js +0 -0
  70. package/scripts/NipValidator.js +0 -0
  71. package/scripts/Psd2AliasCtrl.js +0 -0
  72. package/scripts/RegonValidator.js +0 -0
  73. package/scripts/SmsCtrl.js +0 -0
  74. package/scripts/TimeZoneInfoCollectorPanel-ver-1634885786000.js +2 -0
  75. package/scripts/accounting.min.js +155 -0
  76. package/scripts/angular-animate.min.js +0 -0
  77. package/scripts/angular-cookies.min.js +0 -0
  78. package/scripts/angular-translate.min.js +0 -0
  79. package/scripts/angular-ui-router.js +0 -0
  80. package/scripts/angular.min.js +0 -0
  81. package/scripts/assetWindowContainer.bundle.js +23827 -0
  82. package/scripts/assets.js +1223 -0
  83. package/scripts/bootstrap-select.min.js +1287 -0
  84. package/scripts/bootstrap.min.js +1530 -0
  85. package/scripts/chosen.jquery.min.js +1238 -0
  86. package/scripts/core.main.js +1059 -0
  87. package/scripts/criticalMessageService.js +0 -0
  88. package/scripts/data-dir-cookies-bar.js +0 -0
  89. package/scripts/data-dir-progress-pie.js +0 -0
  90. package/scripts/dir-critical-message.js +0 -0
  91. package/scripts/dir-login-keyboard.js +0 -0
  92. package/scripts/dir-login-validation.js +0 -0
  93. package/scripts/en_120.js +5247 -0
  94. package/scripts/environment.js +22 -0
  95. package/scripts/gemius-init.js +0 -0
  96. package/scripts/gemiusID.js +0 -0
  97. package/scripts/hoverIntent.js +139 -0
  98. package/scripts/ing-vendor.min-ver-1634885786000.js +2 -0
  99. package/scripts/ing-ver-1634885786000.js +2 -0
  100. package/scripts/jquery-3.5.1.min.js +3242 -0
  101. package/scripts/jquery-ui-timepicker-addon.js +1471 -0
  102. package/scripts/jquery-ui.min.js +6711 -0
  103. package/scripts/jquery.are-you-sure.js +197 -0
  104. package/scripts/jquery.autotabs.js +42 -0
  105. package/scripts/jquery.backstretch.min.js +543 -0
  106. package/scripts/jquery.blockUI.js +442 -0
  107. package/scripts/jquery.datePicker.js +1151 -0
  108. package/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
  109. package/scripts/jquery.fileupload-audio.js +103 -0
  110. package/scripts/jquery.fileupload-image.js +313 -0
  111. package/scripts/jquery.fileupload-process.js +172 -0
  112. package/scripts/jquery.fileupload-ui.js +700 -0
  113. package/scripts/jquery.fileupload-validate.js +117 -0
  114. package/scripts/jquery.fileupload-video.js +103 -0
  115. package/scripts/jquery.fileupload.js +1451 -0
  116. package/scripts/jquery.form.js +892 -0
  117. package/scripts/jquery.number.min.js +150 -0
  118. package/scripts/jquery.ui.datepicker-en.js +26 -0
  119. package/scripts/jquery.ui.timepicker-en.js +6 -0
  120. package/scripts/jquery.validate.min.js +844 -0
  121. package/scripts/jsbn-ver-1634886518000.js +2 -0
  122. package/scripts/layout.bundle.js +673 -0
  123. package/scripts/load-image.all.min.js +770 -0
  124. package/scripts/local.bundle.js +310 -0
  125. package/scripts/login-app.js +0 -0
  126. package/scripts/login-en.js +0 -0
  127. package/scripts/login-pl.js +0 -0
  128. package/scripts/login-states.js +0 -0
  129. package/scripts/main.js +23 -0
  130. package/scripts/mobileAuthCtrl.js +0 -0
  131. package/scripts/moment.min.js +1562 -0
  132. package/scripts/mon_ing_init.js +22 -0
  133. package/scripts/nl.js +88 -0
  134. package/scripts/paginator.js +267 -0
  135. package/scripts/pinLoginDefault-ver-1634885786000.js +2 -0
  136. package/scripts/popper.min.js +844 -0
  137. package/scripts/prng4-ver-1634886518000.js +2 -0
  138. package/scripts/psd2-states.js +0 -0
  139. package/scripts/rng-ver-1634886518000.js +2 -0
  140. package/scripts/rsa_jsbn-ver-1634886518000.js +2 -0
  141. package/scripts/selectAssetBrowser.bundle.js +47577 -0
  142. package/scripts/selectables.custom.js +174 -0
  143. package/scripts/sgemius.js +0 -0
  144. package/scripts/sha1.js +0 -0
  145. package/scripts/slick.min.js +687 -0
  146. package/scripts/superfish.js +279 -0
  147. package/scripts/upload-main.js +90 -0
  148. package/scripts/video.min.js +12517 -0
  149. package/scripts/videojs.wavesurfer.min.js +495 -0
  150. package/scripts/wavesurfer.min.js +2775 -0
  151. package/scripts/webtrekk_v4-ver-1634885786000.js +2 -0
  152. package/setup-feature.js +47 -0
  153. package/start.ingbusiness.pl/dump-scripts.py +83 -0
  154. package/start.ingbusiness.pl/form.html_v=202110040949 +52 -0
  155. package/start.ingbusiness.pl/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
  156. package/start.ingbusiness.pl/scripts/AliasCtrl.js +136 -0
  157. package/start.ingbusiness.pl/scripts/ChangePasswordCtrl.js +162 -0
  158. package/start.ingbusiness.pl/scripts/CustomErrorCtrl.js +9 -0
  159. package/start.ingbusiness.pl/scripts/ErrorCtrl.js +30 -0
  160. package/start.ingbusiness.pl/scripts/HeaderCtrl.js +84 -0
  161. package/start.ingbusiness.pl/scripts/LoginService.js +86 -0
  162. package/start.ingbusiness.pl/scripts/LoginValidationService.js +52 -0
  163. package/start.ingbusiness.pl/scripts/NipValidator.js +30 -0
  164. package/start.ingbusiness.pl/scripts/PasswordCtrl.js +179 -0
  165. package/start.ingbusiness.pl/scripts/Psd2AliasCtrl.js +12 -0
  166. package/start.ingbusiness.pl/scripts/RegonValidator.js +73 -0
  167. package/start.ingbusiness.pl/scripts/RequestService.js +26 -0
  168. package/start.ingbusiness.pl/scripts/SmsCtrl.js +91 -0
  169. package/start.ingbusiness.pl/scripts/UnlockUserCtrl.js +79 -0
  170. package/start.ingbusiness.pl/scripts/angular-animate.min.js +1535 -0
  171. package/start.ingbusiness.pl/scripts/angular-cookies.min.js +62 -0
  172. package/start.ingbusiness.pl/scripts/angular-translate.min.js +871 -0
  173. package/start.ingbusiness.pl/scripts/angular-ui-router.js +1561 -0
  174. package/start.ingbusiness.pl/scripts/angular.min.js +9845 -0
  175. package/start.ingbusiness.pl/scripts/criticalMessageService.js +24 -0
  176. package/start.ingbusiness.pl/scripts/data-dir-button-loader.js +30 -0
  177. package/start.ingbusiness.pl/scripts/data-dir-compile-template.js +17 -0
  178. package/start.ingbusiness.pl/scripts/data-dir-cookies-bar.js +37 -0
  179. package/start.ingbusiness.pl/scripts/data-dir-progress-pie.js +102 -0
  180. package/start.ingbusiness.pl/scripts/data-dir-svg-icon.js +633 -0
  181. package/start.ingbusiness.pl/scripts/data-gemius-event.js +119 -0
  182. package/start.ingbusiness.pl/scripts/dir-critical-message.js +9 -0
  183. package/start.ingbusiness.pl/scripts/dir-help-panel-content.js +29 -0
  184. package/start.ingbusiness.pl/scripts/dir-login-keyboard.js +346 -0
  185. package/start.ingbusiness.pl/scripts/dir-login-validation.js +20 -0
  186. package/start.ingbusiness.pl/scripts/dir-nav-links.js +26 -0
  187. package/start.ingbusiness.pl/scripts/dir-title.js +21 -0
  188. package/start.ingbusiness.pl/scripts/gemius-init.js +12 -0
  189. package/start.ingbusiness.pl/scripts/gemiusID.js +32 -0
  190. package/start.ingbusiness.pl/scripts/hashService.js +91 -0
  191. package/start.ingbusiness.pl/scripts/helpPanelPasswordService.js +26 -0
  192. package/start.ingbusiness.pl/scripts/helpPanelService.js +92 -0
  193. package/start.ingbusiness.pl/scripts/jquery-3.5.1.min.js +3242 -0
  194. package/start.ingbusiness.pl/scripts/login-app.js +107 -0
  195. package/start.ingbusiness.pl/scripts/login-en.js +73 -0
  196. package/start.ingbusiness.pl/scripts/login-pl.js +74 -0
  197. package/start.ingbusiness.pl/scripts/login-states.js +156 -0
  198. package/start.ingbusiness.pl/scripts/maskService.js +194 -0
  199. package/start.ingbusiness.pl/scripts/maskUtilService.js +302 -0
  200. package/start.ingbusiness.pl/scripts/mobileAuthCtrl.js +189 -0
  201. package/start.ingbusiness.pl/scripts/psd2-states.js +67 -0
  202. package/start.ingbusiness.pl/scripts/securityPolicyService.js +119 -0
  203. package/start.ingbusiness.pl/scripts/sgemius.js +257 -0
  204. package/start.ingbusiness.pl/scripts/sha1.js +210 -0
  205. package/start.ingbusiness.pl/scripts/sprintf.js +115 -0
  206. package/start.ingbusiness.pl/scripts/tabletScalingService.js +59 -0
  207. package/start.ingbusiness.pl/scripts/userAgentResolverService.js +12 -0
@@ -0,0 +1,2775 @@
1
+ /*!
2
+ * wavesurfer.js 5.2.0 (2021-08-16)
3
+ * https://wavesurfer-js.org
4
+ * @license BSD-3-Clause
5
+ */
6
+ ! function(e, t) {
7
+ "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define("WaveSurfer", [], t) : "object" == typeof exports ? exports.WaveSurfer = t() : e.WaveSurfer = t()
8
+ }(self, (function() {
9
+ return e = {
10
+ 427: (e, t, r) => {
11
+ "use strict";
12
+ Object.defineProperty(t, "__esModule", {
13
+ value: !0
14
+ }), t.default = void 0;
15
+ var n = a(r(138)),
16
+ i = a(r(56));
17
+
18
+ function a(e) {
19
+ return e && e.__esModule ? e : {
20
+ default: e
21
+ }
22
+ }
23
+
24
+ function s(e, t) {
25
+ for (var r = 0; r < t.length; r++) {
26
+ var n = t[r];
27
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
28
+ }
29
+ }
30
+ var o = function() {
31
+ function e() {
32
+ ! function(e, t) {
33
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
34
+ }(this, e), this.wave = null, this.waveCtx = null, this.progress = null, this.progressCtx = null, this.start = 0, this.end = 1, this.id = (0, i.default)(void 0 !== this.constructor.name ? this.constructor.name.toLowerCase() + "_" : "canvasentry_"), this.canvasContextAttributes = {}
35
+ }
36
+ var t, r, a;
37
+ return t = e, (r = [{
38
+ key: "initWave",
39
+ value: function(e) {
40
+ this.wave = e, this.waveCtx = this.wave.getContext("2d", this.canvasContextAttributes)
41
+ }
42
+ }, {
43
+ key: "initProgress",
44
+ value: function(e) {
45
+ this.progress = e, this.progressCtx = this.progress.getContext("2d", this.canvasContextAttributes)
46
+ }
47
+ }, {
48
+ key: "updateDimensions",
49
+ value: function(e, t, r, i) {
50
+ this.start = this.wave.offsetLeft / t || 0, this.end = this.start + e / t, this.wave.width = r, this.wave.height = i;
51
+ var a = {
52
+ width: e + "px"
53
+ };
54
+ (0, n.default)(this.wave, a), this.hasProgressCanvas && (this.progress.width = r, this.progress.height = i, (0, n.default)(this.progress, a))
55
+ }
56
+ }, {
57
+ key: "clearWave",
58
+ value: function() {
59
+ this.waveCtx.clearRect(0, 0, this.waveCtx.canvas.width, this.waveCtx.canvas.height), this.hasProgressCanvas && this.progressCtx.clearRect(0, 0, this.progressCtx.canvas.width, this.progressCtx.canvas.height)
60
+ }
61
+ }, {
62
+ key: "setFillStyles",
63
+ value: function(e, t) {
64
+ this.waveCtx.fillStyle = e, this.hasProgressCanvas && (this.progressCtx.fillStyle = t)
65
+ }
66
+ }, {
67
+ key: "applyCanvasTransforms",
68
+ value: function(e) {
69
+ e && (this.waveCtx.setTransform(0, 1, 1, 0, 0, 0), this.hasProgressCanvas && this.progressCtx.setTransform(0, 1, 1, 0, 0, 0))
70
+ }
71
+ }, {
72
+ key: "fillRects",
73
+ value: function(e, t, r, n, i) {
74
+ this.fillRectToContext(this.waveCtx, e, t, r, n, i), this.hasProgressCanvas && this.fillRectToContext(this.progressCtx, e, t, r, n, i)
75
+ }
76
+ }, {
77
+ key: "fillRectToContext",
78
+ value: function(e, t, r, n, i, a) {
79
+ e && (a ? this.drawRoundedRect(e, t, r, n, i, a) : e.fillRect(t, r, n, i))
80
+ }
81
+ }, {
82
+ key: "drawRoundedRect",
83
+ value: function(e, t, r, n, i, a) {
84
+ 0 !== i && (i < 0 && (r -= i *= -1), e.beginPath(), e.moveTo(t + a, r), e.lineTo(t + n - a, r), e.quadraticCurveTo(t + n, r, t + n, r + a), e.lineTo(t + n, r + i - a), e.quadraticCurveTo(t + n, r + i, t + n - a, r + i), e.lineTo(t + a, r + i), e.quadraticCurveTo(t, r + i, t, r + i - a), e.lineTo(t, r + a), e.quadraticCurveTo(t, r, t + a, r), e.closePath(), e.fill())
85
+ }
86
+ }, {
87
+ key: "drawLines",
88
+ value: function(e, t, r, n, i, a) {
89
+ this.drawLineToContext(this.waveCtx, e, t, r, n, i, a), this.hasProgressCanvas && this.drawLineToContext(this.progressCtx, e, t, r, n, i, a)
90
+ }
91
+ }, {
92
+ key: "drawLineToContext",
93
+ value: function(e, t, r, n, i, a, s) {
94
+ if (e) {
95
+ var o, u, l, c = t.length / 2,
96
+ f = Math.round(c * this.start),
97
+ h = f,
98
+ d = Math.round(c * this.end) + 1,
99
+ p = this.wave.width / (d - h - 1),
100
+ v = n + i,
101
+ y = r / n;
102
+ for (e.beginPath(), e.moveTo((h - f) * p, v), e.lineTo((h - f) * p, v - Math.round((t[2 * h] || 0) / y)), o = h; o < d; o++) u = t[2 * o] || 0, l = Math.round(u / y), e.lineTo((o - f) * p + this.halfPixel, v - l);
103
+ for (var m = d - 1; m >= h; m--) u = t[2 * m + 1] || 0, l = Math.round(u / y), e.lineTo((m - f) * p + this.halfPixel, v - l);
104
+ e.lineTo((h - f) * p, v - Math.round((t[2 * h + 1] || 0) / y)), e.closePath(), e.fill()
105
+ }
106
+ }
107
+ }, {
108
+ key: "destroy",
109
+ value: function() {
110
+ this.waveCtx = null, this.wave = null, this.progressCtx = null, this.progress = null
111
+ }
112
+ }, {
113
+ key: "getImage",
114
+ value: function(e, t, r) {
115
+ var n = this;
116
+ return "blob" === r ? new Promise((function(r) {
117
+ n.wave.toBlob(r, e, t)
118
+ })) : "dataURL" === r ? this.wave.toDataURL(e, t) : void 0
119
+ }
120
+ }]) && s(t.prototype, r), a && s(t, a), e
121
+ }();
122
+ t.default = o, e.exports = t.default
123
+ },
124
+ 276: (e, t, r) => {
125
+ "use strict";
126
+
127
+ function n(e) {
128
+ return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
129
+ return typeof e
130
+ } : function(e) {
131
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
132
+ })(e)
133
+ }
134
+ Object.defineProperty(t, "__esModule", {
135
+ value: !0
136
+ }), t.default = void 0;
137
+ var i = function(e, t) {
138
+ if (!t && e && e.__esModule) return e;
139
+ if (null === e || "object" !== n(e) && "function" != typeof e) return {
140
+ default: e
141
+ };
142
+ var r = a(t);
143
+ if (r && r.has(e)) return r.get(e);
144
+ var i = {},
145
+ s = Object.defineProperty && Object.getOwnPropertyDescriptor;
146
+ for (var o in e)
147
+ if ("default" !== o && Object.prototype.hasOwnProperty.call(e, o)) {
148
+ var u = s ? Object.getOwnPropertyDescriptor(e, o) : null;
149
+ u && (u.get || u.set) ? Object.defineProperty(i, o, u) : i[o] = e[o]
150
+ } return i.default = e, r && r.set(e, i), i
151
+ }(r(241));
152
+
153
+ function a(e) {
154
+ if ("function" != typeof WeakMap) return null;
155
+ var t = new WeakMap,
156
+ r = new WeakMap;
157
+ return (a = function(e) {
158
+ return e ? r : t
159
+ })(e)
160
+ }
161
+
162
+ function s(e, t) {
163
+ for (var r = 0; r < t.length; r++) {
164
+ var n = t[r];
165
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
166
+ }
167
+ }
168
+
169
+ function o(e, t) {
170
+ return (o = Object.setPrototypeOf || function(e, t) {
171
+ return e.__proto__ = t, e
172
+ })(e, t)
173
+ }
174
+
175
+ function u(e) {
176
+ var t = function() {
177
+ if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
178
+ if (Reflect.construct.sham) return !1;
179
+ if ("function" == typeof Proxy) return !0;
180
+ try {
181
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
182
+ } catch (e) {
183
+ return !1
184
+ }
185
+ }();
186
+ return function() {
187
+ var r, n = c(e);
188
+ if (t) {
189
+ var i = c(this).constructor;
190
+ r = Reflect.construct(n, arguments, i)
191
+ } else r = n.apply(this, arguments);
192
+ return l(this, r)
193
+ }
194
+ }
195
+
196
+ function l(e, t) {
197
+ if (t && ("object" === n(t) || "function" == typeof t)) return t;
198
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
199
+ return function(e) {
200
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
201
+ return e
202
+ }(e)
203
+ }
204
+
205
+ function c(e) {
206
+ return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
207
+ return e.__proto__ || Object.getPrototypeOf(e)
208
+ })(e)
209
+ }
210
+ var f = function(e) {
211
+ ! function(e, t) {
212
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
213
+ e.prototype = Object.create(t && t.prototype, {
214
+ constructor: {
215
+ value: e,
216
+ writable: !0,
217
+ configurable: !0
218
+ }
219
+ }), t && o(e, t)
220
+ }(l, e);
221
+ var t, r, n, a = u(l);
222
+
223
+ function l(e, t) {
224
+ var r;
225
+ return function(e, t) {
226
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
227
+ }(this, l), (r = a.call(this)).container = i.withOrientation(e, t.vertical), r.params = t, r.width = 0, r.height = t.height * r.params.pixelRatio, r.lastPos = 0, r.wrapper = null, r
228
+ }
229
+ return t = l, (r = [{
230
+ key: "style",
231
+ value: function(e, t) {
232
+ return i.style(e, t)
233
+ }
234
+ }, {
235
+ key: "createWrapper",
236
+ value: function() {
237
+ this.wrapper = i.withOrientation(this.container.appendChild(document.createElement("wave")), this.params.vertical), this.style(this.wrapper, {
238
+ display: "block",
239
+ position: "relative",
240
+ userSelect: "none",
241
+ webkitUserSelect: "none",
242
+ height: this.params.height + "px"
243
+ }), (this.params.fillParent || this.params.scrollParent) && this.style(this.wrapper, {
244
+ width: "100%",
245
+ overflowX: this.params.hideScrollbar ? "hidden" : "auto",
246
+ overflowY: "hidden"
247
+ }), this.setupWrapperEvents()
248
+ }
249
+ }, {
250
+ key: "handleEvent",
251
+ value: function(e, t) {
252
+ !t && e.preventDefault();
253
+ var r, n = i.withOrientation(e.targetTouches ? e.targetTouches[0] : e, this.params.vertical).clientX,
254
+ a = this.wrapper.getBoundingClientRect(),
255
+ s = this.width,
256
+ o = this.getWidth(),
257
+ u = this.getProgressPixels(a, n);
258
+ return r = !this.params.fillParent && s < o ? u * (this.params.pixelRatio / s) || 0 : (u + this.wrapper.scrollLeft) / this.wrapper.scrollWidth || 0, i.clamp(r, 0, 1)
259
+ }
260
+ }, {
261
+ key: "getProgressPixels",
262
+ value: function(e, t) {
263
+ return this.params.rtl ? e.right - t : t - e.left
264
+ }
265
+ }, {
266
+ key: "setupWrapperEvents",
267
+ value: function() {
268
+ var e = this;
269
+ this.wrapper.addEventListener("click", (function(t) {
270
+ var r = i.withOrientation(t, e.params.vertical),
271
+ n = e.wrapper.offsetHeight - e.wrapper.clientHeight;
272
+ if (0 !== n) {
273
+ var a = e.wrapper.getBoundingClientRect();
274
+ if (r.clientY >= a.bottom - n) return
275
+ }
276
+ e.params.interact && e.fireEvent("click", t, e.handleEvent(t))
277
+ })), this.wrapper.addEventListener("dblclick", (function(t) {
278
+ e.params.interact && e.fireEvent("dblclick", t, e.handleEvent(t))
279
+ })), this.wrapper.addEventListener("scroll", (function(t) {
280
+ return e.fireEvent("scroll", t)
281
+ }))
282
+ }
283
+ }, {
284
+ key: "drawPeaks",
285
+ value: function(e, t, r, n) {
286
+ this.setWidth(t) || this.clearWave(), this.params.barWidth ? this.drawBars(e, 0, r, n) : this.drawWave(e, 0, r, n)
287
+ }
288
+ }, {
289
+ key: "resetScroll",
290
+ value: function() {
291
+ null !== this.wrapper && (this.wrapper.scrollLeft = 0)
292
+ }
293
+ }, {
294
+ key: "recenter",
295
+ value: function(e) {
296
+ var t = this.wrapper.scrollWidth * e;
297
+ this.recenterOnPosition(t, !0)
298
+ }
299
+ }, {
300
+ key: "recenterOnPosition",
301
+ value: function(e, t) {
302
+ var r = this.wrapper.scrollLeft,
303
+ n = ~~(this.wrapper.clientWidth / 2),
304
+ i = this.wrapper.scrollWidth - this.wrapper.clientWidth,
305
+ a = e - n,
306
+ s = a - r;
307
+ if (0 != i) {
308
+ if (!t && -n <= s && s < n) {
309
+ var o = this.params.autoCenterRate;
310
+ o /= n, o *= i, a = r + (s = Math.max(-o, Math.min(o, s)))
311
+ }(a = Math.max(0, Math.min(i, a))) != r && (this.wrapper.scrollLeft = a)
312
+ }
313
+ }
314
+ }, {
315
+ key: "getScrollX",
316
+ value: function() {
317
+ var e = 0;
318
+ if (this.wrapper) {
319
+ var t = this.params.pixelRatio;
320
+ if (e = Math.round(this.wrapper.scrollLeft * t), this.params.scrollParent) {
321
+ var r = ~~(this.wrapper.scrollWidth * t - this.getWidth());
322
+ e = Math.min(r, Math.max(0, e))
323
+ }
324
+ }
325
+ return e
326
+ }
327
+ }, {
328
+ key: "getWidth",
329
+ value: function() {
330
+ return Math.round(this.container.clientWidth * this.params.pixelRatio)
331
+ }
332
+ }, {
333
+ key: "setWidth",
334
+ value: function(e) {
335
+ if (this.width == e) return !1;
336
+ if (this.width = e, this.params.fillParent || this.params.scrollParent) this.style(this.wrapper, {
337
+ width: ""
338
+ });
339
+ else {
340
+ var t = ~~(this.width / this.params.pixelRatio) + "px";
341
+ this.style(this.wrapper, {
342
+ width: t
343
+ })
344
+ }
345
+ return this.updateSize(), !0
346
+ }
347
+ }, {
348
+ key: "setHeight",
349
+ value: function(e) {
350
+ return e != this.height && (this.height = e, this.style(this.wrapper, {
351
+ height: ~~(this.height / this.params.pixelRatio) + "px"
352
+ }), this.updateSize(), !0)
353
+ }
354
+ }, {
355
+ key: "progress",
356
+ value: function(e) {
357
+ var t = 1 / this.params.pixelRatio,
358
+ r = Math.round(e * this.width) * t;
359
+ if (r < this.lastPos || r - this.lastPos >= t) {
360
+ if (this.lastPos = r, this.params.scrollParent && this.params.autoCenter) {
361
+ var n = ~~(this.wrapper.scrollWidth * e);
362
+ this.recenterOnPosition(n, this.params.autoCenterImmediately)
363
+ }
364
+ this.updateProgress(r)
365
+ }
366
+ }
367
+ }, {
368
+ key: "destroy",
369
+ value: function() {
370
+ this.unAll(), this.wrapper && (this.wrapper.parentNode == this.container.domElement && this.container.removeChild(this.wrapper.domElement), this.wrapper = null)
371
+ }
372
+ }, {
373
+ key: "updateCursor",
374
+ value: function() {}
375
+ }, {
376
+ key: "updateSize",
377
+ value: function() {}
378
+ }, {
379
+ key: "drawBars",
380
+ value: function(e, t, r, n) {}
381
+ }, {
382
+ key: "drawWave",
383
+ value: function(e, t, r, n) {}
384
+ }, {
385
+ key: "clearWave",
386
+ value: function() {}
387
+ }, {
388
+ key: "updateProgress",
389
+ value: function(e) {}
390
+ }]) && s(t.prototype, r), n && s(t, n), l
391
+ }(i.Observer);
392
+ t.default = f, e.exports = t.default
393
+ },
394
+ 646: (e, t, r) => {
395
+ "use strict";
396
+
397
+ function n(e) {
398
+ return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
399
+ return typeof e
400
+ } : function(e) {
401
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
402
+ })(e)
403
+ }
404
+ Object.defineProperty(t, "__esModule", {
405
+ value: !0
406
+ }), t.default = void 0;
407
+ var i = u(r(276)),
408
+ a = function(e, t) {
409
+ if (!t && e && e.__esModule) return e;
410
+ if (null === e || "object" !== n(e) && "function" != typeof e) return {
411
+ default: e
412
+ };
413
+ var r = o(t);
414
+ if (r && r.has(e)) return r.get(e);
415
+ var i = {},
416
+ a = Object.defineProperty && Object.getOwnPropertyDescriptor;
417
+ for (var s in e)
418
+ if ("default" !== s && Object.prototype.hasOwnProperty.call(e, s)) {
419
+ var u = a ? Object.getOwnPropertyDescriptor(e, s) : null;
420
+ u && (u.get || u.set) ? Object.defineProperty(i, s, u) : i[s] = e[s]
421
+ } return i.default = e, r && r.set(e, i), i
422
+ }(r(241)),
423
+ s = u(r(427));
424
+
425
+ function o(e) {
426
+ if ("function" != typeof WeakMap) return null;
427
+ var t = new WeakMap,
428
+ r = new WeakMap;
429
+ return (o = function(e) {
430
+ return e ? r : t
431
+ })(e)
432
+ }
433
+
434
+ function u(e) {
435
+ return e && e.__esModule ? e : {
436
+ default: e
437
+ }
438
+ }
439
+
440
+ function l(e, t) {
441
+ for (var r = 0; r < t.length; r++) {
442
+ var n = t[r];
443
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
444
+ }
445
+ }
446
+
447
+ function c(e, t) {
448
+ return (c = Object.setPrototypeOf || function(e, t) {
449
+ return e.__proto__ = t, e
450
+ })(e, t)
451
+ }
452
+
453
+ function f(e) {
454
+ var t = function() {
455
+ if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
456
+ if (Reflect.construct.sham) return !1;
457
+ if ("function" == typeof Proxy) return !0;
458
+ try {
459
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
460
+ } catch (e) {
461
+ return !1
462
+ }
463
+ }();
464
+ return function() {
465
+ var r, n = d(e);
466
+ if (t) {
467
+ var i = d(this).constructor;
468
+ r = Reflect.construct(n, arguments, i)
469
+ } else r = n.apply(this, arguments);
470
+ return h(this, r)
471
+ }
472
+ }
473
+
474
+ function h(e, t) {
475
+ if (t && ("object" === n(t) || "function" == typeof t)) return t;
476
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
477
+ return function(e) {
478
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
479
+ return e
480
+ }(e)
481
+ }
482
+
483
+ function d(e) {
484
+ return (d = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
485
+ return e.__proto__ || Object.getPrototypeOf(e)
486
+ })(e)
487
+ }
488
+ var p = function(e) {
489
+ ! function(e, t) {
490
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
491
+ e.prototype = Object.create(t && t.prototype, {
492
+ constructor: {
493
+ value: e,
494
+ writable: !0,
495
+ configurable: !0
496
+ }
497
+ }), t && c(e, t)
498
+ }(o, e);
499
+ var t, r, n, i = f(o);
500
+
501
+ function o(e, t) {
502
+ var r;
503
+ return function(e, t) {
504
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
505
+ }(this, o), (r = i.call(this, e, t)).maxCanvasWidth = t.maxCanvasWidth, r.maxCanvasElementWidth = Math.round(t.maxCanvasWidth / t.pixelRatio), r.hasProgressCanvas = t.waveColor != t.progressColor, r.halfPixel = .5 / t.pixelRatio, r.canvases = [], r.progressWave = null, r.EntryClass = s.default, r.canvasContextAttributes = t.drawingContextAttributes, r.overlap = 2 * Math.ceil(t.pixelRatio / 2), r.barRadius = t.barRadius || 0, r.vertical = t.vertical, r
506
+ }
507
+ return t = o, (r = [{
508
+ key: "init",
509
+ value: function() {
510
+ this.createWrapper(), this.createElements()
511
+ }
512
+ }, {
513
+ key: "createElements",
514
+ value: function() {
515
+ this.progressWave = a.withOrientation(this.wrapper.appendChild(document.createElement("wave")), this.params.vertical), this.style(this.progressWave, {
516
+ position: "absolute",
517
+ zIndex: 3,
518
+ left: 0,
519
+ top: 0,
520
+ bottom: 0,
521
+ overflow: "hidden",
522
+ width: "0",
523
+ display: "none",
524
+ boxSizing: "border-box",
525
+ borderRightStyle: "solid",
526
+ pointerEvents: "none"
527
+ }), this.addCanvas(), this.updateCursor()
528
+ }
529
+ }, {
530
+ key: "updateCursor",
531
+ value: function() {
532
+ this.style(this.progressWave, {
533
+ borderRightWidth: this.params.cursorWidth + "px",
534
+ borderRightColor: this.params.cursorColor
535
+ })
536
+ }
537
+ }, {
538
+ key: "updateSize",
539
+ value: function() {
540
+ for (var e = this, t = Math.round(this.width / this.params.pixelRatio), r = Math.ceil(t / (this.maxCanvasElementWidth + this.overlap)); this.canvases.length < r;) this.addCanvas();
541
+ for (; this.canvases.length > r;) this.removeCanvas();
542
+ var n = this.maxCanvasWidth + this.overlap,
543
+ i = this.canvases.length - 1;
544
+ this.canvases.forEach((function(t, r) {
545
+ r == i && (n = e.width - e.maxCanvasWidth * i), e.updateDimensions(t, n, e.height), t.clearWave()
546
+ }))
547
+ }
548
+ }, {
549
+ key: "addCanvas",
550
+ value: function() {
551
+ var e = new this.EntryClass;
552
+ e.canvasContextAttributes = this.canvasContextAttributes, e.hasProgressCanvas = this.hasProgressCanvas, e.halfPixel = this.halfPixel;
553
+ var t = this.maxCanvasElementWidth * this.canvases.length,
554
+ r = a.withOrientation(this.wrapper.appendChild(document.createElement("canvas")), this.params.vertical);
555
+ if (this.style(r, {
556
+ position: "absolute",
557
+ zIndex: 2,
558
+ left: t + "px",
559
+ top: 0,
560
+ bottom: 0,
561
+ height: "100%",
562
+ pointerEvents: "none"
563
+ }), e.initWave(r), this.hasProgressCanvas) {
564
+ var n = a.withOrientation(this.progressWave.appendChild(document.createElement("canvas")), this.params.vertical);
565
+ this.style(n, {
566
+ position: "absolute",
567
+ left: t + "px",
568
+ top: 0,
569
+ bottom: 0,
570
+ height: "100%"
571
+ }), e.initProgress(n)
572
+ }
573
+ this.canvases.push(e)
574
+ }
575
+ }, {
576
+ key: "removeCanvas",
577
+ value: function() {
578
+ var e = this.canvases[this.canvases.length - 1];
579
+ e.wave.parentElement.removeChild(e.wave.domElement), this.hasProgressCanvas && e.progress.parentElement.removeChild(e.progress.domElement), e && (e.destroy(), e = null), this.canvases.pop()
580
+ }
581
+ }, {
582
+ key: "updateDimensions",
583
+ value: function(e, t, r) {
584
+ var n = Math.round(t / this.params.pixelRatio),
585
+ i = Math.round(this.width / this.params.pixelRatio);
586
+ e.updateDimensions(n, i, t, r), this.style(this.progressWave, {
587
+ display: "block"
588
+ })
589
+ }
590
+ }, {
591
+ key: "clearWave",
592
+ value: function() {
593
+ var e = this;
594
+ a.frame((function() {
595
+ e.canvases.forEach((function(e) {
596
+ return e.clearWave()
597
+ }))
598
+ }))()
599
+ }
600
+ }, {
601
+ key: "drawBars",
602
+ value: function(e, t, r, n) {
603
+ var i = this;
604
+ return this.prepareDraw(e, t, r, n, (function(e) {
605
+ var t = e.absmax,
606
+ a = e.hasMinVals,
607
+ s = (e.height, e.offsetY),
608
+ o = e.halfH,
609
+ u = e.peaks,
610
+ l = e.channelIndex;
611
+ if (void 0 !== r)
612
+ for (var c = a ? 2 : 1, f = u.length / c, h = i.params.barWidth * i.params.pixelRatio, d = h + (null === i.params.barGap ? Math.max(i.params.pixelRatio, ~~(h / 2)) : Math.max(i.params.pixelRatio, i.params.barGap * i.params.pixelRatio)), p = f / i.width, v = n, y = r; y < v; y += d) {
613
+ var m = u[Math.floor(y * p * c)] || 0,
614
+ b = Math.round(m / t * o);
615
+ 0 == b && i.params.barMinHeight && (b = i.params.barMinHeight), i.fillRect(y + i.halfPixel, o - b + s, h + i.halfPixel, 2 * b, i.barRadius, l)
616
+ }
617
+ }))
618
+ }
619
+ }, {
620
+ key: "drawWave",
621
+ value: function(e, t, r, n) {
622
+ var i = this;
623
+ return this.prepareDraw(e, t, r, n, (function(e) {
624
+ var t = e.absmax,
625
+ a = e.hasMinVals,
626
+ s = (e.height, e.offsetY),
627
+ o = e.halfH,
628
+ u = e.peaks,
629
+ l = e.channelIndex;
630
+ if (!a) {
631
+ for (var c = [], f = u.length, h = 0; h < f; h++) c[2 * h] = u[h], c[2 * h + 1] = -u[h];
632
+ u = c
633
+ }
634
+ void 0 !== r && i.drawLine(u, t, o, s, r, n, l), i.fillRect(0, o + s - i.halfPixel, i.width, i.halfPixel, i.barRadius, l)
635
+ }))
636
+ }
637
+ }, {
638
+ key: "drawLine",
639
+ value: function(e, t, r, n, i, a, s) {
640
+ var o = this,
641
+ u = this.params.splitChannelsOptions.channelColors[s] || {},
642
+ l = u.waveColor,
643
+ c = u.progressColor;
644
+ this.canvases.forEach((function(s, u) {
645
+ o.setFillStyles(s, l, c), o.applyCanvasTransforms(s, o.params.vertical), s.drawLines(e, t, r, n, i, a)
646
+ }))
647
+ }
648
+ }, {
649
+ key: "fillRect",
650
+ value: function(e, t, r, n, i, a) {
651
+ for (var s = Math.floor(e / this.maxCanvasWidth), o = Math.min(Math.ceil((e + r) / this.maxCanvasWidth) + 1, this.canvases.length), u = s; u < o; u++) {
652
+ var l = this.canvases[u],
653
+ c = u * this.maxCanvasWidth,
654
+ f = {
655
+ x1: Math.max(e, u * this.maxCanvasWidth),
656
+ y1: t,
657
+ x2: Math.min(e + r, u * this.maxCanvasWidth + l.wave.width),
658
+ y2: t + n
659
+ };
660
+ if (f.x1 < f.x2) {
661
+ var h = this.params.splitChannelsOptions.channelColors[a] || {},
662
+ d = h.waveColor,
663
+ p = h.progressColor;
664
+ this.setFillStyles(l, d, p), this.applyCanvasTransforms(l, this.params.vertical), l.fillRects(f.x1 - c, f.y1, f.x2 - f.x1, f.y2 - f.y1, i)
665
+ }
666
+ }
667
+ }
668
+ }, {
669
+ key: "hideChannel",
670
+ value: function(e) {
671
+ return this.params.splitChannels && this.params.splitChannelsOptions.filterChannels.includes(e)
672
+ }
673
+ }, {
674
+ key: "prepareDraw",
675
+ value: function(e, t, r, n, i, s, o) {
676
+ var u = this;
677
+ return a.frame((function() {
678
+ if (e[0] instanceof Array) {
679
+ var l = e;
680
+ if (u.params.splitChannels) {
681
+ var c, f = l.filter((function(e, t) {
682
+ return !u.hideChannel(t)
683
+ }));
684
+ return u.params.splitChannelsOptions.overlay || u.setHeight(Math.max(f.length, 1) * u.params.height * u.params.pixelRatio), u.params.splitChannelsOptions && u.params.splitChannelsOptions.relativeNormalization && (c = a.max(l.map((function(e) {
685
+ return a.absMax(e)
686
+ })))), l.forEach((function(e, t) {
687
+ return u.prepareDraw(e, t, r, n, i, f.indexOf(e), c)
688
+ }))
689
+ }
690
+ e = l[0]
691
+ }
692
+ if (!u.hideChannel(t)) {
693
+ var h = 1 / u.params.barHeight;
694
+ u.params.normalize && (h = void 0 === o ? a.absMax(e) : o);
695
+ var d = [].some.call(e, (function(e) {
696
+ return e < 0
697
+ })),
698
+ p = u.params.height * u.params.pixelRatio,
699
+ v = p / 2,
700
+ y = p * s || 0;
701
+ return u.params.splitChannelsOptions && u.params.splitChannelsOptions.overlay && (y = 0), i({
702
+ absmax: h,
703
+ hasMinVals: d,
704
+ height: p,
705
+ offsetY: y,
706
+ halfH: v,
707
+ peaks: e,
708
+ channelIndex: t
709
+ })
710
+ }
711
+ }))()
712
+ }
713
+ }, {
714
+ key: "setFillStyles",
715
+ value: function(e) {
716
+ var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.params.waveColor,
717
+ r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.params.progressColor;
718
+ e.setFillStyles(t, r)
719
+ }
720
+ }, {
721
+ key: "applyCanvasTransforms",
722
+ value: function(e) {
723
+ var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
724
+ e.applyCanvasTransforms(t)
725
+ }
726
+ }, {
727
+ key: "getImage",
728
+ value: function(e, t, r) {
729
+ if ("blob" === r) return Promise.all(this.canvases.map((function(n) {
730
+ return n.getImage(e, t, r)
731
+ })));
732
+ if ("dataURL" === r) {
733
+ var n = this.canvases.map((function(n) {
734
+ return n.getImage(e, t, r)
735
+ }));
736
+ return n.length > 1 ? n : n[0]
737
+ }
738
+ }
739
+ }, {
740
+ key: "updateProgress",
741
+ value: function(e) {
742
+ this.style(this.progressWave, {
743
+ width: e + "px"
744
+ })
745
+ }
746
+ }]) && l(t.prototype, r), n && l(t, n), o
747
+ }(i.default);
748
+ t.default = p, e.exports = t.default
749
+ },
750
+ 328: (e, t, r) => {
751
+ "use strict";
752
+
753
+ function n(e) {
754
+ return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
755
+ return typeof e
756
+ } : function(e) {
757
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
758
+ })(e)
759
+ }
760
+ var i;
761
+
762
+ function a(e, t) {
763
+ for (var r = 0; r < t.length; r++) {
764
+ var n = t[r];
765
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
766
+ }
767
+ }
768
+
769
+ function s(e, t, r) {
770
+ return (s = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(e, t, r) {
771
+ var n = function(e, t) {
772
+ for (; !Object.prototype.hasOwnProperty.call(e, t) && null !== (e = c(e)););
773
+ return e
774
+ }(e, t);
775
+ if (n) {
776
+ var i = Object.getOwnPropertyDescriptor(n, t);
777
+ return i.get ? i.get.call(r) : i.value
778
+ }
779
+ })(e, t, r || e)
780
+ }
781
+
782
+ function o(e, t) {
783
+ return (o = Object.setPrototypeOf || function(e, t) {
784
+ return e.__proto__ = t, e
785
+ })(e, t)
786
+ }
787
+
788
+ function u(e) {
789
+ var t = function() {
790
+ if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
791
+ if (Reflect.construct.sham) return !1;
792
+ if ("function" == typeof Proxy) return !0;
793
+ try {
794
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
795
+ } catch (e) {
796
+ return !1
797
+ }
798
+ }();
799
+ return function() {
800
+ var r, n = c(e);
801
+ if (t) {
802
+ var i = c(this).constructor;
803
+ r = Reflect.construct(n, arguments, i)
804
+ } else r = n.apply(this, arguments);
805
+ return l(this, r)
806
+ }
807
+ }
808
+
809
+ function l(e, t) {
810
+ if (t && ("object" === n(t) || "function" == typeof t)) return t;
811
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
812
+ return function(e) {
813
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
814
+ return e
815
+ }(e)
816
+ }
817
+
818
+ function c(e) {
819
+ return (c = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
820
+ return e.__proto__ || Object.getPrototypeOf(e)
821
+ })(e)
822
+ }
823
+ Object.defineProperty(t, "__esModule", {
824
+ value: !0
825
+ }), t.default = void 0;
826
+ var f = function(e) {
827
+ ! function(e, t) {
828
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
829
+ e.prototype = Object.create(t && t.prototype, {
830
+ constructor: {
831
+ value: e,
832
+ writable: !0,
833
+ configurable: !0
834
+ }
835
+ }), t && o(e, t)
836
+ }(l, e);
837
+ var t, r, n, i = u(l);
838
+
839
+ function l(e) {
840
+ var t;
841
+ return function(e, t) {
842
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
843
+ }(this, l), (t = i.call(this, e)).params = e, t.sourceMediaElement = null, t
844
+ }
845
+ return t = l, (r = [{
846
+ key: "init",
847
+ value: function() {
848
+ this.setPlaybackRate(this.params.audioRate), this.createTimer(), this.createVolumeNode(), this.createScriptNode(), this.createAnalyserNode()
849
+ }
850
+ }, {
851
+ key: "_load",
852
+ value: function(e, t, r) {
853
+ s(c(l.prototype), "_load", this).call(this, e, t, r), this.createMediaElementSource(e)
854
+ }
855
+ }, {
856
+ key: "createMediaElementSource",
857
+ value: function(e) {
858
+ this.sourceMediaElement = this.ac.createMediaElementSource(e), this.sourceMediaElement.connect(this.analyser)
859
+ }
860
+ }, {
861
+ key: "play",
862
+ value: function(e, t) {
863
+ return this.resumeAudioContext(), s(c(l.prototype), "play", this).call(this, e, t)
864
+ }
865
+ }, {
866
+ key: "destroy",
867
+ value: function() {
868
+ s(c(l.prototype), "destroy", this).call(this), this.destroyWebAudio()
869
+ }
870
+ }]) && a(t.prototype, r), n && a(t, n), l
871
+ }(((i = r(743)) && i.__esModule ? i : {
872
+ default: i
873
+ }).default);
874
+ t.default = f, e.exports = t.default
875
+ },
876
+ 743: (e, t, r) => {
877
+ "use strict";
878
+
879
+ function n(e) {
880
+ return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
881
+ return typeof e
882
+ } : function(e) {
883
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
884
+ })(e)
885
+ }
886
+ Object.defineProperty(t, "__esModule", {
887
+ value: !0
888
+ }), t.default = void 0;
889
+ var i, a = (i = r(379)) && i.__esModule ? i : {
890
+ default: i
891
+ },
892
+ s = function(e, t) {
893
+ if (!t && e && e.__esModule) return e;
894
+ if (null === e || "object" !== n(e) && "function" != typeof e) return {
895
+ default: e
896
+ };
897
+ var r = o(t);
898
+ if (r && r.has(e)) return r.get(e);
899
+ var i = {},
900
+ a = Object.defineProperty && Object.getOwnPropertyDescriptor;
901
+ for (var s in e)
902
+ if ("default" !== s && Object.prototype.hasOwnProperty.call(e, s)) {
903
+ var u = a ? Object.getOwnPropertyDescriptor(e, s) : null;
904
+ u && (u.get || u.set) ? Object.defineProperty(i, s, u) : i[s] = e[s]
905
+ } return i.default = e, r && r.set(e, i), i
906
+ }(r(241));
907
+
908
+ function o(e) {
909
+ if ("function" != typeof WeakMap) return null;
910
+ var t = new WeakMap,
911
+ r = new WeakMap;
912
+ return (o = function(e) {
913
+ return e ? r : t
914
+ })(e)
915
+ }
916
+
917
+ function u(e, t) {
918
+ for (var r = 0; r < t.length; r++) {
919
+ var n = t[r];
920
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
921
+ }
922
+ }
923
+
924
+ function l(e, t, r) {
925
+ return (l = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(e, t, r) {
926
+ var n = function(e, t) {
927
+ for (; !Object.prototype.hasOwnProperty.call(e, t) && null !== (e = d(e)););
928
+ return e
929
+ }(e, t);
930
+ if (n) {
931
+ var i = Object.getOwnPropertyDescriptor(n, t);
932
+ return i.get ? i.get.call(r) : i.value
933
+ }
934
+ })(e, t, r || e)
935
+ }
936
+
937
+ function c(e, t) {
938
+ return (c = Object.setPrototypeOf || function(e, t) {
939
+ return e.__proto__ = t, e
940
+ })(e, t)
941
+ }
942
+
943
+ function f(e) {
944
+ var t = function() {
945
+ if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
946
+ if (Reflect.construct.sham) return !1;
947
+ if ("function" == typeof Proxy) return !0;
948
+ try {
949
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
950
+ } catch (e) {
951
+ return !1
952
+ }
953
+ }();
954
+ return function() {
955
+ var r, n = d(e);
956
+ if (t) {
957
+ var i = d(this).constructor;
958
+ r = Reflect.construct(n, arguments, i)
959
+ } else r = n.apply(this, arguments);
960
+ return h(this, r)
961
+ }
962
+ }
963
+
964
+ function h(e, t) {
965
+ if (t && ("object" === n(t) || "function" == typeof t)) return t;
966
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
967
+ return function(e) {
968
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
969
+ return e
970
+ }(e)
971
+ }
972
+
973
+ function d(e) {
974
+ return (d = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
975
+ return e.__proto__ || Object.getPrototypeOf(e)
976
+ })(e)
977
+ }
978
+ var p = function(e) {
979
+ ! function(e, t) {
980
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
981
+ e.prototype = Object.create(t && t.prototype, {
982
+ constructor: {
983
+ value: e,
984
+ writable: !0,
985
+ configurable: !0
986
+ }
987
+ }), t && c(e, t)
988
+ }(a, e);
989
+ var t, r, n, i = f(a);
990
+
991
+ function a(e) {
992
+ var t;
993
+ return function(e, t) {
994
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
995
+ }(this, a), (t = i.call(this, e)).params = e, t.media = {
996
+ currentTime: 0,
997
+ duration: 0,
998
+ paused: !0,
999
+ playbackRate: 1,
1000
+ play: function() {},
1001
+ pause: function() {},
1002
+ volume: 0
1003
+ }, t.mediaType = e.mediaType.toLowerCase(), t.elementPosition = e.elementPosition, t.peaks = null, t.playbackRate = 1, t.volume = 1, t.isMuted = !1, t.buffer = null, t.onPlayEnd = null, t.mediaListeners = {}, t
1004
+ }
1005
+ return t = a, (r = [{
1006
+ key: "init",
1007
+ value: function() {
1008
+ this.setPlaybackRate(this.params.audioRate), this.createTimer()
1009
+ }
1010
+ }, {
1011
+ key: "_setupMediaListeners",
1012
+ value: function() {
1013
+ var e = this;
1014
+ this.mediaListeners.error = function() {
1015
+ e.fireEvent("error", "Error loading media element")
1016
+ }, this.mediaListeners.canplay = function() {
1017
+ e.fireEvent("canplay")
1018
+ }, this.mediaListeners.ended = function() {
1019
+ e.fireEvent("finish")
1020
+ }, this.mediaListeners.play = function() {
1021
+ e.fireEvent("play")
1022
+ }, this.mediaListeners.pause = function() {
1023
+ e.fireEvent("pause")
1024
+ }, this.mediaListeners.seeked = function(t) {
1025
+ e.fireEvent("seek")
1026
+ }, this.mediaListeners.volumechange = function(t) {
1027
+ e.isMuted = e.media.muted, e.isMuted ? e.volume = 0 : e.volume = e.media.volume, e.fireEvent("volume")
1028
+ }, Object.keys(this.mediaListeners).forEach((function(t) {
1029
+ e.media.removeEventListener(t, e.mediaListeners[t]), e.media.addEventListener(t, e.mediaListeners[t])
1030
+ }))
1031
+ }
1032
+ }, {
1033
+ key: "createTimer",
1034
+ value: function() {
1035
+ var e = this;
1036
+ this.on("play", (function t() {
1037
+ e.isPaused() || (e.fireEvent("audioprocess", e.getCurrentTime()), s.frame(t)())
1038
+ })), this.on("pause", (function() {
1039
+ e.fireEvent("audioprocess", e.getCurrentTime())
1040
+ }))
1041
+ }
1042
+ }, {
1043
+ key: "load",
1044
+ value: function(e, t, r, n) {
1045
+ var i = document.createElement(this.mediaType);
1046
+ i.controls = this.params.mediaControls, i.autoplay = this.params.autoplay || !1, i.preload = null == n ? "auto" : n, i.src = e, i.style.width = "100%";
1047
+ var a = t.querySelector(this.mediaType);
1048
+ a && t.removeChild(a), t.appendChild(i), this._load(i, r, n)
1049
+ }
1050
+ }, {
1051
+ key: "loadElt",
1052
+ value: function(e, t) {
1053
+ e.controls = this.params.mediaControls, e.autoplay = this.params.autoplay || !1, this._load(e, t, e.preload)
1054
+ }
1055
+ }, {
1056
+ key: "_load",
1057
+ value: function(e, t, r) {
1058
+ if (!(e instanceof HTMLMediaElement) || void 0 === e.addEventListener) throw new Error("media parameter is not a valid media element");
1059
+ "function" != typeof e.load || t && "none" == r || e.load(), this.media = e, this._setupMediaListeners(), this.peaks = t, this.onPlayEnd = null, this.buffer = null, this.isMuted = e.muted, this.setPlaybackRate(this.playbackRate), this.setVolume(this.volume)
1060
+ }
1061
+ }, {
1062
+ key: "isPaused",
1063
+ value: function() {
1064
+ return !this.media || this.media.paused
1065
+ }
1066
+ }, {
1067
+ key: "getDuration",
1068
+ value: function() {
1069
+ if (this.explicitDuration) return this.explicitDuration;
1070
+ var e = (this.buffer || this.media).duration;
1071
+ return e >= 1 / 0 && (e = this.media.seekable.end(0)), e
1072
+ }
1073
+ }, {
1074
+ key: "getCurrentTime",
1075
+ value: function() {
1076
+ return this.media && this.media.currentTime
1077
+ }
1078
+ }, {
1079
+ key: "getPlayedPercents",
1080
+ value: function() {
1081
+ return this.getCurrentTime() / this.getDuration() || 0
1082
+ }
1083
+ }, {
1084
+ key: "getPlaybackRate",
1085
+ value: function() {
1086
+ return this.playbackRate || this.media.playbackRate
1087
+ }
1088
+ }, {
1089
+ key: "setPlaybackRate",
1090
+ value: function(e) {
1091
+ this.playbackRate = e || 1, this.media.playbackRate = this.playbackRate
1092
+ }
1093
+ }, {
1094
+ key: "seekTo",
1095
+ value: function(e) {
1096
+ null != e && (this.media.currentTime = e), this.clearPlayEnd()
1097
+ }
1098
+ }, {
1099
+ key: "play",
1100
+ value: function(e, t) {
1101
+ this.seekTo(e);
1102
+ var r = this.media.play();
1103
+ return t && this.setPlayEnd(t), r
1104
+ }
1105
+ }, {
1106
+ key: "pause",
1107
+ value: function() {
1108
+ var e;
1109
+ return this.media && (e = this.media.pause()), this.clearPlayEnd(), e
1110
+ }
1111
+ }, {
1112
+ key: "setPlayEnd",
1113
+ value: function(e) {
1114
+ var t = this;
1115
+ this.clearPlayEnd(), this._onPlayEnd = function(r) {
1116
+ r >= e && (t.pause(), t.seekTo(e))
1117
+ }, this.on("audioprocess", this._onPlayEnd)
1118
+ }
1119
+ }, {
1120
+ key: "clearPlayEnd",
1121
+ value: function() {
1122
+ this._onPlayEnd && (this.un("audioprocess", this._onPlayEnd), this._onPlayEnd = null)
1123
+ }
1124
+ }, {
1125
+ key: "getPeaks",
1126
+ value: function(e, t, r) {
1127
+ return this.buffer ? l(d(a.prototype), "getPeaks", this).call(this, e, t, r) : this.peaks || []
1128
+ }
1129
+ }, {
1130
+ key: "setSinkId",
1131
+ value: function(e) {
1132
+ return e ? this.media.setSinkId ? this.media.setSinkId(e) : Promise.reject(new Error("setSinkId is not supported in your browser")) : Promise.reject(new Error("Invalid deviceId: " + e))
1133
+ }
1134
+ }, {
1135
+ key: "getVolume",
1136
+ value: function() {
1137
+ return this.volume
1138
+ }
1139
+ }, {
1140
+ key: "setVolume",
1141
+ value: function(e) {
1142
+ this.volume = e, this.media.volume !== this.volume && (this.media.volume = this.volume)
1143
+ }
1144
+ }, {
1145
+ key: "setMute",
1146
+ value: function(e) {
1147
+ this.isMuted = this.media.muted = e
1148
+ }
1149
+ }, {
1150
+ key: "destroy",
1151
+ value: function() {
1152
+ var e = this;
1153
+ this.pause(), this.unAll(), this.destroyed = !0, Object.keys(this.mediaListeners).forEach((function(t) {
1154
+ e.media && e.media.removeEventListener(t, e.mediaListeners[t])
1155
+ })), this.params.removeMediaElementOnDestroy && this.media && this.media.parentNode && this.media.parentNode.removeChild(this.media), this.media = null
1156
+ }
1157
+ }]) && u(t.prototype, r), n && u(t, n), a
1158
+ }(a.default);
1159
+ t.default = p, e.exports = t.default
1160
+ },
1161
+ 227: (e, t) => {
1162
+ "use strict";
1163
+
1164
+ function r(e, t) {
1165
+ for (var r = 0; r < t.length; r++) {
1166
+ var n = t[r];
1167
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
1168
+ }
1169
+ }
1170
+ Object.defineProperty(t, "__esModule", {
1171
+ value: !0
1172
+ }), t.default = void 0;
1173
+ var n = function() {
1174
+ function e() {
1175
+ ! function(e, t) {
1176
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
1177
+ }(this, e), this.clearPeakCache()
1178
+ }
1179
+ var t, n, i;
1180
+ return t = e, (n = [{
1181
+ key: "clearPeakCache",
1182
+ value: function() {
1183
+ this.peakCacheRanges = [], this.peakCacheLength = -1
1184
+ }
1185
+ }, {
1186
+ key: "addRangeToPeakCache",
1187
+ value: function(e, t, r) {
1188
+ e != this.peakCacheLength && (this.clearPeakCache(), this.peakCacheLength = e);
1189
+ for (var n = [], i = 0; i < this.peakCacheRanges.length && this.peakCacheRanges[i] < t;) i++;
1190
+ for (i % 2 == 0 && n.push(t); i < this.peakCacheRanges.length && this.peakCacheRanges[i] <= r;) n.push(this.peakCacheRanges[i]), i++;
1191
+ i % 2 == 0 && n.push(r), n = n.filter((function(e, t, r) {
1192
+ return 0 == t ? e != r[t + 1] : t == r.length - 1 ? e != r[t - 1] : e != r[t - 1] && e != r[t + 1]
1193
+ })), this.peakCacheRanges = this.peakCacheRanges.concat(n), this.peakCacheRanges = this.peakCacheRanges.sort((function(e, t) {
1194
+ return e - t
1195
+ })).filter((function(e, t, r) {
1196
+ return 0 == t ? e != r[t + 1] : t == r.length - 1 ? e != r[t - 1] : e != r[t - 1] && e != r[t + 1]
1197
+ }));
1198
+ var a = [];
1199
+ for (i = 0; i < n.length; i += 2) a.push([n[i], n[i + 1]]);
1200
+ return a
1201
+ }
1202
+ }, {
1203
+ key: "getCacheRanges",
1204
+ value: function() {
1205
+ var e, t = [];
1206
+ for (e = 0; e < this.peakCacheRanges.length; e += 2) t.push([this.peakCacheRanges[e], this.peakCacheRanges[e + 1]]);
1207
+ return t
1208
+ }
1209
+ }]) && r(t.prototype, n), i && r(t, i), e
1210
+ }();
1211
+ t.default = n, e.exports = t.default
1212
+ },
1213
+ 765: (e, t, r) => {
1214
+ "use strict";
1215
+ Object.defineProperty(t, "__esModule", {
1216
+ value: !0
1217
+ }), t.default = function(e) {
1218
+ var t = (0, n.default)(e),
1219
+ r = (0, i.default)(e);
1220
+ return -r > t ? -r : t
1221
+ };
1222
+ var n = a(r(178)),
1223
+ i = a(r(706));
1224
+
1225
+ function a(e) {
1226
+ return e && e.__esModule ? e : {
1227
+ default: e
1228
+ }
1229
+ }
1230
+ e.exports = t.default
1231
+ },
1232
+ 694: (e, t) => {
1233
+ "use strict";
1234
+ Object.defineProperty(t, "__esModule", {
1235
+ value: !0
1236
+ }), t.default = function(e, t, r) {
1237
+ return Math.min(Math.max(t, e), r)
1238
+ }, e.exports = t.default
1239
+ },
1240
+ 342: (e, t, r) => {
1241
+ "use strict";
1242
+ Object.defineProperty(t, "__esModule", {
1243
+ value: !0
1244
+ }), t.default = function(e) {
1245
+ if (!e) throw new Error("fetch options missing");
1246
+ if (!e.url) throw new Error("fetch url missing");
1247
+ var t = new i.default,
1248
+ r = new Headers,
1249
+ n = new Request(e.url);
1250
+ t.controller = new AbortController, e && e.requestHeaders && e.requestHeaders.forEach((function(e) {
1251
+ r.append(e.key, e.value)
1252
+ }));
1253
+ var a = e.responseType || "json",
1254
+ o = {
1255
+ method: e.method || "GET",
1256
+ headers: r,
1257
+ mode: e.mode || "cors",
1258
+ credentials: e.credentials || "same-origin",
1259
+ cache: e.cache || "default",
1260
+ redirect: e.redirect || "follow",
1261
+ referrer: e.referrer || "client",
1262
+ signal: t.controller.signal
1263
+ };
1264
+ return fetch(n, o).then((function(e) {
1265
+ t.response = e;
1266
+ var r = !0;
1267
+ e.body || (r = !1);
1268
+ var n = e.headers.get("content-length");
1269
+ return null === n && (r = !1), r ? (t.onProgress = function(e) {
1270
+ t.fireEvent("progress", e)
1271
+ }, new Response(new ReadableStream(new s(t, n, e)), o)) : e
1272
+ })).then((function(e) {
1273
+ var t;
1274
+ if (e.ok) switch (a) {
1275
+ case "arraybuffer":
1276
+ return e.arrayBuffer();
1277
+ case "json":
1278
+ return e.json();
1279
+ case "blob":
1280
+ return e.blob();
1281
+ case "text":
1282
+ return e.text();
1283
+ default:
1284
+ t = "Unknown responseType: " + a
1285
+ }
1286
+ throw t || (t = "HTTP error status: " + e.status), new Error(t)
1287
+ })).then((function(e) {
1288
+ t.fireEvent("success", e)
1289
+ })).catch((function(e) {
1290
+ t.fireEvent("error", e)
1291
+ })), t.fetchRequest = n, t
1292
+ };
1293
+ var n, i = (n = r(399)) && n.__esModule ? n : {
1294
+ default: n
1295
+ };
1296
+
1297
+ function a(e, t) {
1298
+ for (var r = 0; r < t.length; r++) {
1299
+ var n = t[r];
1300
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
1301
+ }
1302
+ }
1303
+ var s = function() {
1304
+ function e(t, r, n) {
1305
+ ! function(e, t) {
1306
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
1307
+ }(this, e), this.instance = t, this.instance._reader = n.body.getReader(), this.total = parseInt(r, 10), this.loaded = 0
1308
+ }
1309
+ var t, r, n;
1310
+ return t = e, (r = [{
1311
+ key: "start",
1312
+ value: function(e) {
1313
+ var t = this;
1314
+ ! function r() {
1315
+ t.instance._reader.read().then((function(n) {
1316
+ var i = n.done,
1317
+ a = n.value;
1318
+ if (i) return 0 === t.total && t.instance.onProgress.call(t.instance, {
1319
+ loaded: t.loaded,
1320
+ total: t.total,
1321
+ lengthComputable: !1
1322
+ }), void e.close();
1323
+ t.loaded += a.byteLength, t.instance.onProgress.call(t.instance, {
1324
+ loaded: t.loaded,
1325
+ total: t.total,
1326
+ lengthComputable: !(0 === t.total)
1327
+ }), e.enqueue(a), r()
1328
+ })).catch((function(t) {
1329
+ e.error(t)
1330
+ }))
1331
+ }()
1332
+ }
1333
+ }]) && a(t.prototype, r), n && a(t, n), e
1334
+ }();
1335
+ e.exports = t.default
1336
+ },
1337
+ 412: (e, t, r) => {
1338
+ "use strict";
1339
+ Object.defineProperty(t, "__esModule", {
1340
+ value: !0
1341
+ }), t.default = function(e) {
1342
+ return function() {
1343
+ for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++) r[n] = arguments[n];
1344
+ return (0, i.default)((function() {
1345
+ return e.apply(void 0, r)
1346
+ }))
1347
+ }
1348
+ };
1349
+ var n, i = (n = r(779)) && n.__esModule ? n : {
1350
+ default: n
1351
+ };
1352
+ e.exports = t.default
1353
+ },
1354
+ 56: (e, t) => {
1355
+ "use strict";
1356
+ Object.defineProperty(t, "__esModule", {
1357
+ value: !0
1358
+ }), t.default = function(e) {
1359
+ return void 0 === e && (e = "wavesurfer_"), e + Math.random().toString(32).substring(2)
1360
+ }, e.exports = t.default
1361
+ },
1362
+ 241: (e, t, r) => {
1363
+ "use strict";
1364
+ Object.defineProperty(t, "__esModule", {
1365
+ value: !0
1366
+ }), Object.defineProperty(t, "getId", {
1367
+ enumerable: !0,
1368
+ get: function() {
1369
+ return n.default
1370
+ }
1371
+ }), Object.defineProperty(t, "max", {
1372
+ enumerable: !0,
1373
+ get: function() {
1374
+ return i.default
1375
+ }
1376
+ }), Object.defineProperty(t, "min", {
1377
+ enumerable: !0,
1378
+ get: function() {
1379
+ return a.default
1380
+ }
1381
+ }), Object.defineProperty(t, "absMax", {
1382
+ enumerable: !0,
1383
+ get: function() {
1384
+ return s.default
1385
+ }
1386
+ }), Object.defineProperty(t, "Observer", {
1387
+ enumerable: !0,
1388
+ get: function() {
1389
+ return o.default
1390
+ }
1391
+ }), Object.defineProperty(t, "style", {
1392
+ enumerable: !0,
1393
+ get: function() {
1394
+ return u.default
1395
+ }
1396
+ }), Object.defineProperty(t, "requestAnimationFrame", {
1397
+ enumerable: !0,
1398
+ get: function() {
1399
+ return l.default
1400
+ }
1401
+ }), Object.defineProperty(t, "frame", {
1402
+ enumerable: !0,
1403
+ get: function() {
1404
+ return c.default
1405
+ }
1406
+ }), Object.defineProperty(t, "debounce", {
1407
+ enumerable: !0,
1408
+ get: function() {
1409
+ return f.default
1410
+ }
1411
+ }), Object.defineProperty(t, "preventClick", {
1412
+ enumerable: !0,
1413
+ get: function() {
1414
+ return h.default
1415
+ }
1416
+ }), Object.defineProperty(t, "fetchFile", {
1417
+ enumerable: !0,
1418
+ get: function() {
1419
+ return d.default
1420
+ }
1421
+ }), Object.defineProperty(t, "clamp", {
1422
+ enumerable: !0,
1423
+ get: function() {
1424
+ return p.default
1425
+ }
1426
+ }), Object.defineProperty(t, "withOrientation", {
1427
+ enumerable: !0,
1428
+ get: function() {
1429
+ return v.default
1430
+ }
1431
+ }), Object.defineProperty(t, "ignoreSilenceMode", {
1432
+ enumerable: !0,
1433
+ get: function() {
1434
+ return y.default
1435
+ }
1436
+ });
1437
+ var n = m(r(56)),
1438
+ i = m(r(178)),
1439
+ a = m(r(706)),
1440
+ s = m(r(765)),
1441
+ o = m(r(399)),
1442
+ u = m(r(138)),
1443
+ l = m(r(779)),
1444
+ c = m(r(412)),
1445
+ f = m(r(296)),
1446
+ h = m(r(529)),
1447
+ d = m(r(342)),
1448
+ p = m(r(694)),
1449
+ v = m(r(713)),
1450
+ y = m(r(457));
1451
+
1452
+ function m(e) {
1453
+ return e && e.__esModule ? e : {
1454
+ default: e
1455
+ }
1456
+ }
1457
+ },
1458
+ 178: (e, t) => {
1459
+ "use strict";
1460
+ Object.defineProperty(t, "__esModule", {
1461
+ value: !0
1462
+ }), t.default = function(e) {
1463
+ var t = -1 / 0;
1464
+ return Object.keys(e).forEach((function(r) {
1465
+ e[r] > t && (t = e[r])
1466
+ })), t
1467
+ }, e.exports = t.default
1468
+ },
1469
+ 706: (e, t) => {
1470
+ "use strict";
1471
+ Object.defineProperty(t, "__esModule", {
1472
+ value: !0
1473
+ }), t.default = function(e) {
1474
+ var t = Number(1 / 0);
1475
+ return Object.keys(e).forEach((function(r) {
1476
+ e[r] < t && (t = e[r])
1477
+ })), t
1478
+ }, e.exports = t.default
1479
+ },
1480
+ 399: (e, t) => {
1481
+ "use strict";
1482
+
1483
+ function r(e, t) {
1484
+ for (var r = 0; r < t.length; r++) {
1485
+ var n = t[r];
1486
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
1487
+ }
1488
+ }
1489
+ Object.defineProperty(t, "__esModule", {
1490
+ value: !0
1491
+ }), t.default = void 0;
1492
+ var n = function() {
1493
+ function e() {
1494
+ ! function(e, t) {
1495
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
1496
+ }(this, e), this._disabledEventEmissions = [], this.handlers = null
1497
+ }
1498
+ var t, n, i;
1499
+ return t = e, (n = [{
1500
+ key: "on",
1501
+ value: function(e, t) {
1502
+ var r = this;
1503
+ this.handlers || (this.handlers = {});
1504
+ var n = this.handlers[e];
1505
+ return n || (n = this.handlers[e] = []), n.push(t), {
1506
+ name: e,
1507
+ callback: t,
1508
+ un: function(e, t) {
1509
+ return r.un(e, t)
1510
+ }
1511
+ }
1512
+ }
1513
+ }, {
1514
+ key: "un",
1515
+ value: function(e, t) {
1516
+ if (this.handlers) {
1517
+ var r, n = this.handlers[e];
1518
+ if (n)
1519
+ if (t)
1520
+ for (r = n.length - 1; r >= 0; r--) n[r] == t && n.splice(r, 1);
1521
+ else n.length = 0
1522
+ }
1523
+ }
1524
+ }, {
1525
+ key: "unAll",
1526
+ value: function() {
1527
+ this.handlers = null
1528
+ }
1529
+ }, {
1530
+ key: "once",
1531
+ value: function(e, t) {
1532
+ var r = this;
1533
+ return this.on(e, (function n() {
1534
+ for (var i = arguments.length, a = new Array(i), s = 0; s < i; s++) a[s] = arguments[s];
1535
+ t.apply(r, a), setTimeout((function() {
1536
+ r.un(e, n)
1537
+ }), 0)
1538
+ }))
1539
+ }
1540
+ }, {
1541
+ key: "setDisabledEventEmissions",
1542
+ value: function(e) {
1543
+ this._disabledEventEmissions = e
1544
+ }
1545
+ }, {
1546
+ key: "_isDisabledEventEmission",
1547
+ value: function(e) {
1548
+ return this._disabledEventEmissions && this._disabledEventEmissions.includes(e)
1549
+ }
1550
+ }, {
1551
+ key: "fireEvent",
1552
+ value: function(e) {
1553
+ for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) r[n - 1] = arguments[n];
1554
+ if (this.handlers && !this._isDisabledEventEmission(e)) {
1555
+ var i = this.handlers[e];
1556
+ i && i.forEach((function(e) {
1557
+ e.apply(void 0, r)
1558
+ }))
1559
+ }
1560
+ }
1561
+ }]) && r(t.prototype, n), i && r(t, i), e
1562
+ }();
1563
+ t.default = n, e.exports = t.default
1564
+ },
1565
+ 713: (e, t) => {
1566
+ "use strict";
1567
+ Object.defineProperty(t, "__esModule", {
1568
+ value: !0
1569
+ }), t.default = function e(t, r) {
1570
+ return t[i] ? t : new Proxy(t, {
1571
+ get: function(t, a, s) {
1572
+ if (a === i) return !0;
1573
+ if ("domElement" === a) return t;
1574
+ if ("style" === a) return e(t.style, r);
1575
+ if ("canvas" === a) return e(t.canvas, r);
1576
+ if ("getBoundingClientRect" === a) return function() {
1577
+ return e(t.getBoundingClientRect.apply(t, arguments), r)
1578
+ };
1579
+ if ("getContext" === a) return function() {
1580
+ return e(t.getContext.apply(t, arguments), r)
1581
+ };
1582
+ var o = t[n(a, r)];
1583
+ return "function" == typeof o ? o.bind(t) : o
1584
+ },
1585
+ set: function(e, t, i) {
1586
+ return e[n(t, r)] = i, !0
1587
+ }
1588
+ })
1589
+ };
1590
+ var r = {
1591
+ width: "height",
1592
+ height: "width",
1593
+ overflowX: "overflowY",
1594
+ overflowY: "overflowX",
1595
+ clientWidth: "clientHeight",
1596
+ clientHeight: "clientWidth",
1597
+ clientX: "clientY",
1598
+ clientY: "clientX",
1599
+ scrollWidth: "scrollHeight",
1600
+ scrollLeft: "scrollTop",
1601
+ offsetLeft: "offsetTop",
1602
+ offsetTop: "offsetLeft",
1603
+ offsetHeight: "offsetWidth",
1604
+ offsetWidth: "offsetHeight",
1605
+ left: "top",
1606
+ right: "bottom",
1607
+ top: "left",
1608
+ bottom: "right",
1609
+ borderRightStyle: "borderBottomStyle",
1610
+ borderRightWidth: "borderBottomWidth",
1611
+ borderRightColor: "borderBottomColor"
1612
+ };
1613
+
1614
+ function n(e, t) {
1615
+ return Object.prototype.hasOwnProperty.call(r, e) && t ? r[e] : e
1616
+ }
1617
+ var i = Symbol("isProxy");
1618
+ e.exports = t.default
1619
+ },
1620
+ 529: (e, t) => {
1621
+ "use strict";
1622
+
1623
+ function r(e) {
1624
+ e.stopPropagation(), document.body.removeEventListener("click", r, !0)
1625
+ }
1626
+ Object.defineProperty(t, "__esModule", {
1627
+ value: !0
1628
+ }), t.default = function(e) {
1629
+ document.body.addEventListener("click", r, !0)
1630
+ }, e.exports = t.default
1631
+ },
1632
+ 779: (e, t) => {
1633
+ "use strict";
1634
+ Object.defineProperty(t, "__esModule", {
1635
+ value: !0
1636
+ }), t.default = void 0;
1637
+ var r = (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e, t) {
1638
+ return setTimeout(e, 1e3 / 60)
1639
+ }).bind(window);
1640
+ t.default = r, e.exports = t.default
1641
+ },
1642
+ 457: (e, t) => {
1643
+ "use strict";
1644
+ Object.defineProperty(t, "__esModule", {
1645
+ value: !0
1646
+ }), t.default = function() {
1647
+ var e = document.createElement("div");
1648
+ e.innerHTML = '<audio x-webkit-airplay="deny"></audio>';
1649
+ var t = e.children.item(0);
1650
+ t.src = "data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==", t.preload = "auto", t.type = "audio/mpeg", t.disableRemotePlayback = !0, t.play(), t.remove(), e.remove()
1651
+ }, e.exports = t.default
1652
+ },
1653
+ 138: (e, t) => {
1654
+ "use strict";
1655
+ Object.defineProperty(t, "__esModule", {
1656
+ value: !0
1657
+ }), t.default = function(e, t) {
1658
+ return Object.keys(t).forEach((function(r) {
1659
+ e.style[r] !== t[r] && (e.style[r] = t[r])
1660
+ })), e
1661
+ }, e.exports = t.default
1662
+ },
1663
+ 631: (e, t, r) => {
1664
+ "use strict";
1665
+
1666
+ function n(e) {
1667
+ return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1668
+ return typeof e
1669
+ } : function(e) {
1670
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
1671
+ })(e)
1672
+ }
1673
+ Object.defineProperty(t, "__esModule", {
1674
+ value: !0
1675
+ }), t.default = void 0;
1676
+ var i = function(e, t) {
1677
+ if (!t && e && e.__esModule) return e;
1678
+ if (null === e || "object" !== n(e) && "function" != typeof e) return {
1679
+ default: e
1680
+ };
1681
+ var r = f(t);
1682
+ if (r && r.has(e)) return r.get(e);
1683
+ var i = {},
1684
+ a = Object.defineProperty && Object.getOwnPropertyDescriptor;
1685
+ for (var s in e)
1686
+ if ("default" !== s && Object.prototype.hasOwnProperty.call(e, s)) {
1687
+ var o = a ? Object.getOwnPropertyDescriptor(e, s) : null;
1688
+ o && (o.get || o.set) ? Object.defineProperty(i, s, o) : i[s] = e[s]
1689
+ } return i.default = e, r && r.set(e, i), i
1690
+ }(r(241)),
1691
+ a = c(r(646)),
1692
+ s = c(r(379)),
1693
+ o = c(r(743)),
1694
+ u = c(r(227)),
1695
+ l = c(r(328));
1696
+
1697
+ function c(e) {
1698
+ return e && e.__esModule ? e : {
1699
+ default: e
1700
+ }
1701
+ }
1702
+
1703
+ function f(e) {
1704
+ if ("function" != typeof WeakMap) return null;
1705
+ var t = new WeakMap,
1706
+ r = new WeakMap;
1707
+ return (f = function(e) {
1708
+ return e ? r : t
1709
+ })(e)
1710
+ }
1711
+
1712
+ function h(e, t) {
1713
+ return (h = Object.setPrototypeOf || function(e, t) {
1714
+ return e.__proto__ = t, e
1715
+ })(e, t)
1716
+ }
1717
+
1718
+ function d(e) {
1719
+ var t = function() {
1720
+ if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
1721
+ if (Reflect.construct.sham) return !1;
1722
+ if ("function" == typeof Proxy) return !0;
1723
+ try {
1724
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
1725
+ } catch (e) {
1726
+ return !1
1727
+ }
1728
+ }();
1729
+ return function() {
1730
+ var r, n = y(e);
1731
+ if (t) {
1732
+ var i = y(this).constructor;
1733
+ r = Reflect.construct(n, arguments, i)
1734
+ } else r = n.apply(this, arguments);
1735
+ return p(this, r)
1736
+ }
1737
+ }
1738
+
1739
+ function p(e, t) {
1740
+ if (t && ("object" === n(t) || "function" == typeof t)) return t;
1741
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
1742
+ return v(e)
1743
+ }
1744
+
1745
+ function v(e) {
1746
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1747
+ return e
1748
+ }
1749
+
1750
+ function y(e) {
1751
+ return (y = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
1752
+ return e.__proto__ || Object.getPrototypeOf(e)
1753
+ })(e)
1754
+ }
1755
+
1756
+ function m(e, t) {
1757
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
1758
+ }
1759
+
1760
+ function b(e, t) {
1761
+ for (var r = 0; r < t.length; r++) {
1762
+ var n = t[r];
1763
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
1764
+ }
1765
+ }
1766
+
1767
+ function g(e, t, r) {
1768
+ return t && b(e.prototype, t), r && b(e, r), e
1769
+ }
1770
+ var A = function(e) {
1771
+ ! function(e, t) {
1772
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
1773
+ e.prototype = Object.create(t && t.prototype, {
1774
+ constructor: {
1775
+ value: e,
1776
+ writable: !0,
1777
+ configurable: !0
1778
+ }
1779
+ }), t && h(e, t)
1780
+ }(r, e);
1781
+ var t = d(r);
1782
+
1783
+ function r(e) {
1784
+ var n;
1785
+ if (m(this, r), (n = t.call(this)).defaultParams = {
1786
+ audioContext: null,
1787
+ audioScriptProcessor: null,
1788
+ audioRate: 1,
1789
+ autoCenter: !0,
1790
+ autoCenterRate: 5,
1791
+ autoCenterImmediately: !1,
1792
+ backend: "WebAudio",
1793
+ backgroundColor: null,
1794
+ barHeight: 1,
1795
+ barRadius: 0,
1796
+ barGap: null,
1797
+ barMinHeight: null,
1798
+ container: null,
1799
+ cursorColor: "#333",
1800
+ cursorWidth: 1,
1801
+ dragSelection: !0,
1802
+ drawingContextAttributes: {
1803
+ desynchronized: !1
1804
+ },
1805
+ duration: null,
1806
+ fillParent: !0,
1807
+ forceDecode: !1,
1808
+ height: 128,
1809
+ hideScrollbar: !1,
1810
+ ignoreSilenceMode: !1,
1811
+ interact: !0,
1812
+ loopSelection: !0,
1813
+ maxCanvasWidth: 4e3,
1814
+ mediaContainer: null,
1815
+ mediaControls: !1,
1816
+ mediaType: "audio",
1817
+ minPxPerSec: 20,
1818
+ normalize: !1,
1819
+ partialRender: !1,
1820
+ pixelRatio: window.devicePixelRatio || screen.deviceXDPI / screen.logicalXDPI,
1821
+ plugins: [],
1822
+ progressColor: "#555",
1823
+ removeMediaElementOnDestroy: !0,
1824
+ renderer: a.default,
1825
+ responsive: !1,
1826
+ rtl: !1,
1827
+ scrollParent: !1,
1828
+ skipLength: 2,
1829
+ splitChannels: !1,
1830
+ splitChannelsOptions: {
1831
+ overlay: !1,
1832
+ channelColors: {},
1833
+ filterChannels: [],
1834
+ relativeNormalization: !1
1835
+ },
1836
+ vertical: !1,
1837
+ waveColor: "#999",
1838
+ xhr: {}
1839
+ }, n.backends = {
1840
+ MediaElement: o.default,
1841
+ WebAudio: s.default,
1842
+ MediaElementWebAudio: l.default
1843
+ }, n.util = i, n.params = Object.assign({}, n.defaultParams, e), n.params.splitChannelsOptions = Object.assign({}, n.defaultParams.splitChannelsOptions, e.splitChannelsOptions), n.container = "string" == typeof e.container ? document.querySelector(n.params.container) : n.params.container, !n.container) throw new Error("Container element not found");
1844
+ if (null == n.params.mediaContainer ? n.mediaContainer = n.container : "string" == typeof n.params.mediaContainer ? n.mediaContainer = document.querySelector(n.params.mediaContainer) : n.mediaContainer = n.params.mediaContainer, !n.mediaContainer) throw new Error("Media Container element not found");
1845
+ if (n.params.maxCanvasWidth <= 1) throw new Error("maxCanvasWidth must be greater than 1");
1846
+ if (n.params.maxCanvasWidth % 2 == 1) throw new Error("maxCanvasWidth must be an even number");
1847
+ if (!0 === n.params.rtl && (!0 === n.params.vertical ? i.style(n.container, {
1848
+ transform: "rotateX(180deg)"
1849
+ }) : i.style(n.container, {
1850
+ transform: "rotateY(180deg)"
1851
+ })), n.params.backgroundColor && n.setBackgroundColor(n.params.backgroundColor), n.savedVolume = 0, n.isMuted = !1, n.tmpEvents = [], n.currentRequest = null, n.arraybuffer = null, n.drawer = null, n.backend = null, n.peakCache = null, "function" != typeof n.params.renderer) throw new Error("Renderer parameter is invalid");
1852
+ n.Drawer = n.params.renderer, "AudioElement" == n.params.backend && (n.params.backend = "MediaElement"), "WebAudio" != n.params.backend && "MediaElementWebAudio" !== n.params.backend || s.default.prototype.supportsWebAudio.call(null) || (n.params.backend = "MediaElement"), n.Backend = n.backends[n.params.backend], n.initialisedPluginList = {}, n.isDestroyed = !1, n.isReady = !1;
1853
+ var u = 0;
1854
+ return n._onResize = i.debounce((function() {
1855
+ u == n.drawer.wrapper.clientWidth || n.params.scrollParent || (u = n.drawer.wrapper.clientWidth, n.drawer.fireEvent("redraw"))
1856
+ }), "number" == typeof n.params.responsive ? n.params.responsive : 100), p(n, v(n))
1857
+ }
1858
+ return g(r, [{
1859
+ key: "init",
1860
+ value: function() {
1861
+ return this.registerPlugins(this.params.plugins), this.createDrawer(), this.createBackend(), this.createPeakCache(), this
1862
+ }
1863
+ }, {
1864
+ key: "registerPlugins",
1865
+ value: function(e) {
1866
+ var t = this;
1867
+ return e.forEach((function(e) {
1868
+ return t.addPlugin(e)
1869
+ })), e.forEach((function(e) {
1870
+ e.deferInit || t.initPlugin(e.name)
1871
+ })), this.fireEvent("plugins-registered", e), this
1872
+ }
1873
+ }, {
1874
+ key: "getActivePlugins",
1875
+ value: function() {
1876
+ return this.initialisedPluginList
1877
+ }
1878
+ }, {
1879
+ key: "addPlugin",
1880
+ value: function(e) {
1881
+ var t = this;
1882
+ if (!e.name) throw new Error("Plugin does not have a name!");
1883
+ if (!e.instance) throw new Error("Plugin ".concat(e.name, " does not have an instance property!"));
1884
+ e.staticProps && Object.keys(e.staticProps).forEach((function(r) {
1885
+ t[r] = e.staticProps[r]
1886
+ }));
1887
+ var r = e.instance;
1888
+ return Object.getOwnPropertyNames(i.Observer.prototype).forEach((function(e) {
1889
+ r.prototype[e] = i.Observer.prototype[e]
1890
+ })), this[e.name] = new r(e.params || {}, this), this.fireEvent("plugin-added", e.name), this
1891
+ }
1892
+ }, {
1893
+ key: "initPlugin",
1894
+ value: function(e) {
1895
+ if (!this[e]) throw new Error("Plugin ".concat(e, " has not been added yet!"));
1896
+ return this.initialisedPluginList[e] && this.destroyPlugin(e), this[e].init(), this.initialisedPluginList[e] = !0, this.fireEvent("plugin-initialised", e), this
1897
+ }
1898
+ }, {
1899
+ key: "destroyPlugin",
1900
+ value: function(e) {
1901
+ if (!this[e]) throw new Error("Plugin ".concat(e, " has not been added yet and cannot be destroyed!"));
1902
+ if (!this.initialisedPluginList[e]) throw new Error("Plugin ".concat(e, " is not active and cannot be destroyed!"));
1903
+ if ("function" != typeof this[e].destroy) throw new Error("Plugin ".concat(e, " does not have a destroy function!"));
1904
+ return this[e].destroy(), delete this.initialisedPluginList[e], this.fireEvent("plugin-destroyed", e), this
1905
+ }
1906
+ }, {
1907
+ key: "destroyAllPlugins",
1908
+ value: function() {
1909
+ var e = this;
1910
+ Object.keys(this.initialisedPluginList).forEach((function(t) {
1911
+ return e.destroyPlugin(t)
1912
+ }))
1913
+ }
1914
+ }, {
1915
+ key: "createDrawer",
1916
+ value: function() {
1917
+ var e = this;
1918
+ this.drawer = new this.Drawer(this.container, this.params), this.drawer.init(), this.fireEvent("drawer-created", this.drawer), !1 !== this.params.responsive && (window.addEventListener("resize", this._onResize, !0), window.addEventListener("orientationchange", this._onResize, !0)), this.drawer.on("redraw", (function() {
1919
+ e.drawBuffer(), e.drawer.progress(e.backend.getPlayedPercents())
1920
+ })), this.drawer.on("click", (function(t, r) {
1921
+ setTimeout((function() {
1922
+ return e.seekTo(r)
1923
+ }), 0)
1924
+ })), this.drawer.on("scroll", (function(t) {
1925
+ e.params.partialRender && e.drawBuffer(), e.fireEvent("scroll", t)
1926
+ }))
1927
+ }
1928
+ }, {
1929
+ key: "createBackend",
1930
+ value: function() {
1931
+ var e = this;
1932
+ this.backend && this.backend.destroy(), this.backend = new this.Backend(this.params), this.backend.init(), this.fireEvent("backend-created", this.backend), this.backend.on("finish", (function() {
1933
+ e.drawer.progress(e.backend.getPlayedPercents()), e.fireEvent("finish")
1934
+ })), this.backend.on("play", (function() {
1935
+ return e.fireEvent("play")
1936
+ })), this.backend.on("pause", (function() {
1937
+ return e.fireEvent("pause")
1938
+ })), this.backend.on("audioprocess", (function(t) {
1939
+ e.drawer.progress(e.backend.getPlayedPercents()), e.fireEvent("audioprocess", t)
1940
+ })), "MediaElement" !== this.params.backend && "MediaElementWebAudio" !== this.params.backend || (this.backend.on("seek", (function() {
1941
+ e.drawer.progress(e.backend.getPlayedPercents())
1942
+ })), this.backend.on("volume", (function() {
1943
+ var t = e.getVolume();
1944
+ e.fireEvent("volume", t), e.backend.isMuted !== e.isMuted && (e.isMuted = e.backend.isMuted, e.fireEvent("mute", e.isMuted))
1945
+ })))
1946
+ }
1947
+ }, {
1948
+ key: "createPeakCache",
1949
+ value: function() {
1950
+ this.params.partialRender && (this.peakCache = new u.default)
1951
+ }
1952
+ }, {
1953
+ key: "getDuration",
1954
+ value: function() {
1955
+ return this.backend.getDuration()
1956
+ }
1957
+ }, {
1958
+ key: "getCurrentTime",
1959
+ value: function() {
1960
+ return this.backend.getCurrentTime()
1961
+ }
1962
+ }, {
1963
+ key: "setCurrentTime",
1964
+ value: function(e) {
1965
+ e >= this.getDuration() ? this.seekTo(1) : this.seekTo(e / this.getDuration())
1966
+ }
1967
+ }, {
1968
+ key: "play",
1969
+ value: function(e, t) {
1970
+ var r = this;
1971
+ return this.params.ignoreSilenceMode && i.ignoreSilenceMode(), this.fireEvent("interaction", (function() {
1972
+ return r.play(e, t)
1973
+ })), this.backend.play(e, t)
1974
+ }
1975
+ }, {
1976
+ key: "setPlayEnd",
1977
+ value: function(e) {
1978
+ this.backend.setPlayEnd(e)
1979
+ }
1980
+ }, {
1981
+ key: "pause",
1982
+ value: function() {
1983
+ if (!this.backend.isPaused()) return this.backend.pause()
1984
+ }
1985
+ }, {
1986
+ key: "playPause",
1987
+ value: function() {
1988
+ return this.backend.isPaused() ? this.play() : this.pause()
1989
+ }
1990
+ }, {
1991
+ key: "isPlaying",
1992
+ value: function() {
1993
+ return !this.backend.isPaused()
1994
+ }
1995
+ }, {
1996
+ key: "skipBackward",
1997
+ value: function(e) {
1998
+ this.skip(-e || -this.params.skipLength)
1999
+ }
2000
+ }, {
2001
+ key: "skipForward",
2002
+ value: function(e) {
2003
+ this.skip(e || this.params.skipLength)
2004
+ }
2005
+ }, {
2006
+ key: "skip",
2007
+ value: function(e) {
2008
+ var t = this.getDuration() || 1,
2009
+ r = this.getCurrentTime() || 0;
2010
+ r = Math.max(0, Math.min(t, r + (e || 0))), this.seekAndCenter(r / t)
2011
+ }
2012
+ }, {
2013
+ key: "seekAndCenter",
2014
+ value: function(e) {
2015
+ this.seekTo(e), this.drawer.recenter(e)
2016
+ }
2017
+ }, {
2018
+ key: "seekTo",
2019
+ value: function(e) {
2020
+ var t = this;
2021
+ if ("number" != typeof e || !isFinite(e) || e < 0 || e > 1) throw new Error("Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!");
2022
+ this.fireEvent("interaction", (function() {
2023
+ return t.seekTo(e)
2024
+ }));
2025
+ var r = "WebAudio" === this.params.backend,
2026
+ n = this.backend.isPaused();
2027
+ r && !n && this.backend.pause();
2028
+ var i = this.params.scrollParent;
2029
+ this.params.scrollParent = !1, this.backend.seekTo(e * this.getDuration()), this.drawer.progress(e), r && !n && this.backend.play(), this.params.scrollParent = i, this.fireEvent("seek", e)
2030
+ }
2031
+ }, {
2032
+ key: "stop",
2033
+ value: function() {
2034
+ this.pause(), this.seekTo(0), this.drawer.progress(0)
2035
+ }
2036
+ }, {
2037
+ key: "setSinkId",
2038
+ value: function(e) {
2039
+ return this.backend.setSinkId(e)
2040
+ }
2041
+ }, {
2042
+ key: "setVolume",
2043
+ value: function(e) {
2044
+ this.backend.setVolume(e), this.fireEvent("volume", e)
2045
+ }
2046
+ }, {
2047
+ key: "getVolume",
2048
+ value: function() {
2049
+ return this.backend.getVolume()
2050
+ }
2051
+ }, {
2052
+ key: "setPlaybackRate",
2053
+ value: function(e) {
2054
+ this.backend.setPlaybackRate(e)
2055
+ }
2056
+ }, {
2057
+ key: "getPlaybackRate",
2058
+ value: function() {
2059
+ return this.backend.getPlaybackRate()
2060
+ }
2061
+ }, {
2062
+ key: "toggleMute",
2063
+ value: function() {
2064
+ this.setMute(!this.isMuted)
2065
+ }
2066
+ }, {
2067
+ key: "setMute",
2068
+ value: function(e) {
2069
+ e !== this.isMuted ? (this.backend.setMute ? (this.backend.setMute(e), this.isMuted = e) : e ? (this.savedVolume = this.backend.getVolume(), this.backend.setVolume(0), this.isMuted = !0, this.fireEvent("volume", 0)) : (this.backend.setVolume(this.savedVolume), this.isMuted = !1, this.fireEvent("volume", this.savedVolume)), this.fireEvent("mute", this.isMuted)) : this.fireEvent("mute", this.isMuted)
2070
+ }
2071
+ }, {
2072
+ key: "getMute",
2073
+ value: function() {
2074
+ return this.isMuted
2075
+ }
2076
+ }, {
2077
+ key: "getFilters",
2078
+ value: function() {
2079
+ return this.backend.filters || []
2080
+ }
2081
+ }, {
2082
+ key: "toggleScroll",
2083
+ value: function() {
2084
+ this.params.scrollParent = !this.params.scrollParent, this.drawBuffer()
2085
+ }
2086
+ }, {
2087
+ key: "toggleInteraction",
2088
+ value: function() {
2089
+ this.params.interact = !this.params.interact
2090
+ }
2091
+ }, {
2092
+ key: "getWaveColor",
2093
+ value: function() {
2094
+ return this.params.waveColor
2095
+ }
2096
+ }, {
2097
+ key: "setWaveColor",
2098
+ value: function(e) {
2099
+ this.params.waveColor = e, this.drawBuffer()
2100
+ }
2101
+ }, {
2102
+ key: "getProgressColor",
2103
+ value: function() {
2104
+ return this.params.progressColor
2105
+ }
2106
+ }, {
2107
+ key: "setProgressColor",
2108
+ value: function(e) {
2109
+ this.params.progressColor = e, this.drawBuffer()
2110
+ }
2111
+ }, {
2112
+ key: "getBackgroundColor",
2113
+ value: function() {
2114
+ return this.params.backgroundColor
2115
+ }
2116
+ }, {
2117
+ key: "setBackgroundColor",
2118
+ value: function(e) {
2119
+ this.params.backgroundColor = e, i.style(this.container, {
2120
+ background: this.params.backgroundColor
2121
+ })
2122
+ }
2123
+ }, {
2124
+ key: "getCursorColor",
2125
+ value: function() {
2126
+ return this.params.cursorColor
2127
+ }
2128
+ }, {
2129
+ key: "setCursorColor",
2130
+ value: function(e) {
2131
+ this.params.cursorColor = e, this.drawer.updateCursor()
2132
+ }
2133
+ }, {
2134
+ key: "getHeight",
2135
+ value: function() {
2136
+ return this.params.height
2137
+ }
2138
+ }, {
2139
+ key: "setHeight",
2140
+ value: function(e) {
2141
+ this.params.height = e, this.drawer.setHeight(e * this.params.pixelRatio), this.drawBuffer()
2142
+ }
2143
+ }, {
2144
+ key: "setFilteredChannels",
2145
+ value: function(e) {
2146
+ this.params.splitChannelsOptions.filterChannels = e, this.drawBuffer()
2147
+ }
2148
+ }, {
2149
+ key: "drawBuffer",
2150
+ value: function() {
2151
+ var e, t = Math.round(this.getDuration() * this.params.minPxPerSec * this.params.pixelRatio),
2152
+ r = this.drawer.getWidth(),
2153
+ n = t,
2154
+ i = 0,
2155
+ a = Math.max(i + r, n);
2156
+ if (this.params.fillParent && (!this.params.scrollParent || t < r) && (i = 0, a = n = r), this.params.partialRender) {
2157
+ var s, o = this.peakCache.addRangeToPeakCache(n, i, a);
2158
+ for (s = 0; s < o.length; s++) e = this.backend.getPeaks(n, o[s][0], o[s][1]), this.drawer.drawPeaks(e, n, o[s][0], o[s][1])
2159
+ } else e = this.backend.getPeaks(n, i, a), this.drawer.drawPeaks(e, n, i, a);
2160
+ this.fireEvent("redraw", e, n)
2161
+ }
2162
+ }, {
2163
+ key: "zoom",
2164
+ value: function(e) {
2165
+ e ? (this.params.minPxPerSec = e, this.params.scrollParent = !0) : (this.params.minPxPerSec = this.defaultParams.minPxPerSec, this.params.scrollParent = !1), this.drawBuffer(), this.drawer.progress(this.backend.getPlayedPercents()), this.drawer.recenter(this.getCurrentTime() / this.getDuration()), this.fireEvent("zoom", e)
2166
+ }
2167
+ }, {
2168
+ key: "loadArrayBuffer",
2169
+ value: function(e) {
2170
+ var t = this;
2171
+ this.decodeArrayBuffer(e, (function(e) {
2172
+ t.isDestroyed || t.loadDecodedBuffer(e)
2173
+ }))
2174
+ }
2175
+ }, {
2176
+ key: "loadDecodedBuffer",
2177
+ value: function(e) {
2178
+ this.backend.load(e), this.drawBuffer(), this.isReady = !0, this.fireEvent("ready")
2179
+ }
2180
+ }, {
2181
+ key: "loadBlob",
2182
+ value: function(e) {
2183
+ var t = this,
2184
+ r = new FileReader;
2185
+ r.addEventListener("progress", (function(e) {
2186
+ return t.onProgress(e)
2187
+ })), r.addEventListener("load", (function(e) {
2188
+ return t.loadArrayBuffer(e.target.result)
2189
+ })), r.addEventListener("error", (function() {
2190
+ return t.fireEvent("error", "Error reading file")
2191
+ })), r.readAsArrayBuffer(e), this.empty()
2192
+ }
2193
+ }, {
2194
+ key: "load",
2195
+ value: function(e, t, r, n) {
2196
+ if (!e) throw new Error("url parameter cannot be empty");
2197
+ if (this.empty(), r) {
2198
+ var i = {
2199
+ "Preload is not 'auto', 'none' or 'metadata'": -1 === ["auto", "metadata", "none"].indexOf(r),
2200
+ "Peaks are not provided": !t,
2201
+ "Backend is not of type 'MediaElement' or 'MediaElementWebAudio'": -1 === ["MediaElement", "MediaElementWebAudio"].indexOf(this.params.backend),
2202
+ "Url is not of type string": "string" != typeof e
2203
+ },
2204
+ a = Object.keys(i).filter((function(e) {
2205
+ return i[e]
2206
+ }));
2207
+ a.length && (console.warn("Preload parameter of wavesurfer.load will be ignored because:\n\t- " + a.join("\n\t- ")), r = null)
2208
+ }
2209
+ switch ("WebAudio" === this.params.backend && e instanceof HTMLMediaElement && (e = e.src), this.params.backend) {
2210
+ case "WebAudio":
2211
+ return this.loadBuffer(e, t, n);
2212
+ case "MediaElement":
2213
+ case "MediaElementWebAudio":
2214
+ return this.loadMediaElement(e, t, r, n)
2215
+ }
2216
+ }
2217
+ }, {
2218
+ key: "loadBuffer",
2219
+ value: function(e, t, r) {
2220
+ var n = this,
2221
+ i = function(t) {
2222
+ return t && n.tmpEvents.push(n.once("ready", t)), n.getArrayBuffer(e, (function(e) {
2223
+ return n.loadArrayBuffer(e)
2224
+ }))
2225
+ };
2226
+ if (!t) return i();
2227
+ this.backend.setPeaks(t, r), this.drawBuffer(), this.fireEvent("waveform-ready"), this.tmpEvents.push(this.once("interaction", i))
2228
+ }
2229
+ }, {
2230
+ key: "loadMediaElement",
2231
+ value: function(e, t, r, n) {
2232
+ var i = this,
2233
+ a = e;
2234
+ if ("string" == typeof e) this.backend.load(a, this.mediaContainer, t, r);
2235
+ else {
2236
+ var s = e;
2237
+ this.backend.loadElt(s, t), a = s.src
2238
+ }
2239
+ this.tmpEvents.push(this.backend.once("canplay", (function() {
2240
+ i.backend.destroyed || (i.drawBuffer(), i.isReady = !0, i.fireEvent("ready"))
2241
+ })), this.backend.once("error", (function(e) {
2242
+ return i.fireEvent("error", e)
2243
+ }))), t && (this.backend.setPeaks(t, n), this.drawBuffer(), this.fireEvent("waveform-ready")), t && !this.params.forceDecode || !this.backend.supportsWebAudio() || this.getArrayBuffer(a, (function(e) {
2244
+ i.decodeArrayBuffer(e, (function(e) {
2245
+ i.backend.buffer = e, i.backend.setPeaks(null), i.drawBuffer(), i.fireEvent("waveform-ready")
2246
+ }))
2247
+ }))
2248
+ }
2249
+ }, {
2250
+ key: "decodeArrayBuffer",
2251
+ value: function(e, t) {
2252
+ var r = this;
2253
+ this.isDestroyed || (this.arraybuffer = e, this.backend.decodeArrayBuffer(e, (function(n) {
2254
+ r.isDestroyed || r.arraybuffer != e || (t(n), r.arraybuffer = null)
2255
+ }), (function() {
2256
+ return r.fireEvent("error", "Error decoding audiobuffer")
2257
+ })))
2258
+ }
2259
+ }, {
2260
+ key: "getArrayBuffer",
2261
+ value: function(e, t) {
2262
+ var r = this,
2263
+ n = Object.assign({
2264
+ url: e,
2265
+ responseType: "arraybuffer"
2266
+ }, this.params.xhr),
2267
+ a = i.fetchFile(n);
2268
+ return this.currentRequest = a, this.tmpEvents.push(a.on("progress", (function(e) {
2269
+ r.onProgress(e)
2270
+ })), a.on("success", (function(e) {
2271
+ t(e), r.currentRequest = null
2272
+ })), a.on("error", (function(e) {
2273
+ r.fireEvent("error", e), r.currentRequest = null
2274
+ }))), a
2275
+ }
2276
+ }, {
2277
+ key: "onProgress",
2278
+ value: function(e) {
2279
+ var t;
2280
+ t = e.lengthComputable ? e.loaded / e.total : e.loaded / (e.loaded + 1e6), this.fireEvent("loading", Math.round(100 * t), e.target)
2281
+ }
2282
+ }, {
2283
+ key: "exportPCM",
2284
+ value: function(e, t, r, n, i) {
2285
+ e = e || 1024, n = n || 0, t = t || 1e4, r = r || !1;
2286
+ var a = this.backend.getPeaks(e, n, i),
2287
+ s = [].map.call(a, (function(e) {
2288
+ return Math.round(e * t) / t
2289
+ }));
2290
+ return new Promise((function(e, t) {
2291
+ if (!r) {
2292
+ var n = new Blob([JSON.stringify(s)], {
2293
+ type: "application/json;charset=utf-8"
2294
+ }),
2295
+ i = URL.createObjectURL(n);
2296
+ window.open(i), URL.revokeObjectURL(i)
2297
+ }
2298
+ e(s)
2299
+ }))
2300
+ }
2301
+ }, {
2302
+ key: "exportImage",
2303
+ value: function(e, t, r) {
2304
+ return e || (e = "image/png"), t || (t = 1), r || (r = "dataURL"), this.drawer.getImage(e, t, r)
2305
+ }
2306
+ }, {
2307
+ key: "cancelAjax",
2308
+ value: function() {
2309
+ this.currentRequest && this.currentRequest.controller && (this.currentRequest._reader && this.currentRequest._reader.cancel().catch((function(e) {})), this.currentRequest.controller.abort(), this.currentRequest = null)
2310
+ }
2311
+ }, {
2312
+ key: "clearTmpEvents",
2313
+ value: function() {
2314
+ this.tmpEvents.forEach((function(e) {
2315
+ return e.un()
2316
+ }))
2317
+ }
2318
+ }, {
2319
+ key: "empty",
2320
+ value: function() {
2321
+ this.backend.isPaused() || (this.stop(), this.backend.disconnectSource()), this.isReady = !1, this.cancelAjax(), this.clearTmpEvents(), this.drawer.progress(0), this.drawer.setWidth(0), this.drawer.drawPeaks({
2322
+ length: this.drawer.getWidth()
2323
+ }, 0)
2324
+ }
2325
+ }, {
2326
+ key: "destroy",
2327
+ value: function() {
2328
+ this.destroyAllPlugins(), this.fireEvent("destroy"), this.cancelAjax(), this.clearTmpEvents(), this.unAll(), !1 !== this.params.responsive && (window.removeEventListener("resize", this._onResize, !0), window.removeEventListener("orientationchange", this._onResize, !0)), this.backend && (this.backend.destroy(), this.backend = null), this.drawer && this.drawer.destroy(), this.isDestroyed = !0, this.isReady = !1, this.arraybuffer = null
2329
+ }
2330
+ }], [{
2331
+ key: "create",
2332
+ value: function(e) {
2333
+ return new r(e).init()
2334
+ }
2335
+ }]), r
2336
+ }(i.Observer);
2337
+ t.default = A, A.VERSION = "5.2.0", A.util = i, e.exports = t.default
2338
+ },
2339
+ 379: (e, t, r) => {
2340
+ "use strict";
2341
+
2342
+ function n(e) {
2343
+ return (n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
2344
+ return typeof e
2345
+ } : function(e) {
2346
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
2347
+ })(e)
2348
+ }
2349
+ Object.defineProperty(t, "__esModule", {
2350
+ value: !0
2351
+ }), t.default = void 0;
2352
+ var i = function(e, t) {
2353
+ if (!t && e && e.__esModule) return e;
2354
+ if (null === e || "object" !== n(e) && "function" != typeof e) return {
2355
+ default: e
2356
+ };
2357
+ var r = a(t);
2358
+ if (r && r.has(e)) return r.get(e);
2359
+ var i = {},
2360
+ s = Object.defineProperty && Object.getOwnPropertyDescriptor;
2361
+ for (var o in e)
2362
+ if ("default" !== o && Object.prototype.hasOwnProperty.call(e, o)) {
2363
+ var u = s ? Object.getOwnPropertyDescriptor(e, o) : null;
2364
+ u && (u.get || u.set) ? Object.defineProperty(i, o, u) : i[o] = e[o]
2365
+ } return i.default = e, r && r.set(e, i), i
2366
+ }(r(241));
2367
+
2368
+ function a(e) {
2369
+ if ("function" != typeof WeakMap) return null;
2370
+ var t = new WeakMap,
2371
+ r = new WeakMap;
2372
+ return (a = function(e) {
2373
+ return e ? r : t
2374
+ })(e)
2375
+ }
2376
+
2377
+ function s(e, t, r) {
2378
+ return t in e ? Object.defineProperty(e, t, {
2379
+ value: r,
2380
+ enumerable: !0,
2381
+ configurable: !0,
2382
+ writable: !0
2383
+ }) : e[t] = r, e
2384
+ }
2385
+
2386
+ function o(e, t) {
2387
+ for (var r = 0; r < t.length; r++) {
2388
+ var n = t[r];
2389
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
2390
+ }
2391
+ }
2392
+
2393
+ function u(e, t) {
2394
+ return (u = Object.setPrototypeOf || function(e, t) {
2395
+ return e.__proto__ = t, e
2396
+ })(e, t)
2397
+ }
2398
+
2399
+ function l(e) {
2400
+ var t = function() {
2401
+ if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
2402
+ if (Reflect.construct.sham) return !1;
2403
+ if ("function" == typeof Proxy) return !0;
2404
+ try {
2405
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
2406
+ } catch (e) {
2407
+ return !1
2408
+ }
2409
+ }();
2410
+ return function() {
2411
+ var r, n = f(e);
2412
+ if (t) {
2413
+ var i = f(this).constructor;
2414
+ r = Reflect.construct(n, arguments, i)
2415
+ } else r = n.apply(this, arguments);
2416
+ return c(this, r)
2417
+ }
2418
+ }
2419
+
2420
+ function c(e, t) {
2421
+ if (t && ("object" === n(t) || "function" == typeof t)) return t;
2422
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
2423
+ return function(e) {
2424
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2425
+ return e
2426
+ }(e)
2427
+ }
2428
+
2429
+ function f(e) {
2430
+ return (f = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
2431
+ return e.__proto__ || Object.getPrototypeOf(e)
2432
+ })(e)
2433
+ }
2434
+ var h = "playing",
2435
+ d = "paused",
2436
+ p = "finished",
2437
+ v = function(e) {
2438
+ ! function(e, t) {
2439
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
2440
+ e.prototype = Object.create(t && t.prototype, {
2441
+ constructor: {
2442
+ value: e,
2443
+ writable: !0,
2444
+ configurable: !0
2445
+ }
2446
+ }), t && u(e, t)
2447
+ }(a, e);
2448
+ var t, r, n, i = l(a);
2449
+
2450
+ function a(e) {
2451
+ var t, r, n;
2452
+ return function(e, t) {
2453
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
2454
+ }(this, a), (n = i.call(this)).audioContext = null, n.offlineAudioContext = null, n.stateBehaviors = (s(t = {}, h, {
2455
+ init: function() {
2456
+ this.addOnAudioProcess()
2457
+ },
2458
+ getPlayedPercents: function() {
2459
+ var e = this.getDuration();
2460
+ return this.getCurrentTime() / e || 0
2461
+ },
2462
+ getCurrentTime: function() {
2463
+ return this.startPosition + this.getPlayedTime()
2464
+ }
2465
+ }), s(t, d, {
2466
+ init: function() {
2467
+ this.removeOnAudioProcess()
2468
+ },
2469
+ getPlayedPercents: function() {
2470
+ var e = this.getDuration();
2471
+ return this.getCurrentTime() / e || 0
2472
+ },
2473
+ getCurrentTime: function() {
2474
+ return this.startPosition
2475
+ }
2476
+ }), s(t, p, {
2477
+ init: function() {
2478
+ this.removeOnAudioProcess(), this.fireEvent("finish")
2479
+ },
2480
+ getPlayedPercents: function() {
2481
+ return 1
2482
+ },
2483
+ getCurrentTime: function() {
2484
+ return this.getDuration()
2485
+ }
2486
+ }), t), n.params = e, n.ac = e.audioContext || (n.supportsWebAudio() ? n.getAudioContext() : {}), n.lastPlay = n.ac.currentTime, n.startPosition = 0, n.scheduledPause = null, n.states = (s(r = {}, h, Object.create(n.stateBehaviors.playing)), s(r, d, Object.create(n.stateBehaviors.paused)), s(r, p, Object.create(n.stateBehaviors.finished)), r), n.buffer = null, n.filters = [], n.gainNode = null, n.mergedPeaks = null, n.offlineAc = null, n.peaks = null, n.playbackRate = 1, n.analyser = null, n.scriptNode = null, n.source = null, n.splitPeaks = [], n.state = null, n.explicitDuration = e.duration, n.destroyed = !1, n
2487
+ }
2488
+ return t = a, (r = [{
2489
+ key: "supportsWebAudio",
2490
+ value: function() {
2491
+ return !(!window.AudioContext && !window.webkitAudioContext)
2492
+ }
2493
+ }, {
2494
+ key: "getAudioContext",
2495
+ value: function() {
2496
+ return window.WaveSurferAudioContext || (window.WaveSurferAudioContext = new(window.AudioContext || window.webkitAudioContext)), window.WaveSurferAudioContext
2497
+ }
2498
+ }, {
2499
+ key: "getOfflineAudioContext",
2500
+ value: function(e) {
2501
+ return window.WaveSurferOfflineAudioContext || (window.WaveSurferOfflineAudioContext = new(window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 2, e)), window.WaveSurferOfflineAudioContext
2502
+ }
2503
+ }, {
2504
+ key: "init",
2505
+ value: function() {
2506
+ this.createVolumeNode(), this.createScriptNode(), this.createAnalyserNode(), this.setState(d), this.setPlaybackRate(this.params.audioRate), this.setLength(0)
2507
+ }
2508
+ }, {
2509
+ key: "disconnectFilters",
2510
+ value: function() {
2511
+ this.filters && (this.filters.forEach((function(e) {
2512
+ e && e.disconnect()
2513
+ })), this.filters = null, this.analyser.connect(this.gainNode))
2514
+ }
2515
+ }, {
2516
+ key: "setState",
2517
+ value: function(e) {
2518
+ this.state !== this.states[e] && (this.state = this.states[e], this.state.init.call(this))
2519
+ }
2520
+ }, {
2521
+ key: "setFilter",
2522
+ value: function() {
2523
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r];
2524
+ this.setFilters(t)
2525
+ }
2526
+ }, {
2527
+ key: "setFilters",
2528
+ value: function(e) {
2529
+ this.disconnectFilters(), e && e.length && (this.filters = e, this.analyser.disconnect(), e.reduce((function(e, t) {
2530
+ return e.connect(t), t
2531
+ }), this.analyser).connect(this.gainNode))
2532
+ }
2533
+ }, {
2534
+ key: "createScriptNode",
2535
+ value: function() {
2536
+ this.params.audioScriptProcessor ? this.scriptNode = this.params.audioScriptProcessor : this.ac.createScriptProcessor ? this.scriptNode = this.ac.createScriptProcessor(a.scriptBufferSize) : this.scriptNode = this.ac.createJavaScriptNode(a.scriptBufferSize), this.scriptNode.connect(this.ac.destination)
2537
+ }
2538
+ }, {
2539
+ key: "addOnAudioProcess",
2540
+ value: function() {
2541
+ var e = this;
2542
+ this.scriptNode.onaudioprocess = function() {
2543
+ var t = e.getCurrentTime();
2544
+ t >= e.getDuration() ? (e.setState(p), e.fireEvent("pause")) : t >= e.scheduledPause ? e.pause() : e.state === e.states.playing && e.fireEvent("audioprocess", t)
2545
+ }
2546
+ }
2547
+ }, {
2548
+ key: "removeOnAudioProcess",
2549
+ value: function() {
2550
+ this.scriptNode.onaudioprocess = null
2551
+ }
2552
+ }, {
2553
+ key: "createAnalyserNode",
2554
+ value: function() {
2555
+ this.analyser = this.ac.createAnalyser(), this.analyser.connect(this.gainNode)
2556
+ }
2557
+ }, {
2558
+ key: "createVolumeNode",
2559
+ value: function() {
2560
+ this.ac.createGain ? this.gainNode = this.ac.createGain() : this.gainNode = this.ac.createGainNode(), this.gainNode.connect(this.ac.destination)
2561
+ }
2562
+ }, {
2563
+ key: "setSinkId",
2564
+ value: function(e) {
2565
+ if (e) {
2566
+ var t = new window.Audio;
2567
+ if (!t.setSinkId) return Promise.reject(new Error("setSinkId is not supported in your browser"));
2568
+ t.autoplay = !0;
2569
+ var r = this.ac.createMediaStreamDestination();
2570
+ return this.gainNode.disconnect(), this.gainNode.connect(r), t.srcObject = r.stream, t.setSinkId(e)
2571
+ }
2572
+ return Promise.reject(new Error("Invalid deviceId: " + e))
2573
+ }
2574
+ }, {
2575
+ key: "setVolume",
2576
+ value: function(e) {
2577
+ this.gainNode.gain.setValueAtTime(e, this.ac.currentTime)
2578
+ }
2579
+ }, {
2580
+ key: "getVolume",
2581
+ value: function() {
2582
+ return this.gainNode.gain.value
2583
+ }
2584
+ }, {
2585
+ key: "decodeArrayBuffer",
2586
+ value: function(e, t, r) {
2587
+ this.offlineAc || (this.offlineAc = this.getOfflineAudioContext(this.ac && this.ac.sampleRate ? this.ac.sampleRate : 44100)), "webkitAudioContext" in window ? this.offlineAc.decodeAudioData(e, (function(e) {
2588
+ return t(e)
2589
+ }), r) : this.offlineAc.decodeAudioData(e).then((function(e) {
2590
+ return t(e)
2591
+ })).catch((function(e) {
2592
+ return r(e)
2593
+ }))
2594
+ }
2595
+ }, {
2596
+ key: "setPeaks",
2597
+ value: function(e, t) {
2598
+ null != t && (this.explicitDuration = t), this.peaks = e
2599
+ }
2600
+ }, {
2601
+ key: "setLength",
2602
+ value: function(e) {
2603
+ if (!this.mergedPeaks || e != 2 * this.mergedPeaks.length - 1 + 2) {
2604
+ this.splitPeaks = [], this.mergedPeaks = [];
2605
+ var t, r = this.buffer ? this.buffer.numberOfChannels : 1;
2606
+ for (t = 0; t < r; t++) this.splitPeaks[t] = [], this.splitPeaks[t][2 * (e - 1)] = 0, this.splitPeaks[t][2 * (e - 1) + 1] = 0;
2607
+ this.mergedPeaks[2 * (e - 1)] = 0, this.mergedPeaks[2 * (e - 1) + 1] = 0
2608
+ }
2609
+ }
2610
+ }, {
2611
+ key: "getPeaks",
2612
+ value: function(e, t, r) {
2613
+ if (this.peaks) return this.peaks;
2614
+ if (!this.buffer) return [];
2615
+ if (t = t || 0, r = r || e - 1, this.setLength(e), !this.buffer) return this.params.splitChannels ? this.splitPeaks : this.mergedPeaks;
2616
+ if (!this.buffer.length) {
2617
+ var n = this.createBuffer(1, 4096, this.sampleRate);
2618
+ this.buffer = n.buffer
2619
+ }
2620
+ var i, a = this.buffer.length / e,
2621
+ s = ~~(a / 10) || 1,
2622
+ o = this.buffer.numberOfChannels;
2623
+ for (i = 0; i < o; i++) {
2624
+ var u = this.splitPeaks[i],
2625
+ l = this.buffer.getChannelData(i),
2626
+ c = void 0;
2627
+ for (c = t; c <= r; c++) {
2628
+ var f = ~~(c * a),
2629
+ h = ~~(f + a),
2630
+ d = l[f],
2631
+ p = d,
2632
+ v = void 0;
2633
+ for (v = f; v < h; v += s) {
2634
+ var y = l[v];
2635
+ y > p && (p = y), y < d && (d = y)
2636
+ }
2637
+ u[2 * c] = p, u[2 * c + 1] = d, (0 == i || p > this.mergedPeaks[2 * c]) && (this.mergedPeaks[2 * c] = p), (0 == i || d < this.mergedPeaks[2 * c + 1]) && (this.mergedPeaks[2 * c + 1] = d)
2638
+ }
2639
+ }
2640
+ return this.params.splitChannels ? this.splitPeaks : this.mergedPeaks
2641
+ }
2642
+ }, {
2643
+ key: "getPlayedPercents",
2644
+ value: function() {
2645
+ return this.state.getPlayedPercents.call(this)
2646
+ }
2647
+ }, {
2648
+ key: "disconnectSource",
2649
+ value: function() {
2650
+ this.source && this.source.disconnect()
2651
+ }
2652
+ }, {
2653
+ key: "destroyWebAudio",
2654
+ value: function() {
2655
+ this.disconnectFilters(), this.disconnectSource(), this.gainNode.disconnect(), this.scriptNode.disconnect(), this.analyser.disconnect(), this.params.closeAudioContext && ("function" == typeof this.ac.close && "closed" != this.ac.state && this.ac.close(), this.ac = null, this.params.audioContext ? this.params.audioContext = null : window.WaveSurferAudioContext = null, window.WaveSurferOfflineAudioContext = null)
2656
+ }
2657
+ }, {
2658
+ key: "destroy",
2659
+ value: function() {
2660
+ this.isPaused() || this.pause(), this.unAll(), this.buffer = null, this.destroyed = !0, this.destroyWebAudio()
2661
+ }
2662
+ }, {
2663
+ key: "load",
2664
+ value: function(e) {
2665
+ this.startPosition = 0, this.lastPlay = this.ac.currentTime, this.buffer = e, this.createSource()
2666
+ }
2667
+ }, {
2668
+ key: "createSource",
2669
+ value: function() {
2670
+ this.disconnectSource(), this.source = this.ac.createBufferSource(), this.source.start = this.source.start || this.source.noteGrainOn, this.source.stop = this.source.stop || this.source.noteOff, this.setPlaybackRate(this.playbackRate), this.source.buffer = this.buffer, this.source.connect(this.analyser)
2671
+ }
2672
+ }, {
2673
+ key: "resumeAudioContext",
2674
+ value: function() {
2675
+ "suspended" == this.ac.state && this.ac.resume && this.ac.resume()
2676
+ }
2677
+ }, {
2678
+ key: "isPaused",
2679
+ value: function() {
2680
+ return this.state !== this.states.playing
2681
+ }
2682
+ }, {
2683
+ key: "getDuration",
2684
+ value: function() {
2685
+ return this.explicitDuration ? this.explicitDuration : this.buffer ? this.buffer.duration : 0
2686
+ }
2687
+ }, {
2688
+ key: "seekTo",
2689
+ value: function(e, t) {
2690
+ if (this.buffer) return this.scheduledPause = null, null == e && (e = this.getCurrentTime()) >= this.getDuration() && (e = 0), null == t && (t = this.getDuration()), this.startPosition = e, this.lastPlay = this.ac.currentTime, this.state === this.states.finished && this.setState(d), {
2691
+ start: e,
2692
+ end: t
2693
+ }
2694
+ }
2695
+ }, {
2696
+ key: "getPlayedTime",
2697
+ value: function() {
2698
+ return (this.ac.currentTime - this.lastPlay) * this.playbackRate
2699
+ }
2700
+ }, {
2701
+ key: "play",
2702
+ value: function(e, t) {
2703
+ if (this.buffer) {
2704
+ this.createSource();
2705
+ var r = this.seekTo(e, t);
2706
+ e = r.start, t = r.end, this.scheduledPause = t, this.source.start(0, e), this.resumeAudioContext(), this.setState(h), this.fireEvent("play")
2707
+ }
2708
+ }
2709
+ }, {
2710
+ key: "pause",
2711
+ value: function() {
2712
+ this.scheduledPause = null, this.startPosition += this.getPlayedTime();
2713
+ try {
2714
+ this.source && this.source.stop(0)
2715
+ } catch (e) {}
2716
+ this.setState(d), this.fireEvent("pause")
2717
+ }
2718
+ }, {
2719
+ key: "getCurrentTime",
2720
+ value: function() {
2721
+ return this.state.getCurrentTime.call(this)
2722
+ }
2723
+ }, {
2724
+ key: "getPlaybackRate",
2725
+ value: function() {
2726
+ return this.playbackRate
2727
+ }
2728
+ }, {
2729
+ key: "setPlaybackRate",
2730
+ value: function(e) {
2731
+ this.playbackRate = e || 1, this.source && this.source.playbackRate.setValueAtTime(this.playbackRate, this.ac.currentTime)
2732
+ }
2733
+ }, {
2734
+ key: "setPlayEnd",
2735
+ value: function(e) {
2736
+ this.scheduledPause = e
2737
+ }
2738
+ }]) && o(t.prototype, r), n && o(t, n), a
2739
+ }(i.Observer);
2740
+ t.default = v, v.scriptBufferSize = 256, e.exports = t.default
2741
+ },
2742
+ 296: e => {
2743
+ function t(e, t, r) {
2744
+ var n, i, a, s, o;
2745
+
2746
+ function u() {
2747
+ var l = Date.now() - s;
2748
+ l < t && l >= 0 ? n = setTimeout(u, t - l) : (n = null, r || (o = e.apply(a, i), a = i = null))
2749
+ }
2750
+ null == t && (t = 100);
2751
+ var l = function() {
2752
+ a = this, i = arguments, s = Date.now();
2753
+ var l = r && !n;
2754
+ return n || (n = setTimeout(u, t)), l && (o = e.apply(a, i), a = i = null), o
2755
+ };
2756
+ return l.clear = function() {
2757
+ n && (clearTimeout(n), n = null)
2758
+ }, l.flush = function() {
2759
+ n && (o = e.apply(a, i), a = i = null, clearTimeout(n), n = null)
2760
+ }, l
2761
+ }
2762
+ t.debounce = t, e.exports = t
2763
+ }
2764
+ }, t = {},
2765
+ function r(n) {
2766
+ var i = t[n];
2767
+ if (void 0 !== i) return i.exports;
2768
+ var a = t[n] = {
2769
+ exports: {}
2770
+ };
2771
+ return e[n](a, a.exports, r), a.exports
2772
+ }(631);
2773
+ var e, t
2774
+ }));
2775
+ //# sourceMappingURL=wavesurfer.min.js.map