ipyaudio 0.1.22__py3-none-any.whl → 0.1.23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. ipyaudio/_version.py +1 -1
  2. ipyaudio/labextension/build_log.json +726 -0
  3. ipyaudio/labextension/package.json +1 -1
  4. ipyaudio/labextension/static/lib_index_js.e0dc1b40eb8d768fd304.js +36 -0
  5. ipyaudio/labextension/static/lib_index_js.e0dc1b40eb8d768fd304.js.map +1 -0
  6. ipyaudio/labextension/static/lib_player_js-lib_recorder_js-data_image_svg_xml_3csvg_xmlns_27http_www_w3_org_2000_svg_27_vi-4e62a2.5626ffcb48021915d5fc.js +1216 -0
  7. ipyaudio/labextension/static/lib_player_js-lib_recorder_js-data_image_svg_xml_3csvg_xmlns_27http_www_w3_org_2000_svg_27_vi-4e62a2.5626ffcb48021915d5fc.js.map +1 -0
  8. ipyaudio/labextension/static/lib_plugin_js.721ea7eaebbdaef9b36c.js +69 -0
  9. ipyaudio/labextension/static/lib_plugin_js.721ea7eaebbdaef9b36c.js.map +1 -0
  10. ipyaudio/labextension/static/remoteEntry.58e9350ee0aa7970ecd3.js +565 -0
  11. ipyaudio/labextension/static/remoteEntry.58e9350ee0aa7970ecd3.js.map +1 -0
  12. ipyaudio/labextension/static/vendors-node_modules_bootstrap_dist_js_bootstrap_bundle_min_js-node_modules_lodash_merge_js-n-f8a88e.73fa57174fc3b67a3760.js +4041 -0
  13. ipyaudio/labextension/static/vendors-node_modules_bootstrap_dist_js_bootstrap_bundle_min_js-node_modules_lodash_merge_js-n-f8a88e.73fa57174fc3b67a3760.js.map +1 -0
  14. ipyaudio/labextension/static/vendors-node_modules_jupyter-dataserializers_lib_index_js.e44af737f0ae9fde402b.js +8001 -0
  15. ipyaudio/labextension/static/vendors-node_modules_jupyter-dataserializers_lib_index_js.e44af737f0ae9fde402b.js.map +1 -0
  16. ipyaudio/nbextension/index.js +13499 -2
  17. ipyaudio/nbextension/index.js.map +1 -1
  18. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/build_log.json +726 -0
  19. {ipyaudio-0.1.22.data → ipyaudio-0.1.23.data}/data/share/jupyter/labextensions/ipyaudio/package.json +1 -1
  20. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/lib_index_js.e0dc1b40eb8d768fd304.js +36 -0
  21. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/lib_index_js.e0dc1b40eb8d768fd304.js.map +1 -0
  22. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/lib_player_js-lib_recorder_js-data_image_svg_xml_3csvg_xmlns_27http_www_w3_org_2000_svg_27_vi-4e62a2.5626ffcb48021915d5fc.js +1216 -0
  23. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/lib_player_js-lib_recorder_js-data_image_svg_xml_3csvg_xmlns_27http_www_w3_org_2000_svg_27_vi-4e62a2.5626ffcb48021915d5fc.js.map +1 -0
  24. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/lib_plugin_js.721ea7eaebbdaef9b36c.js +69 -0
  25. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/lib_plugin_js.721ea7eaebbdaef9b36c.js.map +1 -0
  26. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/remoteEntry.58e9350ee0aa7970ecd3.js +565 -0
  27. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/remoteEntry.58e9350ee0aa7970ecd3.js.map +1 -0
  28. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/vendors-node_modules_bootstrap_dist_js_bootstrap_bundle_min_js-node_modules_lodash_merge_js-n-f8a88e.73fa57174fc3b67a3760.js +4041 -0
  29. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/vendors-node_modules_bootstrap_dist_js_bootstrap_bundle_min_js-node_modules_lodash_merge_js-n-f8a88e.73fa57174fc3b67a3760.js.map +1 -0
  30. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/vendors-node_modules_jupyter-dataserializers_lib_index_js.e44af737f0ae9fde402b.js +8001 -0
  31. ipyaudio-0.1.23.data/data/share/jupyter/labextensions/ipyaudio/static/vendors-node_modules_jupyter-dataserializers_lib_index_js.e44af737f0ae9fde402b.js.map +1 -0
  32. ipyaudio-0.1.23.data/data/share/jupyter/nbextensions/ipyaudio/index.js +13500 -0
  33. ipyaudio-0.1.23.data/data/share/jupyter/nbextensions/ipyaudio/index.js.map +1 -0
  34. {ipyaudio-0.1.22.dist-info → ipyaudio-0.1.23.dist-info}/METADATA +22 -4
  35. ipyaudio-0.1.23.dist-info/RECORD +58 -0
  36. ipyaudio/labextension/static/122.3700f0454aee82938e32.js +0 -1
  37. ipyaudio/labextension/static/270.783a4728ca957ffe8716.js +0 -1
  38. ipyaudio/labextension/static/509.a9d6860fe38ae60aa71f.js +0 -1
  39. ipyaudio/labextension/static/570.97f2a8196b7f1703e636.js +0 -2
  40. ipyaudio/labextension/static/570.97f2a8196b7f1703e636.js.LICENSE.txt +0 -6
  41. ipyaudio/labextension/static/627.315cb148cc156382df50.js +0 -2
  42. ipyaudio/labextension/static/627.315cb148cc156382df50.js.LICENSE.txt +0 -5
  43. ipyaudio/labextension/static/third-party-licenses.json +0 -64
  44. ipyaudio-0.1.22.data/data/share/jupyter/labextensions/ipyaudio/static/122.3700f0454aee82938e32.js +0 -1
  45. ipyaudio-0.1.22.data/data/share/jupyter/labextensions/ipyaudio/static/270.783a4728ca957ffe8716.js +0 -1
  46. ipyaudio-0.1.22.data/data/share/jupyter/labextensions/ipyaudio/static/509.a9d6860fe38ae60aa71f.js +0 -1
  47. ipyaudio-0.1.22.data/data/share/jupyter/labextensions/ipyaudio/static/570.97f2a8196b7f1703e636.js +0 -2
  48. ipyaudio-0.1.22.data/data/share/jupyter/labextensions/ipyaudio/static/570.97f2a8196b7f1703e636.js.LICENSE.txt +0 -6
  49. ipyaudio-0.1.22.data/data/share/jupyter/labextensions/ipyaudio/static/627.315cb148cc156382df50.js +0 -2
  50. ipyaudio-0.1.22.data/data/share/jupyter/labextensions/ipyaudio/static/627.315cb148cc156382df50.js.LICENSE.txt +0 -5
  51. ipyaudio-0.1.22.data/data/share/jupyter/labextensions/ipyaudio/static/third-party-licenses.json +0 -64
  52. ipyaudio-0.1.22.data/data/share/jupyter/nbextensions/ipyaudio/index.js +0 -3
  53. ipyaudio-0.1.22.data/data/share/jupyter/nbextensions/ipyaudio/index.js.map +0 -1
  54. ipyaudio-0.1.22.dist-info/RECORD +0 -48
  55. {ipyaudio-0.1.22.data → ipyaudio-0.1.23.data}/data/etc/jupyter/nbconfig/notebook.d/ipyaudio.json +0 -0
  56. {ipyaudio-0.1.22.data → ipyaudio-0.1.23.data}/data/share/jupyter/labextensions/ipyaudio/install.json +0 -0
  57. {ipyaudio-0.1.22.data → ipyaudio-0.1.23.data}/data/share/jupyter/labextensions/ipyaudio/static/style.js +0 -0
  58. {ipyaudio-0.1.22.data → ipyaudio-0.1.23.data}/data/share/jupyter/nbextensions/ipyaudio/extension.js +0 -0
  59. {ipyaudio-0.1.22.data → ipyaudio-0.1.23.data}/data/share/jupyter/nbextensions/ipyaudio/index.js.LICENSE.txt +0 -0
  60. {ipyaudio-0.1.22.dist-info → ipyaudio-0.1.23.dist-info}/WHEEL +0 -0
  61. {ipyaudio-0.1.22.dist-info → ipyaudio-0.1.23.dist-info}/licenses/LICENSE.txt +0 -0
@@ -0,0 +1,1216 @@
1
+ "use strict";
2
+ (self["webpackChunkipyaudio"] = self["webpackChunkipyaudio"] || []).push([["lib_player_js-lib_recorder_js-data_image_svg_xml_3csvg_xmlns_27http_www_w3_org_2000_svg_27_vi-4e62a2"],{
3
+
4
+ /***/ "./css/widget.css":
5
+ /*!************************!*\
6
+ !*** ./css/widget.css ***!
7
+ \************************/
8
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
+
10
+ __webpack_require__.r(__webpack_exports__);
11
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
13
+ /* harmony export */ });
14
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
15
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
16
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
17
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
18
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
19
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
20
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
21
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
22
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
23
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
24
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
25
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
26
+ /* harmony import */ var _node_modules_css_loader_dist_cjs_js_widget_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../node_modules/css-loader/dist/cjs.js!./widget.css */ "./node_modules/css-loader/dist/cjs.js!./css/widget.css");
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+ var options = {};
39
+
40
+ options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
41
+ options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
42
+
43
+ options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
44
+
45
+ options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
46
+ options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
47
+
48
+ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_widget_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
49
+
50
+
51
+
52
+
53
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_widget_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_widget_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_widget_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
54
+
55
+
56
+ /***/ }),
57
+
58
+ /***/ "./lib/chunk_queue.js":
59
+ /*!****************************!*\
60
+ !*** ./lib/chunk_queue.js ***!
61
+ \****************************/
62
+ /***/ (function(__unused_webpack_module, exports) {
63
+
64
+
65
+ // Copyright (c) Zhendong Peng
66
+ // Distributed under the terms of the Modified BSD License.
67
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
68
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
69
+ return new (P || (P = Promise))(function (resolve, reject) {
70
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
71
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
72
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
73
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
74
+ });
75
+ };
76
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
77
+ class ChunkQueue {
78
+ constructor() {
79
+ this.queue = [];
80
+ this.resolveDequeue = null;
81
+ this.waitingDequeue = null;
82
+ }
83
+ mergeAllChunks() {
84
+ if (this.queue.length === 0) {
85
+ return new Uint8Array(0);
86
+ }
87
+ let totalLength = 0;
88
+ for (const chunk of this.queue) {
89
+ totalLength += chunk.length;
90
+ }
91
+ const merged = new Uint8Array(totalLength);
92
+ let offset = 0;
93
+ for (const chunk of this.queue) {
94
+ merged.set(chunk, offset);
95
+ offset += chunk.length;
96
+ }
97
+ return merged;
98
+ }
99
+ enqueue(chunk) {
100
+ this.queue.push(chunk);
101
+ if (this.resolveDequeue) {
102
+ const merged = this.mergeAllChunks();
103
+ this.resolveDequeue(merged);
104
+ this.queue.length = 0;
105
+ this.resolveDequeue = null;
106
+ this.waitingDequeue = null;
107
+ }
108
+ }
109
+ dequeue(timeoutMs = 0) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ if (this.queue.length > 0) {
112
+ const merged = this.mergeAllChunks();
113
+ this.queue.length = 0;
114
+ return merged;
115
+ }
116
+ if (!this.waitingDequeue) {
117
+ this.waitingDequeue = new Promise((resolve) => {
118
+ this.resolveDequeue = resolve;
119
+ });
120
+ if (timeoutMs > 0) {
121
+ const timeout = setTimeout(() => {
122
+ if (this.resolveDequeue) {
123
+ this.resolveDequeue(new Uint8Array(0));
124
+ this.resolveDequeue = null;
125
+ this.waitingDequeue = null;
126
+ }
127
+ }, timeoutMs);
128
+ this.waitingDequeue
129
+ .then(() => {
130
+ if (timeout) {
131
+ clearTimeout(timeout);
132
+ }
133
+ })
134
+ .catch(() => {
135
+ if (timeout) {
136
+ clearTimeout(timeout);
137
+ }
138
+ });
139
+ }
140
+ }
141
+ return this.waitingDequeue;
142
+ });
143
+ }
144
+ get length() {
145
+ return this.queue.length;
146
+ }
147
+ }
148
+ exports["default"] = ChunkQueue;
149
+
150
+
151
+ /***/ }),
152
+
153
+ /***/ "./lib/player.js":
154
+ /*!***********************!*\
155
+ !*** ./lib/player.js ***!
156
+ \***********************/
157
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
158
+
159
+
160
+ // Copyright (c) Zhendong Peng
161
+ // Distributed under the terms of the Modified BSD License.
162
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
163
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
164
+ return new (P || (P = Promise))(function (resolve, reject) {
165
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
166
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
167
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
168
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
169
+ });
170
+ };
171
+ var __importDefault = (this && this.__importDefault) || function (mod) {
172
+ return (mod && mod.__esModule) ? mod : { "default": mod };
173
+ };
174
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
175
+ exports.PlayerView = exports.PlayerModel = void 0;
176
+ const merge_1 = __importDefault(__webpack_require__(/*! lodash/merge */ "./node_modules/lodash/merge.js"));
177
+ const base_1 = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?ea51");
178
+ const version_1 = __webpack_require__(/*! ./version */ "./lib/version.js");
179
+ const player_1 = __importDefault(__webpack_require__(/*! ./wavesurfer/player */ "./lib/wavesurfer/player.js"));
180
+ // Import the CSS
181
+ __webpack_require__(/*! bootstrap/dist/css/bootstrap.min.css */ "./node_modules/bootstrap/dist/css/bootstrap.min.css");
182
+ __webpack_require__(/*! ../css/widget.css */ "./css/widget.css");
183
+ class PlayerModel extends base_1.DOMWidgetModel {
184
+ defaults() {
185
+ return Object.assign(Object.assign({}, super.defaults()), { _model_name: PlayerModel.model_name, _model_module: PlayerModel.model_module, _model_module_version: PlayerModel.model_module_version, _view_name: PlayerModel.view_name, _view_module: PlayerModel.view_module, _view_module_version: PlayerModel.view_module_version });
186
+ }
187
+ }
188
+ exports.PlayerModel = PlayerModel;
189
+ PlayerModel.serializers = Object.assign({}, base_1.DOMWidgetModel.serializers);
190
+ PlayerModel.model_name = 'PlayerModel';
191
+ PlayerModel.model_module = version_1.MODULE_NAME;
192
+ PlayerModel.model_module_version = version_1.MODULE_VERSION;
193
+ PlayerModel.view_name = 'PlayerView'; // Set to null if no view
194
+ PlayerModel.view_module = version_1.MODULE_NAME; // Set to null if no view
195
+ PlayerModel.view_module_version = version_1.MODULE_VERSION;
196
+ class PlayerView extends base_1.DOMWidgetView {
197
+ render() {
198
+ super.render();
199
+ this.displayed.then(() => __awaiter(this, void 0, void 0, function* () {
200
+ const config = {
201
+ isStreaming: this.model.get('is_streaming'),
202
+ language: this.model.get('language'),
203
+ };
204
+ this._player = player_1.default.create((0, merge_1.default)({}, this.model.get('config'), config));
205
+ this.el.appendChild(this._player.el);
206
+ this.model.on('change:audio', () => {
207
+ this._player.sampleRate = this.model.get('rate');
208
+ this._player.load(this.model.get('audio'));
209
+ });
210
+ this.model.on('change:is_done', () => {
211
+ this._player.setDone();
212
+ });
213
+ }));
214
+ }
215
+ }
216
+ exports.PlayerView = PlayerView;
217
+
218
+
219
+ /***/ }),
220
+
221
+ /***/ "./lib/recorder.js":
222
+ /*!*************************!*\
223
+ !*** ./lib/recorder.js ***!
224
+ \*************************/
225
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
226
+
227
+
228
+ // Copyright (c) Zhendong Peng
229
+ // Distributed under the terms of the Modified BSD License.
230
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
231
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
232
+ return new (P || (P = Promise))(function (resolve, reject) {
233
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
234
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
235
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
236
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
237
+ });
238
+ };
239
+ var __importDefault = (this && this.__importDefault) || function (mod) {
240
+ return (mod && mod.__esModule) ? mod : { "default": mod };
241
+ };
242
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
243
+ exports.RecorderView = exports.RecorderModel = void 0;
244
+ const merge_1 = __importDefault(__webpack_require__(/*! lodash/merge */ "./node_modules/lodash/merge.js"));
245
+ const jupyter_dataserializers_1 = __webpack_require__(/*! jupyter-dataserializers */ "webpack/sharing/consume/default/jupyter-dataserializers/jupyter-dataserializers");
246
+ const base_1 = __webpack_require__(/*! @jupyter-widgets/base */ "webpack/sharing/consume/default/@jupyter-widgets/base?ea51");
247
+ const version_1 = __webpack_require__(/*! ./version */ "./lib/version.js");
248
+ const chunk_queue_1 = __importDefault(__webpack_require__(/*! ./chunk_queue */ "./lib/chunk_queue.js"));
249
+ const recorder_1 = __importDefault(__webpack_require__(/*! ./wavesurfer/recorder */ "./lib/wavesurfer/recorder.js"));
250
+ // Import the CSS
251
+ __webpack_require__(/*! bootstrap/dist/css/bootstrap.min.css */ "./node_modules/bootstrap/dist/css/bootstrap.min.css");
252
+ __webpack_require__(/*! ../css/widget.css */ "./css/widget.css");
253
+ class RecorderModel extends base_1.DOMWidgetModel {
254
+ defaults() {
255
+ return Object.assign(Object.assign({}, super.defaults()), { _model_name: RecorderModel.model_name, _model_module: RecorderModel.model_module, _model_module_version: RecorderModel.model_module_version, _view_name: RecorderModel.view_name, _view_module: RecorderModel.view_module, _view_module_version: RecorderModel.view_module_version, chunk: new Uint8Array(0), rate: 16000, end: false });
256
+ }
257
+ }
258
+ exports.RecorderModel = RecorderModel;
259
+ RecorderModel.serializers = Object.assign(Object.assign({}, base_1.DOMWidgetModel.serializers), {
260
+ // Add any extra serializers here
261
+ chunk: jupyter_dataserializers_1.simplearray_serialization });
262
+ RecorderModel.model_name = 'RecorderModel';
263
+ RecorderModel.model_module = version_1.MODULE_NAME;
264
+ RecorderModel.model_module_version = version_1.MODULE_VERSION;
265
+ RecorderModel.view_name = 'RecorderView'; // Set to null if no view
266
+ RecorderModel.view_module = version_1.MODULE_NAME; // Set to null if no view
267
+ RecorderModel.view_module_version = version_1.MODULE_VERSION;
268
+ class RecorderView extends base_1.DOMWidgetView {
269
+ constructor() {
270
+ super(...arguments);
271
+ this._chunks = new chunk_queue_1.default();
272
+ this._isFirstChunk = true;
273
+ this._isCompleted = false;
274
+ }
275
+ _sendChunk() {
276
+ var _a;
277
+ return __awaiter(this, void 0, void 0, function* () {
278
+ // 1 seconds maximum wait time
279
+ const chunk = yield this._chunks.dequeue(1000 + ((_a = this._recorder.timeSlice) !== null && _a !== void 0 ? _a : 20));
280
+ if (chunk.length > 0) {
281
+ this.model.set('chunk', { array: chunk, shape: [chunk.length] });
282
+ this.model.save_changes();
283
+ }
284
+ if (this._isCompleted) {
285
+ this.model.set('completed', true);
286
+ this.model.save_changes();
287
+ }
288
+ });
289
+ }
290
+ render() {
291
+ super.render();
292
+ this.displayed.then(() => __awaiter(this, void 0, void 0, function* () {
293
+ const language = this.model.get('language');
294
+ this._recorder = recorder_1.default.create((0, merge_1.default)({}, this.model.get('config'), { language }), (0, merge_1.default)({}, this.model.get('player_config'), { language }));
295
+ this.el.appendChild(this._recorder.el);
296
+ this.model.on('msg:custom', (msg) => __awaiter(this, void 0, void 0, function* () {
297
+ if (msg.msg_type === 'chunk_received') {
298
+ this._sendChunk();
299
+ }
300
+ }));
301
+ this._recorder.onRecordStart(() => {
302
+ this._isCompleted = false;
303
+ this._isFirstChunk = true;
304
+ this.model.set('completed', false);
305
+ this.model.set('rate', this._recorder.sampleRate);
306
+ this.model.save_changes();
307
+ });
308
+ this._recorder.onRecordChunk((blob) => __awaiter(this, void 0, void 0, function* () {
309
+ this._chunks.enqueue(new Uint8Array(yield blob.arrayBuffer()));
310
+ if (this.model.get('sync') && this._isFirstChunk) {
311
+ this._isFirstChunk = false;
312
+ this._sendChunk();
313
+ }
314
+ }));
315
+ this._recorder.onRecordEnd((blob) => __awaiter(this, void 0, void 0, function* () {
316
+ this._isCompleted = true;
317
+ if (!this.model.get('sync')) {
318
+ this.model.set('completed', true);
319
+ this.model.save_changes();
320
+ }
321
+ }));
322
+ }));
323
+ }
324
+ }
325
+ exports.RecorderView = RecorderView;
326
+
327
+
328
+ /***/ }),
329
+
330
+ /***/ "./lib/version.js":
331
+ /*!************************!*\
332
+ !*** ./lib/version.js ***!
333
+ \************************/
334
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
335
+
336
+
337
+ // Copyright (c) Zhendong Peng
338
+ // Distributed under the terms of the Modified BSD License.
339
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
340
+ exports.MODULE_NAME = exports.MODULE_VERSION = void 0;
341
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
342
+ // @ts-ignore
343
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
344
+ const data = __webpack_require__(/*! ../package.json */ "./package.json");
345
+ /**
346
+ * The _model_module_version/_view_module_version this package implements.
347
+ *
348
+ * The html widget manager assumes that this is the same as the npm package
349
+ * version number.
350
+ */
351
+ exports.MODULE_VERSION = data.version;
352
+ /*
353
+ * The current package name.
354
+ */
355
+ exports.MODULE_NAME = data.name;
356
+
357
+
358
+ /***/ }),
359
+
360
+ /***/ "./lib/wavesurfer/pcm_player.js":
361
+ /*!**************************************!*\
362
+ !*** ./lib/wavesurfer/pcm_player.js ***!
363
+ \**************************************/
364
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
365
+
366
+
367
+ // Copyright (c) Zhendong Peng
368
+ // Distributed under the terms of the Modified BSD License.
369
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
370
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
371
+ return new (P || (P = Promise))(function (resolve, reject) {
372
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
373
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
374
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
375
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
376
+ });
377
+ };
378
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
379
+ exports.PCMPlayer = void 0;
380
+ const utils_1 = __webpack_require__(/*! ./utils */ "./lib/wavesurfer/utils.js");
381
+ class PCMPlayer {
382
+ constructor(options) {
383
+ this._isDone = false;
384
+ this._isPlaying = true;
385
+ this._samples = new Int16Array(0);
386
+ this._allSamples = new Int16Array(0);
387
+ this._options = Object.assign({ channels: 1, sampleRate: 16000, flushTime: 100, language: 'en' }, options);
388
+ this.playButton = (0, utils_1.createElement)('button', 'btn btn-danger me-3 my-3', '<i class="fa fa-pause"></i>');
389
+ this.playButton.onclick = () => {
390
+ this._isPlaying = !this._isPlaying;
391
+ this._isPlaying ? this.play() : this.pause();
392
+ this.playButton.innerHTML = `<i class="fa fa-${this._isPlaying ? 'pause' : 'play'}"></i>`;
393
+ };
394
+ this._interval = window.setInterval(this.flush.bind(this), this._options.flushTime);
395
+ this._audioCtx = new (window.AudioContext || window.webkitAudioContext)();
396
+ this._gainNode = this._audioCtx.createGain();
397
+ this._gainNode.gain.value = 1.0;
398
+ this._gainNode.connect(this._audioCtx.destination);
399
+ this._startTime = this._audioCtx.currentTime;
400
+ }
401
+ set sampleRate(rate) {
402
+ this._options.sampleRate = rate;
403
+ }
404
+ setDone() {
405
+ this._isDone = true;
406
+ }
407
+ feed(base64Data) {
408
+ const binaryString = atob(base64Data);
409
+ const buffer = new ArrayBuffer(binaryString.length);
410
+ const bufferView = new Uint8Array(buffer);
411
+ for (let i = 0; i < binaryString.length; i++) {
412
+ bufferView[i] = binaryString.charCodeAt(i);
413
+ }
414
+ const data = new Int16Array(buffer);
415
+ this._samples = new Int16Array([...this._samples, ...data]);
416
+ this._allSamples = new Int16Array([...this._allSamples, ...data]);
417
+ }
418
+ get url() {
419
+ return (0, utils_1.createObjectURL)(this._allSamples.buffer, {
420
+ numChannels: this._options.channels,
421
+ sampleRate: this._options.sampleRate,
422
+ });
423
+ }
424
+ flush() {
425
+ if (!this._samples.length) {
426
+ return;
427
+ }
428
+ const isDone = this._isDone;
429
+ const bufferSource = this._audioCtx.createBufferSource();
430
+ const length = this._samples.length / this._options.channels;
431
+ const audioBuffer = this._audioCtx.createBuffer(this._options.channels, length, this._options.sampleRate);
432
+ for (let channel = 0; channel < this._options.channels; channel++) {
433
+ const audioData = audioBuffer.getChannelData(channel);
434
+ let offset = channel;
435
+ for (let i = 0; i < length; i++) {
436
+ audioData[i] = this._samples[offset] / 32768;
437
+ offset += this._options.channels;
438
+ }
439
+ }
440
+ this._startTime = Math.max(this._startTime, this._audioCtx.currentTime);
441
+ bufferSource.buffer = audioBuffer;
442
+ bufferSource.connect(this._gainNode);
443
+ bufferSource.start(this._startTime);
444
+ bufferSource.onended = () => {
445
+ this.playButton.disabled = isDone ? true : false;
446
+ };
447
+ this._startTime += audioBuffer.duration;
448
+ this._samples = new Int16Array(0);
449
+ }
450
+ play() {
451
+ return __awaiter(this, void 0, void 0, function* () {
452
+ yield this._audioCtx.resume();
453
+ });
454
+ }
455
+ pause() {
456
+ return __awaiter(this, void 0, void 0, function* () {
457
+ yield this._audioCtx.suspend();
458
+ });
459
+ }
460
+ volume(volume) {
461
+ this._gainNode.gain.value = volume;
462
+ }
463
+ destroy() {
464
+ if (this._interval) {
465
+ clearInterval(this._interval);
466
+ }
467
+ this._samples = new Int16Array(0);
468
+ this._audioCtx.close();
469
+ }
470
+ }
471
+ exports.PCMPlayer = PCMPlayer;
472
+ exports["default"] = PCMPlayer;
473
+
474
+
475
+ /***/ }),
476
+
477
+ /***/ "./lib/wavesurfer/player.js":
478
+ /*!**********************************!*\
479
+ !*** ./lib/wavesurfer/player.js ***!
480
+ \**********************************/
481
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
482
+
483
+
484
+ // Copyright (c) Zhendong Peng
485
+ // Distributed under the terms of the Modified BSD License.
486
+ var __importDefault = (this && this.__importDefault) || function (mod) {
487
+ return (mod && mod.__esModule) ? mod : { "default": mod };
488
+ };
489
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
490
+ const wavesurfer_js_1 = __importDefault(__webpack_require__(/*! wavesurfer.js */ "./node_modules/wavesurfer.js/dist/wavesurfer.cjs"));
491
+ const hover_js_1 = __importDefault(__webpack_require__(/*! wavesurfer.js/dist/plugins/hover.js */ "./node_modules/wavesurfer.js/dist/plugins/hover.cjs"));
492
+ const minimap_js_1 = __importDefault(__webpack_require__(/*! wavesurfer.js/dist/plugins/minimap.js */ "./node_modules/wavesurfer.js/dist/plugins/minimap.cjs"));
493
+ const spectrogram_js_1 = __importDefault(__webpack_require__(/*! wavesurfer.js/dist/plugins/spectrogram.js */ "./node_modules/wavesurfer.js/dist/plugins/spectrogram.cjs"));
494
+ const timeline_js_1 = __importDefault(__webpack_require__(/*! wavesurfer.js/dist/plugins/timeline.js */ "./node_modules/wavesurfer.js/dist/plugins/timeline.cjs"));
495
+ const zoom_js_1 = __importDefault(__webpack_require__(/*! wavesurfer.js/dist/plugins/zoom.js */ "./node_modules/wavesurfer.js/dist/plugins/zoom.cjs"));
496
+ const pcm_player_1 = __importDefault(__webpack_require__(/*! ./pcm_player */ "./lib/wavesurfer/pcm_player.js"));
497
+ const reward_1 = __webpack_require__(/*! ./reward */ "./lib/wavesurfer/reward.js");
498
+ const utils_1 = __webpack_require__(/*! ./utils */ "./lib/wavesurfer/utils.js");
499
+ class Player {
500
+ constructor(config) {
501
+ this.el = (0, utils_1.createElement)('div', 'lm-Widget');
502
+ this._container = (0, utils_1.createElement)('div', 'waveform');
503
+ this._duration = (0, utils_1.createElement)('div', 'duration', '0:00');
504
+ this._currentTime = (0, utils_1.createElement)('div', 'time', '0:00');
505
+ this._container.append(this._duration, this._currentTime);
506
+ this.el.append(this._container);
507
+ this._config = config;
508
+ }
509
+ get url() {
510
+ if (this._config.isStreaming) {
511
+ return this._pcmPlayer.url;
512
+ }
513
+ else {
514
+ return (0, utils_1.createObjectURL)(this._wavesurfer.getDecodedData());
515
+ }
516
+ }
517
+ set sampleRate(rate) {
518
+ if (this._config.isStreaming) {
519
+ this._pcmPlayer.sampleRate = rate;
520
+ }
521
+ this._wavesurfer.options.sampleRate = rate;
522
+ }
523
+ load(url) {
524
+ if (this._config.isStreaming) {
525
+ this._pcmPlayer.feed(url);
526
+ this._wavesurfer.load(this.url);
527
+ }
528
+ else {
529
+ this._wavesurfer.load(url);
530
+ }
531
+ }
532
+ setDone() {
533
+ this._pcmPlayer.setDone();
534
+ }
535
+ createPCMPlayer() {
536
+ if (this._config.isStreaming) {
537
+ this._pcmPlayer = new pcm_player_1.default({
538
+ channels: 1,
539
+ sampleRate: this._config.options.sampleRate,
540
+ });
541
+ this.el.append(this._pcmPlayer.playButton);
542
+ }
543
+ }
544
+ createDownloadButton() {
545
+ const downloadButton = (0, utils_1.createElement)('button', 'btn btn-success my-3');
546
+ const label = this._config.language === 'zh' ? '下载' : 'Download';
547
+ downloadButton.innerHTML = `${label} <i class="fa fa-download"></i>`;
548
+ downloadButton.onclick = () => {
549
+ const link = document.createElement('a');
550
+ link.href = this.url;
551
+ link.download = 'audio.wav';
552
+ link.click();
553
+ };
554
+ this.el.append(downloadButton);
555
+ }
556
+ static createPlugins(config) {
557
+ var _a;
558
+ const pluginMap = {
559
+ hover: () => { var _a; return hover_js_1.default.create((_a = config.pluginOptions) === null || _a === void 0 ? void 0 : _a.hover); },
560
+ minimap: () => {
561
+ var _a, _b;
562
+ return minimap_js_1.default.create(Object.assign(Object.assign({}, (_a = config.pluginOptions) === null || _a === void 0 ? void 0 : _a.minimap), { plugins: [
563
+ hover_js_1.default.create(Object.assign(Object.assign({}, (_b = config.pluginOptions) === null || _b === void 0 ? void 0 : _b.hover), { lineWidth: 1 })),
564
+ ] }));
565
+ },
566
+ spectrogram: () => { var _a; return spectrogram_js_1.default.create((_a = config.pluginOptions) === null || _a === void 0 ? void 0 : _a.spectrogram); },
567
+ timeline: () => { var _a; return timeline_js_1.default.create((_a = config.pluginOptions) === null || _a === void 0 ? void 0 : _a.timeline); },
568
+ zoom: () => { var _a; return zoom_js_1.default.create((_a = config.pluginOptions) === null || _a === void 0 ? void 0 : _a.zoom); },
569
+ };
570
+ return Array.from((_a = config.plugins) !== null && _a !== void 0 ? _a : [])
571
+ .map((plugin) => { var _a; return (_a = pluginMap[plugin]) === null || _a === void 0 ? void 0 : _a.call(pluginMap); })
572
+ .filter(Boolean);
573
+ }
574
+ createWaveSurfer() {
575
+ this._wavesurfer = wavesurfer_js_1.default.create(Object.assign(Object.assign({}, this._config.options), { container: this._container, plugins: Player.createPlugins(this._config) }));
576
+ this._wavesurfer.on('interaction', () => this._wavesurfer.playPause());
577
+ this._wavesurfer.on('decode', (time) => (this._duration.textContent = (0, utils_1.formatTime)(time)));
578
+ this._wavesurfer.on('timeupdate', (time) => (this._currentTime.textContent = (0, utils_1.formatTime)(time)));
579
+ }
580
+ static create(config) {
581
+ const instance = new Player(config);
582
+ instance.createWaveSurfer();
583
+ instance.createPCMPlayer();
584
+ instance.createDownloadButton();
585
+ instance.el.appendChild((0, reward_1.createRewardDropdown)(config.language || 'en'));
586
+ return instance;
587
+ }
588
+ }
589
+ exports["default"] = Player;
590
+
591
+
592
+ /***/ }),
593
+
594
+ /***/ "./lib/wavesurfer/recorder.js":
595
+ /*!************************************!*\
596
+ !*** ./lib/wavesurfer/recorder.js ***!
597
+ \************************************/
598
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
599
+
600
+
601
+ // Copyright (c) Zhendong Peng
602
+ // Distributed under the terms of the Modified BSD License.
603
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
604
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
605
+ return new (P || (P = Promise))(function (resolve, reject) {
606
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
607
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
608
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
609
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
610
+ });
611
+ };
612
+ var __importDefault = (this && this.__importDefault) || function (mod) {
613
+ return (mod && mod.__esModule) ? mod : { "default": mod };
614
+ };
615
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
616
+ const wavesurfer_js_1 = __importDefault(__webpack_require__(/*! wavesurfer.js */ "./node_modules/wavesurfer.js/dist/wavesurfer.cjs"));
617
+ const record_js_1 = __importDefault(__webpack_require__(/*! wavesurfer.js/dist/plugins/record.js */ "./node_modules/wavesurfer.js/dist/plugins/record.cjs"));
618
+ const player_1 = __importDefault(__webpack_require__(/*! ./player */ "./lib/wavesurfer/player.js"));
619
+ const utils_1 = __webpack_require__(/*! ./utils */ "./lib/wavesurfer/utils.js");
620
+ class Recorder {
621
+ constructor(config, playerConfig) {
622
+ this.el = (0, utils_1.createElement)('div', 'lm-Widget');
623
+ this._container = (0, utils_1.createElement)('div', 'waveform');
624
+ this._currentTime = (0, utils_1.createElement)('div', 'time', '0:00');
625
+ this._container.append(this._currentTime);
626
+ this._config = config;
627
+ this._player = player_1.default.create(playerConfig);
628
+ }
629
+ get sampleRate() {
630
+ return this._wavesurfer.options.sampleRate;
631
+ }
632
+ get timeSlice() {
633
+ var _a;
634
+ return (_a = this._config.recordOptions) === null || _a === void 0 ? void 0 : _a.mediaRecorderTimeslice;
635
+ }
636
+ set sampleRate(rate) {
637
+ this._wavesurfer.options.sampleRate = rate;
638
+ this._player.sampleRate = rate;
639
+ }
640
+ createWaveSurfer() {
641
+ this._wavesurfer = wavesurfer_js_1.default.create(Object.assign(Object.assign({}, this._config.options), { container: this._container }));
642
+ }
643
+ createRateSelect() {
644
+ this._rateSelect = (0, utils_1.createElement)('select', 'form-select-sm d-inline-block me-3 my-3 w-25');
645
+ const rates = [8000, 16000, 22050, 24000, 44100, 48000];
646
+ rates.forEach((rate) => {
647
+ const option = document.createElement('option');
648
+ option.value = rate.toString();
649
+ option.text = `${rate} Hz`;
650
+ if (rate === 16000) {
651
+ option.selected = true;
652
+ }
653
+ this._rateSelect.appendChild(option);
654
+ });
655
+ }
656
+ createMicSelect() {
657
+ this._micSelect = (0, utils_1.createElement)('select', 'form-select-sm d-inline-block me-3 my-3 w-50');
658
+ navigator.mediaDevices
659
+ .getUserMedia({ audio: true, video: false })
660
+ .then((stream) => {
661
+ record_js_1.default.getAvailableAudioDevices().then((devices) => {
662
+ devices.forEach((device) => {
663
+ const option = document.createElement('option');
664
+ option.value = device.deviceId;
665
+ option.text = device.label || device.deviceId;
666
+ this._micSelect.appendChild(option);
667
+ });
668
+ });
669
+ })
670
+ .catch((err) => {
671
+ const label = this._config.language === 'zh' ? '访问麦克风失败' : 'Error accessing the microphone: ';
672
+ throw new Error(label + err.message);
673
+ });
674
+ }
675
+ createPauseButton() {
676
+ this._pauseButton = (0, utils_1.createElement)('button', 'btn btn-outline-danger me-3 my-3', '<i class="fa fa-pause"></i>');
677
+ this._pauseButton.disabled = true;
678
+ this._pauseButton.onclick = () => {
679
+ if (this._recorder.isRecording()) {
680
+ this._recorder.pauseRecording();
681
+ this._pauseButton.innerHTML = '<i class="fa fa-play"></i>';
682
+ this._container.style.display = 'none';
683
+ this._player.el.style.display = 'block';
684
+ }
685
+ else {
686
+ this._recorder.resumeRecording();
687
+ this._pauseButton.innerHTML = '<i class="fa fa-pause"></i>';
688
+ this._container.style.display = 'block';
689
+ this._player.el.style.display = 'none';
690
+ }
691
+ };
692
+ }
693
+ createRecordButton() {
694
+ this._recordButton = (0, utils_1.createElement)('button', 'btn btn-danger me-3 my-3', '<i class="fa fa-microphone"></i>');
695
+ this._recordButton.onclick = () => {
696
+ if (this._recorder.isRecording() || this._recorder.isPaused()) {
697
+ this._recorder.stopRecording();
698
+ this._container.style.display = 'none';
699
+ this._player.el.style.display = 'block';
700
+ }
701
+ else {
702
+ this._wavesurfer.options.normalize = false;
703
+ this.sampleRate = parseInt(this._rateSelect.value);
704
+ this._recorder.startRecording({ deviceId: this._micSelect.value }).then(() => {
705
+ this._pauseButton.disabled = false;
706
+ this._rateSelect.disabled = true;
707
+ this._micSelect.disabled = true;
708
+ this._pauseButton.innerHTML = '<i class="fa fa-pause"></i>';
709
+ this._recordButton.innerHTML = '<i class="fa fa-stop"></i>';
710
+ this._container.style.display = 'block';
711
+ this._player.el.style.display = 'none';
712
+ });
713
+ }
714
+ };
715
+ }
716
+ onRecordStart(callback) {
717
+ this._recorder.on('record-start', () => {
718
+ callback();
719
+ });
720
+ }
721
+ onRecordChunk(callback) {
722
+ this._recorder.on('record-data-available', (blob) => {
723
+ callback(blob);
724
+ });
725
+ }
726
+ onRecordEnd(callback) {
727
+ this._recorder.on('record-end', (blob) => __awaiter(this, void 0, void 0, function* () {
728
+ this._player.load(URL.createObjectURL(blob));
729
+ this._recordButton.disabled = true;
730
+ this._pauseButton.disabled = true;
731
+ yield callback(blob);
732
+ this._recordButton.disabled = false;
733
+ this._pauseButton.disabled = true;
734
+ this._rateSelect.disabled = false;
735
+ this._micSelect.disabled = false;
736
+ this._pauseButton.innerHTML = '<i class="fa fa-play"></i>';
737
+ this._recordButton.innerHTML = '<i class="fa fa-microphone"></i>';
738
+ }));
739
+ }
740
+ createRecorder() {
741
+ this._wavesurfer.toggleInteraction(false);
742
+ this._recorder = this._wavesurfer.registerPlugin(record_js_1.default.create(this._config.recordOptions));
743
+ this.createRateSelect();
744
+ this.createMicSelect();
745
+ this.createPauseButton();
746
+ this.createRecordButton();
747
+ this._container.style.display = 'none';
748
+ this._player.el.style.display = 'none';
749
+ this.el.append(this._recordButton, this._pauseButton, this._rateSelect, this._micSelect, this._container, this._player.el);
750
+ this._recorder.on('record-pause', (blob) => {
751
+ this._player.load(URL.createObjectURL(blob));
752
+ });
753
+ this._recorder.on('record-progress', (time) => {
754
+ this._currentTime.textContent = (0, utils_1.formatTime)(time / 1000);
755
+ });
756
+ }
757
+ static create(config, playerConfig) {
758
+ const instance = new Recorder(config, playerConfig);
759
+ instance.createWaveSurfer();
760
+ instance.createRecorder();
761
+ return instance;
762
+ }
763
+ }
764
+ exports["default"] = Recorder;
765
+
766
+
767
+ /***/ }),
768
+
769
+ /***/ "./lib/wavesurfer/reward.js":
770
+ /*!**********************************!*\
771
+ !*** ./lib/wavesurfer/reward.js ***!
772
+ \**********************************/
773
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
774
+
775
+
776
+ // Copyright (c) Zhendong Peng
777
+ // Distributed under the terms of the Modified BSD License.
778
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
779
+ exports.createRewardDropdown = void 0;
780
+ __webpack_require__(/*! bootstrap/dist/js/bootstrap.bundle.min.js */ "./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js");
781
+ const utils_1 = __webpack_require__(/*! ./utils */ "./lib/wavesurfer/utils.js");
782
+ function createRewardDropdown(language) {
783
+ const rewardDropdown = (0, utils_1.createElement)('div', 'dropdown my-3 float-end text-end');
784
+ const dropdownButton = (0, utils_1.createElement)('button', 'btn btn-warning dropdown-toggle');
785
+ dropdownButton.setAttribute('data-bs-toggle', 'dropdown');
786
+ dropdownButton.innerHTML =
787
+ language === 'zh' ? '<i class="fa fa-thumbs-o-up"></i> 赞赏' : '<i class="fa fa-coffee"></i> Buy me a coffee';
788
+ const dropdownMenu = (0, utils_1.createElement)('ul', 'dropdown-menu p-2');
789
+ const url = 'https://modelscope.cn/models/pengzhendong/pengzhendong/resolve/master/images';
790
+ const rewards = [
791
+ {
792
+ imgSrc: `${url}/wechat-reward.jpg`,
793
+ name: language === 'zh' ? '微信' : 'WeChat',
794
+ },
795
+ {
796
+ imgSrc: `${url}/alipay-reward.jpg`,
797
+ name: language === 'zh' ? '支付宝' : 'AliPay',
798
+ },
799
+ ];
800
+ const table = (0, utils_1.createElement)('table', 'table table-bordered mb-0');
801
+ const tbody = (0, utils_1.createElement)('tbody');
802
+ const imageRow = (0, utils_1.createElement)('tr');
803
+ rewards.forEach((reward) => {
804
+ const cell = (0, utils_1.createElement)('td', 'text-center p-2');
805
+ cell.style.width = `${100 / rewards.length}%`;
806
+ const img = (0, utils_1.createElement)('img', 'img-fluid d-block mx-auto');
807
+ img.src = reward.imgSrc;
808
+ cell.appendChild(img);
809
+ const name = (0, utils_1.createElement)('div', 'text-center mt-2 fw-bold');
810
+ name.textContent = reward.name;
811
+ cell.appendChild(name);
812
+ imageRow.appendChild(cell);
813
+ });
814
+ tbody.appendChild(imageRow);
815
+ table.appendChild(tbody);
816
+ const dropdownItem = (0, utils_1.createElement)('li', '');
817
+ dropdownItem.appendChild(table);
818
+ dropdownMenu.appendChild(dropdownItem);
819
+ const link = (0, utils_1.createElement)('a');
820
+ link.href = 'https://github.com/pengzhendong/ipyaudio';
821
+ link.target = '_blank';
822
+ const starBadge = (0, utils_1.createElement)('img', 'img-fluid me-3');
823
+ starBadge.src = 'https://img.shields.io/github/stars/pengzhendong/ipyaudio.svg';
824
+ link.appendChild(starBadge);
825
+ rewardDropdown.appendChild(link);
826
+ rewardDropdown.appendChild(dropdownButton);
827
+ rewardDropdown.appendChild(dropdownMenu);
828
+ return rewardDropdown;
829
+ }
830
+ exports.createRewardDropdown = createRewardDropdown;
831
+
832
+
833
+ /***/ }),
834
+
835
+ /***/ "./lib/wavesurfer/utils.js":
836
+ /*!*********************************!*\
837
+ !*** ./lib/wavesurfer/utils.js ***!
838
+ \*********************************/
839
+ /***/ ((__unused_webpack_module, exports) => {
840
+
841
+
842
+ // Copyright (c) Zhendong Peng
843
+ // Distributed under the terms of the Modified BSD License.
844
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
845
+ exports.createObjectURL = exports.formatTime = exports.createElement = void 0;
846
+ const createElement = (tagName, className = '', innerHTML = '') => {
847
+ const element = document.createElement(tagName);
848
+ element.className = className;
849
+ element.innerHTML = innerHTML;
850
+ return element;
851
+ };
852
+ exports.createElement = createElement;
853
+ const formatTime = (seconds) => {
854
+ const minutes = Math.floor(seconds / 60);
855
+ const secondsRemainder = Math.round(seconds) % 60;
856
+ const paddedSeconds = `0${secondsRemainder}`.slice(-2);
857
+ return `${minutes}:${paddedSeconds}`;
858
+ };
859
+ exports.formatTime = formatTime;
860
+ function getWavHeader(options) {
861
+ const numFrames = options.numFrames;
862
+ const numChannels = options.numChannels || 2;
863
+ const sampleRate = options.sampleRate || 44100;
864
+ const bytesPerSample = options.isFloat ? 4 : 2;
865
+ const format = options.isFloat ? 3 : 1;
866
+ const blockAlign = numChannels * bytesPerSample;
867
+ const byteRate = sampleRate * blockAlign;
868
+ const dataSize = numFrames * blockAlign;
869
+ const buffer = new ArrayBuffer(44);
870
+ const dv = new DataView(buffer);
871
+ let p = 0;
872
+ function writeString(s) {
873
+ for (let i = 0; i < s.length; i++) {
874
+ dv.setUint8(p + i, s.charCodeAt(i));
875
+ }
876
+ p += s.length;
877
+ }
878
+ function writeUint32(d) {
879
+ dv.setUint32(p, d, true);
880
+ p += 4;
881
+ }
882
+ function writeUint16(d) {
883
+ dv.setUint16(p, d, true);
884
+ p += 2;
885
+ }
886
+ writeString('RIFF'); // ChunkID
887
+ writeUint32(dataSize + 36); // ChunkSize
888
+ writeString('WAVE'); // Format
889
+ writeString('fmt '); // Subchunk1ID
890
+ writeUint32(16); // Subchunk1Size
891
+ writeUint16(format); // AudioFormat https://i.stack.imgur.com/BuSmb.png
892
+ writeUint16(numChannels); // NumChannels
893
+ writeUint32(sampleRate); // SampleRate
894
+ writeUint32(byteRate); // ByteRate
895
+ writeUint16(blockAlign); // BlockAlign
896
+ writeUint16(bytesPerSample * 8); // BitsPerSample
897
+ writeString('data'); // Subchunk2ID
898
+ writeUint32(dataSize); // Subchunk2Size
899
+ return new Uint8Array(buffer);
900
+ }
901
+ function interleaveChannels(buffer) {
902
+ const { numberOfChannels, length } = buffer;
903
+ const pcmData = new Int16Array(length * numberOfChannels);
904
+ for (let channel = 0; channel < numberOfChannels; channel++) {
905
+ const data = buffer.getChannelData(channel);
906
+ const isFloat = data instanceof Float32Array;
907
+ for (let i = 0; i < length; i++) {
908
+ // convert float32 to int16
909
+ pcmData[i * numberOfChannels + channel] = isFloat ? data[i] * 32767 : data[i];
910
+ }
911
+ }
912
+ return pcmData;
913
+ }
914
+ function getWavBytes(buffer, options) {
915
+ if (!buffer) {
916
+ return new Uint8Array();
917
+ }
918
+ let headerBytes;
919
+ let pcmData;
920
+ if (buffer instanceof ArrayBuffer) {
921
+ headerBytes = getWavHeader({
922
+ isFloat: false,
923
+ numChannels: options.numChannels,
924
+ sampleRate: options.sampleRate,
925
+ numFrames: buffer.byteLength / Int16Array.BYTES_PER_ELEMENT,
926
+ });
927
+ pcmData = new Uint8Array(buffer);
928
+ }
929
+ else {
930
+ headerBytes = getWavHeader({
931
+ isFloat: false,
932
+ numChannels: buffer.numberOfChannels,
933
+ sampleRate: buffer.sampleRate,
934
+ numFrames: buffer.length,
935
+ });
936
+ pcmData = new Uint8Array(interleaveChannels(buffer).buffer);
937
+ }
938
+ const wavBytes = new Uint8Array(headerBytes.length + pcmData.length);
939
+ wavBytes.set(headerBytes, 0);
940
+ wavBytes.set(pcmData, headerBytes.length);
941
+ return wavBytes;
942
+ }
943
+ const createObjectURL = (buffer, options = {
944
+ numChannels: 1,
945
+ sampleRate: 44100,
946
+ }) => {
947
+ let wavBytes;
948
+ if (buffer instanceof AudioBuffer) {
949
+ wavBytes = getWavBytes(buffer, {
950
+ numChannels: buffer.numberOfChannels,
951
+ sampleRate: buffer.sampleRate,
952
+ });
953
+ }
954
+ else {
955
+ wavBytes = getWavBytes(buffer, options);
956
+ }
957
+ return URL.createObjectURL(new Blob([wavBytes], { type: 'audio/wav' }));
958
+ };
959
+ exports.createObjectURL = createObjectURL;
960
+
961
+
962
+ /***/ }),
963
+
964
+ /***/ "./node_modules/css-loader/dist/cjs.js!./css/widget.css":
965
+ /*!**************************************************************!*\
966
+ !*** ./node_modules/css-loader/dist/cjs.js!./css/widget.css ***!
967
+ \**************************************************************/
968
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
969
+
970
+ __webpack_require__.r(__webpack_exports__);
971
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
972
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
973
+ /* harmony export */ });
974
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
975
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
976
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
977
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
978
+ // Imports
979
+
980
+
981
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
982
+ // Module
983
+ ___CSS_LOADER_EXPORT___.push([module.id, `.waveform {
984
+ background-color: black;
985
+ cursor: pointer;
986
+ position: relative;
987
+ width: 100%;
988
+ }
989
+
990
+ .duration, .time {
991
+ background: rgba(0, 0, 0, 0.75);
992
+ color: #DDDD;
993
+ font-size: 11px;
994
+ position: absolute;
995
+ bottom: 0;
996
+ z-index: 11;
997
+ }
998
+
999
+ .duration { right: 0 }
1000
+
1001
+ .time { left: 0 }
1002
+
1003
+ .dropdown-menu {
1004
+ width: 500px;
1005
+ position: relative !important;
1006
+ transform: translateY(10px) !important;
1007
+ }
1008
+ `, "",{"version":3,"sources":["webpack://./css/widget.css"],"names":[],"mappings":"AAAA;EACE,uBAAuB;EACvB,eAAe;EACf,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,+BAA+B;EAC/B,YAAY;EACZ,eAAe;EACf,kBAAkB;EAClB,SAAS;EACT,WAAW;AACb;;AAEA,YAAY,SAAS;;AAErB,QAAQ,QAAQ;;AAEhB;EACE,YAAY;EACZ,6BAA6B;EAC7B,sCAAsC;AACxC","sourcesContent":[".waveform {\n background-color: black;\n cursor: pointer;\n position: relative;\n width: 100%;\n}\n\n.duration, .time {\n background: rgba(0, 0, 0, 0.75);\n color: #DDDD;\n font-size: 11px;\n position: absolute;\n bottom: 0;\n z-index: 11;\n}\n\n.duration { right: 0 }\n\n.time { left: 0 }\n\n.dropdown-menu {\n width: 500px;\n position: relative !important;\n transform: translateY(10px) !important;\n}\n"],"sourceRoot":""}]);
1009
+ // Exports
1010
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
1011
+
1012
+
1013
+ /***/ }),
1014
+
1015
+ /***/ "./package.json":
1016
+ /*!**********************!*\
1017
+ !*** ./package.json ***!
1018
+ \**********************/
1019
+ /***/ ((module) => {
1020
+
1021
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"ipyaudio","version":"0.1.19","description":"A Custom Jupyter Widget Library","keywords":["jupyter","jupyterlab","jupyterlab-extension","widgets"],"files":["lib/**/*.js","dist/*.js","css/*.css"],"homepage":"https://github.com/pengzhendong/ipyaudio","bugs":{"url":"https://github.com/pengzhendong/ipyaudio/issues"},"license":"BSD-3-Clause","author":{"name":"Zhendong Peng","email":"pzd17@tsinghua.org.cn"},"main":"lib/index.js","types":"./lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/pengzhendong/ipyaudio.git"},"scripts":{"build":"jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension:dev","build:prod":"jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension","build:labextension":"jupyter labextension build .","build:labextension:dev":"jupyter labextension build --development True .","build:lib":"tsc","build:nbextension":"webpack","clean":"jlpm run clean:lib && jlpm run clean:nbextension && jlpm run clean:labextension","clean:lib":"rimraf lib","clean:labextension":"rimraf ipyaudio/labextension","clean:nbextension":"rimraf ipyaudio/nbextension/static/index.js","lint":"eslint . --ext .ts,.tsx --fix","lint:check":"eslint . --ext .ts,.tsx","prepack":"jlpm run build:lib","test":"jest","watch":"npm-run-all -p \\"watch:*\\"","watch:lib":"tsc -w","watch:nbextension":"webpack --watch --mode=development","watch:labextension":"jupyter labextension watch ."},"dependencies":{"@jupyter-widgets/base":"^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6","bootstrap":"^5.3.5","jupyter-dataserializers":"^3.0.1","lodash.merge":"^4.6.2"},"devDependencies":{"@babel/core":"^7.23.7","@babel/preset-env":"^7.23.8","@jupyter-widgets/base-manager":"^1.0.7","@jupyterlab/builder":"^4.0.11","@lumino/application":"^2.3.0","@lumino/widgets":"^2.3.1","@types/jest":"^29.5.11","@types/webpack-env":"^1.18.4","@typescript-eslint/eslint-plugin":"^6.19.1","@typescript-eslint/parser":"^6.19.1","acorn":"^8.11.3","css-loader":"^6.9.1","eslint":"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","fs-extra":"^11.2.0","identity-obj-proxy":"^3.0.0","jest":"^29.7.0","mkdirp":"^3.0.1","npm-run-all":"^4.1.5","prettier":"^3.2.4","rimraf":"^5.0.5","source-map-loader":"^5.0.0","style-loader":"^3.3.4","ts-jest":"^29.1.2","ts-loader":"^9.5.1","typescript":"~5.3.3","wavesurfer.js":"^7.9.1","webpack":"^5.90.0","webpack-cli":"^5.1.4"},"devDependenciesComments":{"@jupyterlab/builder":"pinned to the latest JupyterLab 3.x release","@lumino/application":"pinned to the latest Lumino 1.x release","@lumino/widgets":"pinned to the latest Lumino 1.x release"},"jupyterlab":{"extension":"lib/plugin","outputDir":"ipyaudio/labextension/","sharedPackages":{"@jupyter-widgets/base":{"bundled":false,"singleton":true}}}}');
1022
+
1023
+ /***/ }),
1024
+
1025
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e":
1026
+ /*!******************************************************************************************************************************************************!*\
1027
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e ***!
1028
+ \******************************************************************************************************************************************************/
1029
+ /***/ ((module) => {
1030
+
1031
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%272%27 fill=%27%23fff%27/%3e%3c/svg%3e";
1032
+
1033
+ /***/ }),
1034
+
1035
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e":
1036
+ /*!*********************************************************************************************************************************************************!*\
1037
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e ***!
1038
+ \*********************************************************************************************************************************************************/
1039
+ /***/ ((module) => {
1040
+
1041
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%2386b7fe%27/%3e%3c/svg%3e";
1042
+
1043
+ /***/ }),
1044
+
1045
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e":
1046
+ /*!******************************************************************************************************************************************************!*\
1047
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e ***!
1048
+ \******************************************************************************************************************************************************/
1049
+ /***/ ((module) => {
1050
+
1051
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27%23fff%27/%3e%3c/svg%3e";
1052
+
1053
+ /***/ }),
1054
+
1055
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e":
1056
+ /*!***********************************************************************************************************************************************************************!*\
1057
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e ***!
1058
+ \***********************************************************************************************************************************************************************/
1059
+ /***/ ((module) => {
1060
+
1061
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%280, 0, 0, 0.25%29%27/%3e%3c/svg%3e";
1062
+
1063
+ /***/ }),
1064
+
1065
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%28255, 255, 255, 0.25%29%27/%3e%3c/svg%3e":
1066
+ /*!*****************************************************************************************************************************************************************************!*\
1067
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%28255, 255, 255, 0.25%29%27/%3e%3c/svg%3e ***!
1068
+ \*****************************************************************************************************************************************************************************/
1069
+ /***/ ((module) => {
1070
+
1071
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%27-4 -4 8 8%27%3e%3ccircle r=%273%27 fill=%27rgba%28255, 255, 255, 0.25%29%27/%3e%3c/svg%3e";
1072
+
1073
+ /***/ }),
1074
+
1075
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e":
1076
+ /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
1077
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e ***!
1078
+ \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
1079
+ /***/ ((module) => {
1080
+
1081
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 12 12%27 width=%2712%27 height=%2712%27 fill=%27none%27 stroke=%27%23dc3545%27%3e%3ccircle cx=%276%27 cy=%276%27 r=%274.5%27/%3e%3cpath stroke-linejoin=%27round%27 d=%27M5.8 3.6h.4L6 6.5z%27/%3e%3ccircle cx=%276%27 cy=%278.2%27 r=%27.6%27 fill=%27%23dc3545%27 stroke=%27none%27/%3e%3c/svg%3e";
1082
+
1083
+ /***/ }),
1084
+
1085
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414%27/%3e%3c/svg%3e":
1086
+ /*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
1087
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414%27/%3e%3c/svg%3e ***!
1088
+ \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
1089
+ /***/ ((module) => {
1090
+
1091
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23000%27%3e%3cpath d=%27M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414%27/%3e%3c/svg%3e";
1092
+
1093
+ /***/ }),
1094
+
1095
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%236ea8fe%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708%27/%3e%3c/svg%3e":
1096
+ /*!***************************************************************************************************************************************************************************************************************************************************************************************************!*\
1097
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%236ea8fe%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708%27/%3e%3c/svg%3e ***!
1098
+ \***************************************************************************************************************************************************************************************************************************************************************************************************/
1099
+ /***/ ((module) => {
1100
+
1101
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%236ea8fe%27%3e%3cpath fill-rule=%27evenodd%27 d=%27M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708%27/%3e%3c/svg%3e";
1102
+
1103
+ /***/ }),
1104
+
1105
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0%27/%3e%3c/svg%3e":
1106
+ /*!***********************************************************************************************************************************************************************************************************************************************************************!*\
1107
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0%27/%3e%3c/svg%3e ***!
1108
+ \***********************************************************************************************************************************************************************************************************************************************************************/
1109
+ /***/ ((module) => {
1110
+
1111
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0%27/%3e%3c/svg%3e";
1112
+
1113
+ /***/ }),
1114
+
1115
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708%27/%3e%3c/svg%3e":
1116
+ /*!************************************************************************************************************************************************************************************************************************************************************************!*\
1117
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708%27/%3e%3c/svg%3e ***!
1118
+ \************************************************************************************************************************************************************************************************************************************************************************/
1119
+ /***/ ((module) => {
1120
+
1121
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27%23fff%27%3e%3cpath d=%27M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708%27/%3e%3c/svg%3e";
1122
+
1123
+ /***/ }),
1124
+
1125
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23052c65%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpath d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e":
1126
+ /*!*******************************************************************************************************************************************************************************************************************************************!*\
1127
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23052c65%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpath d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e ***!
1128
+ \*******************************************************************************************************************************************************************************************************************************************/
1129
+ /***/ ((module) => {
1130
+
1131
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23052c65%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpath d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e";
1132
+
1133
+ /***/ }),
1134
+
1135
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23212529%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpath d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e":
1136
+ /*!*******************************************************************************************************************************************************************************************************************************************!*\
1137
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23212529%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpath d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e ***!
1138
+ \*******************************************************************************************************************************************************************************************************************************************/
1139
+ /***/ ((module) => {
1140
+
1141
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23212529%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpath d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e";
1142
+
1143
+ /***/ }),
1144
+
1145
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e":
1146
+ /*!****************************************************************************************************************************************************************************************************************************************************************!*\
1147
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e ***!
1148
+ \****************************************************************************************************************************************************************************************************************************************************************/
1149
+ /***/ ((module) => {
1150
+
1151
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23343a40%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e";
1152
+
1153
+ /***/ }),
1154
+
1155
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23dee2e6%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e":
1156
+ /*!****************************************************************************************************************************************************************************************************************************************************************!*\
1157
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23dee2e6%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e ***!
1158
+ \****************************************************************************************************************************************************************************************************************************************************************/
1159
+ /***/ ((module) => {
1160
+
1161
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3e%3cpath fill=%27none%27 stroke=%27%23dee2e6%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3e%3c/svg%3e";
1162
+
1163
+ /***/ }),
1164
+
1165
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e":
1166
+ /*!********************************************************************************************************************************************************************************************************************************************************!*\
1167
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e ***!
1168
+ \********************************************************************************************************************************************************************************************************************************************************/
1169
+ /***/ ((module) => {
1170
+
1171
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27M6 10h8%27/%3e%3c/svg%3e";
1172
+
1173
+ /***/ }),
1174
+
1175
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27m6 10 3 3 6-6%27/%3e%3c/svg%3e":
1176
+ /*!**************************************************************************************************************************************************************************************************************************************************************!*\
1177
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27m6 10 3 3 6-6%27/%3e%3c/svg%3e ***!
1178
+ \**************************************************************************************************************************************************************************************************************************************************************/
1179
+ /***/ ((module) => {
1180
+
1181
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 20%27%3e%3cpath fill=%27none%27 stroke=%27%23fff%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%273%27 d=%27m6 10 3 3 6-6%27/%3e%3c/svg%3e";
1182
+
1183
+ /***/ }),
1184
+
1185
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e":
1186
+ /*!******************************************************************************************************************************************************************************************************************************************************************************!*\
1187
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e ***!
1188
+ \******************************************************************************************************************************************************************************************************************************************************************************/
1189
+ /***/ ((module) => {
1190
+
1191
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%28255, 255, 255, 0.55%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e";
1192
+
1193
+ /***/ }),
1194
+
1195
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%2833, 37, 41, 0.75%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e":
1196
+ /*!***************************************************************************************************************************************************************************************************************************************************************************!*\
1197
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%2833, 37, 41, 0.75%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e ***!
1198
+ \***************************************************************************************************************************************************************************************************************************************************************************/
1199
+ /***/ ((module) => {
1200
+
1201
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 30 30%27%3e%3cpath stroke=%27rgba%2833, 37, 41, 0.75%29%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 stroke-width=%272%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3e%3c/svg%3e";
1202
+
1203
+ /***/ }),
1204
+
1205
+ /***/ "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1%27/%3e%3c/svg%3e":
1206
+ /*!*********************************************************************************************************************************************************************************************************************************************************!*\
1207
+ !*** data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1%27/%3e%3c/svg%3e ***!
1208
+ \*********************************************************************************************************************************************************************************************************************************************************/
1209
+ /***/ ((module) => {
1210
+
1211
+ module.exports = "data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 8 8%27%3e%3cpath fill=%27%23198754%27 d=%27M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1%27/%3e%3c/svg%3e";
1212
+
1213
+ /***/ })
1214
+
1215
+ }]);
1216
+ //# sourceMappingURL=lib_player_js-lib_recorder_js-data_image_svg_xml_3csvg_xmlns_27http_www_w3_org_2000_svg_27_vi-4e62a2.5626ffcb48021915d5fc.js.map