@exezt-/webamp 1.5.0-0x710 → 1.5.0-0x716

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.
@@ -1759,7 +1759,7 @@ formatters.j = function (v) {
1759
1759
  }
1760
1760
  };
1761
1761
 
1762
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
1762
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33)))
1763
1763
 
1764
1764
  /***/ }),
1765
1765
  /* 11 */
@@ -4056,7 +4056,7 @@ __webpack_require__.r(__webpack_exports__);
4056
4056
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; });
4057
4057
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
4058
4058
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; });
4059
- /* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
4059
+ /* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
4060
4060
 
4061
4061
 
4062
4062
  /**
@@ -6787,144 +6787,429 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
6787
6787
 
6788
6788
  /***/ }),
6789
6789
  /* 26 */
6790
- /***/ (function(module, exports, __webpack_require__) {
6790
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
6791
6791
 
6792
6792
  "use strict";
6793
- // Copyright Joyent, Inc. and other Node contributors.
6794
- //
6795
- // Permission is hereby granted, free of charge, to any person obtaining a
6796
- // copy of this software and associated documentation files (the
6797
- // "Software"), to deal in the Software without restriction, including
6798
- // without limitation the rights to use, copy, modify, merge, publish,
6799
- // distribute, sublicense, and/or sell copies of the Software, and to permit
6800
- // persons to whom the Software is furnished to do so, subject to the
6801
- // following conditions:
6802
- //
6803
- // The above copyright notice and this permission notice shall be included
6804
- // in all copies or substantial portions of the Software.
6805
- //
6806
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6807
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6808
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
6809
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
6810
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
6811
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
6812
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
6813
-
6814
- // a duplex stream is just a stream that is both readable and writable.
6815
- // Since JS doesn't have multiple prototypal inheritance, this class
6816
- // prototypally inherits from Readable, and then parasitically from
6817
- // Writable.
6818
-
6793
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WinampTelegramCustomHandler; });
6794
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
6795
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
6796
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
6819
6797
 
6820
6798
 
6821
- /*<replacement>*/
6799
+ class WinampTelegramCustomHandler {
6800
+ constructor(emit, options) {
6801
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "webamp", void 0);
6822
6802
 
6823
- var pna = __webpack_require__(47);
6824
- /*</replacement>*/
6803
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "maxFileSize", 0x1400000);
6825
6804
 
6826
- /*<replacement>*/
6827
- var objectKeys = Object.keys || function (obj) {
6828
- var keys = [];
6829
- for (var key in obj) {
6830
- keys.push(key);
6831
- }return keys;
6832
- };
6833
- /*</replacement>*/
6805
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "telegram", void 0);
6834
6806
 
6835
- module.exports = Duplex;
6807
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "options", void 0);
6836
6808
 
6837
- /*<replacement>*/
6838
- var util = Object.create(__webpack_require__(37));
6839
- util.inherits = __webpack_require__(33);
6840
- /*</replacement>*/
6809
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadCustomTracks", tracks => {
6810
+ this.webamp.setTracksToPlay(tracks);
6811
+ });
6841
6812
 
6842
- var Readable = __webpack_require__(110);
6843
- var Writable = __webpack_require__(56);
6813
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "updateAppState", () => {
6814
+ localStorage.setItem("appState", JSON.stringify(this.webamp.__getSerializedState()));
6815
+ });
6844
6816
 
6845
- util.inherits(Duplex, Readable);
6817
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getTrackListFromYandexDisk", async playlistLink => {
6818
+ fetch(`https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${encodeURIComponent(playlistLink)}`, {
6819
+ method: "GET",
6820
+ headers: {
6821
+ Accept: "application/json",
6822
+ "Content-Type": "application/json"
6823
+ }
6824
+ }).then(async response => {
6825
+ if (response.status === 200) {
6826
+ return response.text();
6827
+ } else {
6828
+ return null;
6829
+ }
6830
+ }).then(async response => {
6831
+ if (response !== null) {
6832
+ var _JSON$parse;
6846
6833
 
6847
- {
6848
- // avoid scope creep, the keys array can then be collected
6849
- var keys = objectKeys(Writable.prototype);
6850
- for (var v = 0; v < keys.length; v++) {
6851
- var method = keys[v];
6852
- if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
6853
- }
6854
- }
6834
+ const data = (_JSON$parse = JSON.parse(response)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse._embedded.items;
6835
+ let i = 0;
6836
+ this.saveLastPlaylist(playlistLink);
6855
6837
 
6856
- function Duplex(options) {
6857
- if (!(this instanceof Duplex)) return new Duplex(options);
6838
+ for (const item of data) {
6839
+ if (i === 0) {
6840
+ this.webamp.setTracksToPlay([{
6841
+ defaultName: item.name,
6842
+ url: `${item.file}&public_key=${item.public_key}`
6843
+ }]);
6844
+ } else {
6845
+ this.webamp.appendTracks([{
6846
+ defaultName: item.name,
6847
+ url: `${item.file}&public_key=${item.public_key}`
6848
+ }]);
6849
+ }
6858
6850
 
6859
- Readable.call(this, options);
6860
- Writable.call(this, options);
6851
+ i++;
6852
+ }
6853
+ }
6854
+ });
6855
+ });
6861
6856
 
6862
- if (options && options.readable === false) this.readable = false;
6857
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadTrackFromYandexDisk", async track => {
6858
+ let public_key = new URL(track.url).searchParams.get("public_key");
6859
+ await fetch(track.url, {
6860
+ method: "GET"
6861
+ }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
6862
+ if (response.status === 302) {
6863
+ return await fetch(`${response.headers.get("Location")}&public_key=${public_key}`);
6864
+ } else {
6865
+ return response;
6866
+ }
6867
+ }).then(res => {
6868
+ var _res$body;
6863
6869
 
6864
- if (options && options.writable === false) this.writable = false;
6870
+ console.log(res);
6871
+ const read = (_res$body = res.body) === null || _res$body === void 0 ? void 0 : _res$body.getReader();
6872
+ return new ReadableStream({
6873
+ start(controller) {
6874
+ // @ts-ignore
6875
+ function pump() {
6876
+ // @ts-ignore
6877
+ return read === null || read === void 0 ? void 0 : read.read().then(({
6878
+ done,
6879
+ value
6880
+ }) => {
6881
+ if (done) {
6882
+ controller.close();
6883
+ return;
6884
+ }
6865
6885
 
6866
- this.allowHalfOpen = true;
6867
- if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
6886
+ controller.enqueue(value);
6887
+ return pump();
6888
+ });
6889
+ }
6868
6890
 
6869
- this.once('end', onend);
6870
- }
6891
+ return pump();
6892
+ }
6871
6893
 
6872
- Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
6873
- // making it explicit this property is not enumerable
6874
- // because otherwise some prototype manipulation in
6875
- // userland will fail
6876
- enumerable: false,
6877
- get: function () {
6878
- return this._writableState.highWaterMark;
6879
- }
6880
- });
6894
+ });
6895
+ }).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
6896
+ let tracks = this.getAllTracks();
6897
+ this.replaceTrack(track, tracks);
6898
+ }).catch(err => err);
6899
+ });
6881
6900
 
6882
- // the no-half-open enforcer
6883
- function onend() {
6884
- // if we allow half-open state, or if the writable side ended,
6885
- // then we're ok.
6886
- if (this.allowHalfOpen || this._writableState.ended) return;
6901
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCurrentTrack", () => {
6902
+ let trackId = this.webamp.store.getState().playlist.currentTrack;
6903
+ return this.webamp.store.getState().tracks[trackId];
6904
+ });
6887
6905
 
6888
- // no more data can be written.
6889
- // But allow more writes to happen in this tick.
6890
- pna.nextTick(onEndNT, this);
6891
- }
6906
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getAllTracks", () => {
6907
+ return this.webamp.store.getState().tracks;
6908
+ });
6892
6909
 
6893
- function onEndNT(self) {
6894
- self.end();
6895
- }
6910
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "replaceTrack", (track, tracks) => {
6911
+ let a = [];
6912
+ Object.entries(tracks).forEach(([_key, value]) => {
6913
+ if (value.id === track.id) {
6914
+ a.push(track);
6915
+ } else {
6916
+ a.push(value);
6917
+ }
6918
+ });
6919
+ this.webamp.setTracksToPlay(a);
6920
+ });
6896
6921
 
6897
- Object.defineProperty(Duplex.prototype, 'destroyed', {
6898
- get: function () {
6899
- if (this._readableState === undefined || this._writableState === undefined) {
6900
- return false;
6901
- }
6902
- return this._readableState.destroyed && this._writableState.destroyed;
6903
- },
6904
- set: function (value) {
6905
- // we ignore the value if the stream
6906
- // has not been initialized yet
6907
- if (this._readableState === undefined || this._writableState === undefined) {
6908
- return;
6909
- }
6922
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "saveLastPlaylist", playlistLink => {
6923
+ document.cookie = `lastlist=${playlistLink}; path=/;`;
6924
+ });
6910
6925
 
6911
- // backward compatibility, the user is explicitly
6912
- // managing destroyed
6913
- this._readableState.destroyed = value;
6914
- this._writableState.destroyed = value;
6915
- }
6916
- });
6926
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCookie", name => {
6927
+ const regex = new RegExp(`(^| )${name}=([^;]+)`);
6928
+ const match = document.cookie.match(regex);
6917
6929
 
6918
- Duplex.prototype._destroy = function (err, cb) {
6919
- this.push(null);
6920
- this.end();
6930
+ if (match) {
6931
+ return match[2];
6932
+ }
6933
+ });
6921
6934
 
6922
- pna.nextTick(cb, err);
6923
- };
6935
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions", opts => {
6936
+ this.webamp.__loadSerializedState(opts);
6937
+ });
6924
6938
 
6925
- /***/ }),
6926
- /* 27 */
6927
- /***/ (function(module, exports, __webpack_require__) {
6939
+ _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions2", opts => {
6940
+ let i = 0;
6941
+ let vol = opts.media.volume;
6942
+ let balance = opts.media.balance;
6943
+ let eq1 = opts.equalizer.sliders.preamp;
6944
+ let eq2 = opts.equalizer.sliders["60"];
6945
+ let eq3 = opts.equalizer.sliders["170"];
6946
+ let eq4 = opts.equalizer.sliders["310"];
6947
+ let eq5 = opts.equalizer.sliders["600"];
6948
+ let eq6 = opts.equalizer.sliders["1000"];
6949
+ let eq7 = opts.equalizer.sliders["3000"];
6950
+ let eq8 = opts.equalizer.sliders["6000"];
6951
+ let eq9 = opts.equalizer.sliders["12000"];
6952
+ let eq10 = opts.equalizer.sliders["14000"];
6953
+ let eq11 = opts.equalizer.sliders["16000"];
6954
+ let equal = [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11];
6955
+ let bands = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
6956
+ this.webamp.store.dispatch({
6957
+ type: "SET_VOLUME",
6958
+ volume: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "d"])(vol, 0, 100)
6959
+ });
6960
+ this.webamp.store.dispatch({
6961
+ type: "SET_BALANCE",
6962
+ balance: balance
6963
+ });
6964
+ this.webamp.store.dispatch({
6965
+ type: "SET_BAND_VALUE",
6966
+ band: "preamp",
6967
+ value: opts.equalizer.sliders.preamp
6968
+ });
6969
+
6970
+ for (const band of bands) {
6971
+ this.webamp.store.dispatch({
6972
+ type: "SET_BAND_VALUE",
6973
+ band: band,
6974
+ value: equal[i]
6975
+ });
6976
+ i++;
6977
+ }
6978
+
6979
+ if (window.__webamp.store.getState().media.shuffle !== opts.media.shuffle) {
6980
+ this.webamp.store.dispatch({
6981
+ type: "TOGGLE_SHUFFLE"
6982
+ });
6983
+ }
6984
+
6985
+ if (window.__webamp.store.getState().media.repeat !== opts.media.repeat) {
6986
+ this.webamp.store.dispatch({
6987
+ type: "TOGGLE_REPEAT"
6988
+ });
6989
+ }
6990
+ });
6991
+
6992
+ this.options = options;
6993
+ setTimeout(() => {
6994
+ if (!window.__webamp) {
6995
+ throw new Error("Webamp __webamp is undefined!!");
6996
+ } else {
6997
+ this.webamp = window.__webamp;
6998
+ }
6999
+
7000
+ if (typeof localStorage.getItem('app-state') !== "undefined") {
7001
+ this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
7002
+ } // emit
7003
+
7004
+
7005
+ if (emit !== false) {
7006
+ var _window, _window$Telegram;
7007
+
7008
+ const lastList = this.getCookie('lastlist');
7009
+
7010
+ if (typeof lastList !== "undefined") {
7011
+ this.getTrackListFromYandexDisk(lastList);
7012
+ } // @ts-ignore | because no global var telegram avail in project types
7013
+
7014
+
7015
+ if (!((_window = window) !== null && _window !== void 0 && (_window$Telegram = _window.Telegram) !== null && _window$Telegram !== void 0 && _window$Telegram.WebApp)) {
7016
+ console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
7017
+ } else {
7018
+ var _window2, _window2$Telegram;
7019
+
7020
+ // @ts-ignore | because no global var telegram avail in project types
7021
+ this.telegram = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Telegram = _window2.Telegram) === null || _window2$Telegram === void 0 ? void 0 : _window2$Telegram.WebApp;
7022
+ this.initializeTelegramWebAppEvents();
7023
+ }
7024
+
7025
+ this.initializeApplicationHandlers();
7026
+ }
7027
+ }, 1000);
7028
+ }
7029
+
7030
+ initializeTelegramWebAppEvents() {
7031
+ this.telegram.offEvent("deactivated", () => {
7032
+ this.updateAppState();
7033
+ });
7034
+ }
7035
+
7036
+ initializeApplicationHandlers() {
7037
+ const window_handlers = ['unload', 'beforeunload', 'pagehide'];
7038
+ window_handlers.forEach(handler => {
7039
+ window.addEventListener(handler, () => {
7040
+ this.updateAppState();
7041
+ });
7042
+ });
7043
+ this.webamp.onTrackDidChange(() => {
7044
+ console.log(this.webamp.store.getState());
7045
+ this.updateAppState();
7046
+ });
7047
+ this.webamp.onWillClose(() => {
7048
+ this.updateAppState();
7049
+ });
7050
+ this.webamp.onClose(() => {
7051
+ this.updateAppState();
7052
+ });
7053
+ this.webamp.onMinimize(() => {
7054
+ this.updateAppState();
7055
+ });
7056
+ this.webamp.store.dispatch({
7057
+ type: "ENABLE_MILKDROP",
7058
+ open: false
7059
+ });
7060
+ const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
7061
+
7062
+ this.webamp.__onStateChange(() => {
7063
+ this.updateAppState();
7064
+ });
7065
+
7066
+ ev.forEach(ev => this.webamp.media.on(ev, () => {
7067
+ this.updateAppState();
7068
+ }));
7069
+ }
7070
+
7071
+ }
7072
+
7073
+ /***/ }),
7074
+ /* 27 */
7075
+ /***/ (function(module, exports, __webpack_require__) {
7076
+
7077
+ "use strict";
7078
+ // Copyright Joyent, Inc. and other Node contributors.
7079
+ //
7080
+ // Permission is hereby granted, free of charge, to any person obtaining a
7081
+ // copy of this software and associated documentation files (the
7082
+ // "Software"), to deal in the Software without restriction, including
7083
+ // without limitation the rights to use, copy, modify, merge, publish,
7084
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
7085
+ // persons to whom the Software is furnished to do so, subject to the
7086
+ // following conditions:
7087
+ //
7088
+ // The above copyright notice and this permission notice shall be included
7089
+ // in all copies or substantial portions of the Software.
7090
+ //
7091
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
7092
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7093
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
7094
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
7095
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
7096
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
7097
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
7098
+
7099
+ // a duplex stream is just a stream that is both readable and writable.
7100
+ // Since JS doesn't have multiple prototypal inheritance, this class
7101
+ // prototypally inherits from Readable, and then parasitically from
7102
+ // Writable.
7103
+
7104
+
7105
+
7106
+ /*<replacement>*/
7107
+
7108
+ var pna = __webpack_require__(47);
7109
+ /*</replacement>*/
7110
+
7111
+ /*<replacement>*/
7112
+ var objectKeys = Object.keys || function (obj) {
7113
+ var keys = [];
7114
+ for (var key in obj) {
7115
+ keys.push(key);
7116
+ }return keys;
7117
+ };
7118
+ /*</replacement>*/
7119
+
7120
+ module.exports = Duplex;
7121
+
7122
+ /*<replacement>*/
7123
+ var util = Object.create(__webpack_require__(37));
7124
+ util.inherits = __webpack_require__(34);
7125
+ /*</replacement>*/
7126
+
7127
+ var Readable = __webpack_require__(110);
7128
+ var Writable = __webpack_require__(56);
7129
+
7130
+ util.inherits(Duplex, Readable);
7131
+
7132
+ {
7133
+ // avoid scope creep, the keys array can then be collected
7134
+ var keys = objectKeys(Writable.prototype);
7135
+ for (var v = 0; v < keys.length; v++) {
7136
+ var method = keys[v];
7137
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
7138
+ }
7139
+ }
7140
+
7141
+ function Duplex(options) {
7142
+ if (!(this instanceof Duplex)) return new Duplex(options);
7143
+
7144
+ Readable.call(this, options);
7145
+ Writable.call(this, options);
7146
+
7147
+ if (options && options.readable === false) this.readable = false;
7148
+
7149
+ if (options && options.writable === false) this.writable = false;
7150
+
7151
+ this.allowHalfOpen = true;
7152
+ if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
7153
+
7154
+ this.once('end', onend);
7155
+ }
7156
+
7157
+ Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
7158
+ // making it explicit this property is not enumerable
7159
+ // because otherwise some prototype manipulation in
7160
+ // userland will fail
7161
+ enumerable: false,
7162
+ get: function () {
7163
+ return this._writableState.highWaterMark;
7164
+ }
7165
+ });
7166
+
7167
+ // the no-half-open enforcer
7168
+ function onend() {
7169
+ // if we allow half-open state, or if the writable side ended,
7170
+ // then we're ok.
7171
+ if (this.allowHalfOpen || this._writableState.ended) return;
7172
+
7173
+ // no more data can be written.
7174
+ // But allow more writes to happen in this tick.
7175
+ pna.nextTick(onEndNT, this);
7176
+ }
7177
+
7178
+ function onEndNT(self) {
7179
+ self.end();
7180
+ }
7181
+
7182
+ Object.defineProperty(Duplex.prototype, 'destroyed', {
7183
+ get: function () {
7184
+ if (this._readableState === undefined || this._writableState === undefined) {
7185
+ return false;
7186
+ }
7187
+ return this._readableState.destroyed && this._writableState.destroyed;
7188
+ },
7189
+ set: function (value) {
7190
+ // we ignore the value if the stream
7191
+ // has not been initialized yet
7192
+ if (this._readableState === undefined || this._writableState === undefined) {
7193
+ return;
7194
+ }
7195
+
7196
+ // backward compatibility, the user is explicitly
7197
+ // managing destroyed
7198
+ this._readableState.destroyed = value;
7199
+ this._writableState.destroyed = value;
7200
+ }
7201
+ });
7202
+
7203
+ Duplex.prototype._destroy = function (err, cb) {
7204
+ this.push(null);
7205
+ this.end();
7206
+
7207
+ pna.nextTick(cb, err);
7208
+ };
7209
+
7210
+ /***/ }),
7211
+ /* 28 */
7212
+ /***/ (function(module, exports, __webpack_require__) {
6928
7213
 
6929
7214
  var root = __webpack_require__(82);
6930
7215
 
@@ -6935,7 +7220,7 @@ module.exports = Symbol;
6935
7220
 
6936
7221
 
6937
7222
  /***/ }),
6938
- /* 28 */
7223
+ /* 29 */
6939
7224
  /***/ (function(module, exports, __webpack_require__) {
6940
7225
 
6941
7226
  "use strict";
@@ -6947,13 +7232,13 @@ if (true) {
6947
7232
 
6948
7233
 
6949
7234
  /***/ }),
6950
- /* 29 */
7235
+ /* 30 */
6951
7236
  /***/ (function(module, exports, __webpack_require__) {
6952
7237
 
6953
7238
  "use strict";
6954
7239
 
6955
7240
 
6956
- var reactIs = __webpack_require__(28);
7241
+ var reactIs = __webpack_require__(29);
6957
7242
 
6958
7243
  /**
6959
7244
  * Copyright 2015, Yahoo! Inc.
@@ -7022,666 +7307,302 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
7022
7307
  if (objectPrototype) {
7023
7308
  var inheritedComponent = getPrototypeOf(sourceComponent);
7024
7309
 
7025
- if (inheritedComponent && inheritedComponent !== objectPrototype) {
7026
- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
7027
- }
7028
- }
7029
-
7030
- var keys = getOwnPropertyNames(sourceComponent);
7031
-
7032
- if (getOwnPropertySymbols) {
7033
- keys = keys.concat(getOwnPropertySymbols(sourceComponent));
7034
- }
7035
-
7036
- var targetStatics = getStatics(targetComponent);
7037
- var sourceStatics = getStatics(sourceComponent);
7038
-
7039
- for (var i = 0; i < keys.length; ++i) {
7040
- var key = keys[i];
7041
-
7042
- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
7043
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
7044
-
7045
- try {
7046
- // Avoid failures from read-only properties
7047
- defineProperty(targetComponent, key, descriptor);
7048
- } catch (e) {}
7049
- }
7050
- }
7051
- }
7052
-
7053
- return targetComponent;
7054
- }
7055
-
7056
- module.exports = hoistNonReactStatics;
7057
-
7058
-
7059
- /***/ }),
7060
- /* 30 */
7061
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7062
-
7063
- "use strict";
7064
- /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
7065
- /* global window */
7066
-
7067
-
7068
- var root;
7069
-
7070
- if (typeof self !== 'undefined') {
7071
- root = self;
7072
- } else if (typeof window !== 'undefined') {
7073
- root = window;
7074
- } else if (typeof global !== 'undefined') {
7075
- root = global;
7076
- } else if (true) {
7077
- root = module;
7078
- } else {}
7079
-
7080
- var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
7081
- /* harmony default export */ __webpack_exports__["a"] = (result);
7082
-
7083
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(67)(module)))
7084
-
7085
- /***/ }),
7086
- /* 31 */
7087
- /***/ (function(module, exports, __webpack_require__) {
7088
-
7089
- var parser = __webpack_require__(69);
7090
-
7091
- var creator = __webpack_require__(70);
7092
-
7093
- module.exports = {
7094
- parser: parser,
7095
- creator: creator
7096
- };
7097
-
7098
- /***/ }),
7099
- /* 32 */
7100
- /***/ (function(module, exports) {
7101
-
7102
- // shim for using process in browser
7103
- var process = module.exports = {};
7104
-
7105
- // cached from whatever global is present so that test runners that stub it
7106
- // don't break things. But we need to wrap it in a try catch in case it is
7107
- // wrapped in strict mode code which doesn't define any globals. It's inside a
7108
- // function because try/catches deoptimize in certain engines.
7109
-
7110
- var cachedSetTimeout;
7111
- var cachedClearTimeout;
7112
-
7113
- function defaultSetTimout() {
7114
- throw new Error('setTimeout has not been defined');
7115
- }
7116
- function defaultClearTimeout () {
7117
- throw new Error('clearTimeout has not been defined');
7118
- }
7119
- (function () {
7120
- try {
7121
- if (typeof setTimeout === 'function') {
7122
- cachedSetTimeout = setTimeout;
7123
- } else {
7124
- cachedSetTimeout = defaultSetTimout;
7125
- }
7126
- } catch (e) {
7127
- cachedSetTimeout = defaultSetTimout;
7128
- }
7129
- try {
7130
- if (typeof clearTimeout === 'function') {
7131
- cachedClearTimeout = clearTimeout;
7132
- } else {
7133
- cachedClearTimeout = defaultClearTimeout;
7134
- }
7135
- } catch (e) {
7136
- cachedClearTimeout = defaultClearTimeout;
7137
- }
7138
- } ())
7139
- function runTimeout(fun) {
7140
- if (cachedSetTimeout === setTimeout) {
7141
- //normal enviroments in sane situations
7142
- return setTimeout(fun, 0);
7143
- }
7144
- // if setTimeout wasn't available but was latter defined
7145
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
7146
- cachedSetTimeout = setTimeout;
7147
- return setTimeout(fun, 0);
7148
- }
7149
- try {
7150
- // when when somebody has screwed with setTimeout but no I.E. maddness
7151
- return cachedSetTimeout(fun, 0);
7152
- } catch(e){
7153
- try {
7154
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7155
- return cachedSetTimeout.call(null, fun, 0);
7156
- } catch(e){
7157
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
7158
- return cachedSetTimeout.call(this, fun, 0);
7159
- }
7160
- }
7161
-
7162
-
7163
- }
7164
- function runClearTimeout(marker) {
7165
- if (cachedClearTimeout === clearTimeout) {
7166
- //normal enviroments in sane situations
7167
- return clearTimeout(marker);
7168
- }
7169
- // if clearTimeout wasn't available but was latter defined
7170
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
7171
- cachedClearTimeout = clearTimeout;
7172
- return clearTimeout(marker);
7173
- }
7174
- try {
7175
- // when when somebody has screwed with setTimeout but no I.E. maddness
7176
- return cachedClearTimeout(marker);
7177
- } catch (e){
7178
- try {
7179
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7180
- return cachedClearTimeout.call(null, marker);
7181
- } catch (e){
7182
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
7183
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
7184
- return cachedClearTimeout.call(this, marker);
7185
- }
7186
- }
7187
-
7188
-
7189
-
7190
- }
7191
- var queue = [];
7192
- var draining = false;
7193
- var currentQueue;
7194
- var queueIndex = -1;
7195
-
7196
- function cleanUpNextTick() {
7197
- if (!draining || !currentQueue) {
7198
- return;
7199
- }
7200
- draining = false;
7201
- if (currentQueue.length) {
7202
- queue = currentQueue.concat(queue);
7203
- } else {
7204
- queueIndex = -1;
7205
- }
7206
- if (queue.length) {
7207
- drainQueue();
7208
- }
7209
- }
7210
-
7211
- function drainQueue() {
7212
- if (draining) {
7213
- return;
7214
- }
7215
- var timeout = runTimeout(cleanUpNextTick);
7216
- draining = true;
7217
-
7218
- var len = queue.length;
7219
- while(len) {
7220
- currentQueue = queue;
7221
- queue = [];
7222
- while (++queueIndex < len) {
7223
- if (currentQueue) {
7224
- currentQueue[queueIndex].run();
7225
- }
7226
- }
7227
- queueIndex = -1;
7228
- len = queue.length;
7229
- }
7230
- currentQueue = null;
7231
- draining = false;
7232
- runClearTimeout(timeout);
7233
- }
7234
-
7235
- process.nextTick = function (fun) {
7236
- var args = new Array(arguments.length - 1);
7237
- if (arguments.length > 1) {
7238
- for (var i = 1; i < arguments.length; i++) {
7239
- args[i - 1] = arguments[i];
7240
- }
7241
- }
7242
- queue.push(new Item(fun, args));
7243
- if (queue.length === 1 && !draining) {
7244
- runTimeout(drainQueue);
7245
- }
7246
- };
7247
-
7248
- // v8 likes predictible objects
7249
- function Item(fun, array) {
7250
- this.fun = fun;
7251
- this.array = array;
7252
- }
7253
- Item.prototype.run = function () {
7254
- this.fun.apply(null, this.array);
7255
- };
7256
- process.title = 'browser';
7257
- process.browser = true;
7258
- process.env = {};
7259
- process.argv = [];
7260
- process.version = ''; // empty string to avoid regexp issues
7261
- process.versions = {};
7262
-
7263
- function noop() {}
7264
-
7265
- process.on = noop;
7266
- process.addListener = noop;
7267
- process.once = noop;
7268
- process.off = noop;
7269
- process.removeListener = noop;
7270
- process.removeAllListeners = noop;
7271
- process.emit = noop;
7272
- process.prependListener = noop;
7273
- process.prependOnceListener = noop;
7274
-
7275
- process.listeners = function (name) { return [] }
7276
-
7277
- process.binding = function (name) {
7278
- throw new Error('process.binding is not supported');
7279
- };
7280
-
7281
- process.cwd = function () { return '/' };
7282
- process.chdir = function (dir) {
7283
- throw new Error('process.chdir is not supported');
7284
- };
7285
- process.umask = function() { return 0; };
7286
-
7287
-
7288
- /***/ }),
7289
- /* 33 */
7290
- /***/ (function(module, exports) {
7291
-
7292
- if (typeof Object.create === 'function') {
7293
- // implementation from standard node.js 'util' module
7294
- module.exports = function inherits(ctor, superCtor) {
7295
- if (superCtor) {
7296
- ctor.super_ = superCtor
7297
- ctor.prototype = Object.create(superCtor.prototype, {
7298
- constructor: {
7299
- value: ctor,
7300
- enumerable: false,
7301
- writable: true,
7302
- configurable: true
7303
- }
7304
- })
7305
- }
7306
- };
7307
- } else {
7308
- // old school shim for old browsers
7309
- module.exports = function inherits(ctor, superCtor) {
7310
- if (superCtor) {
7311
- ctor.super_ = superCtor
7312
- var TempCtor = function () {}
7313
- TempCtor.prototype = superCtor.prototype
7314
- ctor.prototype = new TempCtor()
7315
- ctor.prototype.constructor = ctor
7316
- }
7317
- }
7318
- }
7319
-
7320
-
7321
- /***/ }),
7322
- /* 34 */
7323
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7324
-
7325
- "use strict";
7326
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WinampTelegramCustomHandler; });
7327
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
7328
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
7329
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
7330
-
7331
- // @ts-ignore
7310
+ if (inheritedComponent && inheritedComponent !== objectPrototype) {
7311
+ hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
7312
+ }
7313
+ }
7332
7314
 
7333
- class WinampTelegramCustomHandler {
7334
- constructor(emit) {
7335
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "webamp", void 0);
7315
+ var keys = getOwnPropertyNames(sourceComponent);
7336
7316
 
7337
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "maxFileSize", 0x1400000);
7317
+ if (getOwnPropertySymbols) {
7318
+ keys = keys.concat(getOwnPropertySymbols(sourceComponent));
7319
+ }
7338
7320
 
7339
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "telegram", void 0);
7321
+ var targetStatics = getStatics(targetComponent);
7322
+ var sourceStatics = getStatics(sourceComponent);
7340
7323
 
7341
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "updateAppState", () => {
7342
- localStorage.setItem("appState", JSON.stringify(this.webamp.__getSerializedState()));
7343
- });
7324
+ for (var i = 0; i < keys.length; ++i) {
7325
+ var key = keys[i];
7344
7326
 
7345
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getFiles", async ln => {
7346
- const x = new XMLHttpRequest();
7347
- const link = encodeURIComponent(ln);
7348
- x.open('get', `https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${link}`, true);
7349
- x.setRequestHeader('Accept', 'application/json');
7350
- x.setRequestHeader('Content-Type', 'application/json');
7351
- x.setRequestHeader('Authorization', 'OAuth 0dc7925ebcf047a1b001c07d6bd5ac49');
7352
- x.send();
7353
-
7354
- x.onload = async () => {
7355
- if (x.status === 200) {
7356
- var _JSON$parse;
7327
+ if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
7328
+ var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
7357
7329
 
7358
- const data = (_JSON$parse = JSON.parse(x.responseText)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse._embedded.items;
7359
- let i = 0;
7360
- this.saveLastPlaylist(ln);
7330
+ try {
7331
+ // Avoid failures from read-only properties
7332
+ defineProperty(targetComponent, key, descriptor);
7333
+ } catch (e) {}
7334
+ }
7335
+ }
7336
+ }
7361
7337
 
7362
- for (const item of data) {
7363
- if (item.size > this.maxFileSize) {
7364
- console.info(`File ${item.name} can't be loaded due oversize`);
7365
- } else {
7366
- await fetch(`${item.file}&public_key=${item.public_key}`, {
7367
- method: "GET"
7368
- }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
7369
- if (response.status === 302) {
7370
- return await fetch(`${response.headers.get("Location")}&public_key=${item.public_key}`);
7371
- } else {
7372
- return response;
7373
- }
7374
- }).then(res => {
7375
- var _res$body;
7376
-
7377
- console.log(res);
7378
- const read = (_res$body = res.body) === null || _res$body === void 0 ? void 0 : _res$body.getReader();
7379
- return new ReadableStream({
7380
- start(controller) {
7381
- // @ts-ignore
7382
- function pump() {
7383
- // @ts-ignore
7384
- return read === null || read === void 0 ? void 0 : read.read().then(({
7385
- done,
7386
- value
7387
- }) => {
7388
- if (done) {
7389
- controller.close();
7390
- return;
7391
- }
7338
+ return targetComponent;
7339
+ }
7392
7340
 
7393
- controller.enqueue(value);
7394
- return pump();
7395
- });
7396
- }
7341
+ module.exports = hoistNonReactStatics;
7397
7342
 
7398
- return pump();
7399
- }
7400
7343
 
7401
- });
7402
- }).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
7403
- if (i === 0) {
7404
- this.webamp.setTracksToPlay([{
7405
- defaultName: item.name,
7406
- url: uri
7407
- }]);
7408
- } else {
7409
- this.webamp.appendTracks([{
7410
- defaultName: item.name,
7411
- url: uri
7412
- }]);
7413
- }
7344
+ /***/ }),
7345
+ /* 31 */
7346
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
7414
7347
 
7415
- i++; // yes, it should be here
7416
- }).catch(err => err);
7417
- }
7418
- }
7419
- }
7420
- };
7421
- });
7348
+ "use strict";
7349
+ /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
7350
+ /* global window */
7422
7351
 
7423
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getTrackListFromYandexDisk", async playlistLink => {
7424
- fetch(`https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${encodeURIComponent(playlistLink)}`, {
7425
- method: "GET",
7426
- headers: {
7427
- Accept: "application/json",
7428
- "Content-Type": "application/json"
7429
- }
7430
- }).then(async response => {
7431
- if (response.status === 200) {
7432
- return response.text();
7433
- } else {
7434
- return null;
7435
- }
7436
- }).then(async response => {
7437
- if (response !== null) {
7438
- var _JSON$parse2;
7439
7352
 
7440
- const data = (_JSON$parse2 = JSON.parse(response)) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2._embedded.items;
7441
- let i = 0;
7442
- this.saveLastPlaylist(playlistLink);
7353
+ var root;
7443
7354
 
7444
- for (const item of data) {
7445
- if (i === 0) {
7446
- this.webamp.setTracksToPlay([{
7447
- defaultName: item.name,
7448
- url: `${item.file}&public_key=${item.public_key}`
7449
- }]);
7450
- } else {
7451
- this.webamp.appendTracks([{
7452
- defaultName: item.name,
7453
- url: `${item.file}&public_key=${item.public_key}`
7454
- }]);
7455
- }
7456
- }
7457
- }
7458
- });
7459
- });
7355
+ if (typeof self !== 'undefined') {
7356
+ root = self;
7357
+ } else if (typeof window !== 'undefined') {
7358
+ root = window;
7359
+ } else if (typeof global !== 'undefined') {
7360
+ root = global;
7361
+ } else if (true) {
7362
+ root = module;
7363
+ } else {}
7460
7364
 
7461
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadTrackFromYandexDisk", async track => {
7462
- let public_key = new URL(track.url).searchParams.get("public_key");
7463
- await fetch(track.url, {
7464
- method: "GET"
7465
- }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
7466
- if (response.status === 302) {
7467
- return await fetch(`${response.headers.get("Location")}&public_key=${public_key}`);
7468
- } else {
7469
- return response;
7470
- }
7471
- }).then(res => {
7472
- var _res$body2;
7365
+ var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
7366
+ /* harmony default export */ __webpack_exports__["a"] = (result);
7473
7367
 
7474
- console.log(res);
7475
- const read = (_res$body2 = res.body) === null || _res$body2 === void 0 ? void 0 : _res$body2.getReader();
7476
- return new ReadableStream({
7477
- start(controller) {
7478
- // @ts-ignore
7479
- function pump() {
7480
- // @ts-ignore
7481
- return read === null || read === void 0 ? void 0 : read.read().then(({
7482
- done,
7483
- value
7484
- }) => {
7485
- if (done) {
7486
- controller.close();
7487
- return;
7488
- }
7368
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(67)(module)))
7489
7369
 
7490
- controller.enqueue(value);
7491
- return pump();
7492
- });
7493
- }
7370
+ /***/ }),
7371
+ /* 32 */
7372
+ /***/ (function(module, exports, __webpack_require__) {
7494
7373
 
7495
- return pump();
7496
- }
7374
+ var parser = __webpack_require__(69);
7497
7375
 
7498
- });
7499
- }).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
7500
- let tracks = this.getAllTracks();
7501
- this.replaceTrack(track, tracks);
7502
- }).catch(err => err);
7503
- });
7376
+ var creator = __webpack_require__(70);
7504
7377
 
7505
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "onTrackNeedToLoad", () => {
7506
- let track = this.getCurrentTrack();
7378
+ module.exports = {
7379
+ parser: parser,
7380
+ creator: creator
7381
+ };
7507
7382
 
7508
- if (track.url.split('/').includes('downloader')) {
7509
- this.loadTrackFromYandexDisk(track);
7510
- }
7511
- });
7383
+ /***/ }),
7384
+ /* 33 */
7385
+ /***/ (function(module, exports) {
7512
7386
 
7513
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCurrentTrack", () => {
7514
- let trackId = this.webamp.store.getState().playlist.currentTrack;
7515
- return this.webamp.store.getState().tracks[trackId];
7516
- });
7387
+ // shim for using process in browser
7388
+ var process = module.exports = {};
7517
7389
 
7518
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getAllTracks", () => {
7519
- return this.webamp.store.getState().tracks;
7520
- });
7390
+ // cached from whatever global is present so that test runners that stub it
7391
+ // don't break things. But we need to wrap it in a try catch in case it is
7392
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
7393
+ // function because try/catches deoptimize in certain engines.
7521
7394
 
7522
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "replaceTrack", (track, tracks) => {
7523
- let a = [];
7524
- Object.entries(tracks).forEach(([_key, value]) => {
7525
- if (value.id === track.id) {
7526
- a.push(track);
7395
+ var cachedSetTimeout;
7396
+ var cachedClearTimeout;
7397
+
7398
+ function defaultSetTimout() {
7399
+ throw new Error('setTimeout has not been defined');
7400
+ }
7401
+ function defaultClearTimeout () {
7402
+ throw new Error('clearTimeout has not been defined');
7403
+ }
7404
+ (function () {
7405
+ try {
7406
+ if (typeof setTimeout === 'function') {
7407
+ cachedSetTimeout = setTimeout;
7527
7408
  } else {
7528
- a.push(value);
7409
+ cachedSetTimeout = defaultSetTimout;
7529
7410
  }
7530
- });
7531
- this.webamp.setTracksToPlay(a);
7532
- });
7533
-
7534
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "saveLastPlaylist", playlistLink => {
7535
- document.cookie = `lastlist=${playlistLink}; path=/;`;
7536
- });
7537
-
7538
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "getCookie", name => {
7539
- const regex = new RegExp(`(^| )${name}=([^;]+)`);
7540
- const match = document.cookie.match(regex);
7541
-
7542
- if (match) {
7543
- return match[2];
7544
- }
7545
- });
7546
-
7547
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions2", opts => {
7548
- this.webamp.__loadSerializedState(opts);
7549
- });
7550
-
7551
- _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "loadOptions", opts => {
7552
- let i = 0;
7553
- let vol = opts.media.volume;
7554
- let balance = opts.media.balance;
7555
- let eq1 = opts.equalizer.sliders.preamp;
7556
- let eq2 = opts.equalizer.sliders["60"];
7557
- let eq3 = opts.equalizer.sliders["170"];
7558
- let eq4 = opts.equalizer.sliders["310"];
7559
- let eq5 = opts.equalizer.sliders["600"];
7560
- let eq6 = opts.equalizer.sliders["1000"];
7561
- let eq7 = opts.equalizer.sliders["3000"];
7562
- let eq8 = opts.equalizer.sliders["6000"];
7563
- let eq9 = opts.equalizer.sliders["12000"];
7564
- let eq10 = opts.equalizer.sliders["14000"];
7565
- let eq11 = opts.equalizer.sliders["16000"];
7566
- let equal = [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11];
7567
- let bands = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
7568
- this.webamp.store.dispatch({
7569
- type: "SET_VOLUME",
7570
- volume: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[/* clamp */ "d"])(vol, 0, 100)
7571
- });
7572
- this.webamp.store.dispatch({
7573
- type: "SET_BALANCE",
7574
- balance: balance
7575
- });
7576
- this.webamp.store.dispatch({
7577
- type: "SET_BAND_VALUE",
7578
- band: "preamp",
7579
- value: opts.equalizer.sliders.preamp
7580
- });
7411
+ } catch (e) {
7412
+ cachedSetTimeout = defaultSetTimout;
7413
+ }
7414
+ try {
7415
+ if (typeof clearTimeout === 'function') {
7416
+ cachedClearTimeout = clearTimeout;
7417
+ } else {
7418
+ cachedClearTimeout = defaultClearTimeout;
7419
+ }
7420
+ } catch (e) {
7421
+ cachedClearTimeout = defaultClearTimeout;
7422
+ }
7423
+ } ())
7424
+ function runTimeout(fun) {
7425
+ if (cachedSetTimeout === setTimeout) {
7426
+ //normal enviroments in sane situations
7427
+ return setTimeout(fun, 0);
7428
+ }
7429
+ // if setTimeout wasn't available but was latter defined
7430
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
7431
+ cachedSetTimeout = setTimeout;
7432
+ return setTimeout(fun, 0);
7433
+ }
7434
+ try {
7435
+ // when when somebody has screwed with setTimeout but no I.E. maddness
7436
+ return cachedSetTimeout(fun, 0);
7437
+ } catch(e){
7438
+ try {
7439
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7440
+ return cachedSetTimeout.call(null, fun, 0);
7441
+ } catch(e){
7442
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
7443
+ return cachedSetTimeout.call(this, fun, 0);
7444
+ }
7445
+ }
7581
7446
 
7582
- for (const band of bands) {
7583
- this.webamp.store.dispatch({
7584
- type: "SET_BAND_VALUE",
7585
- band: band,
7586
- value: equal[i]
7587
- });
7588
- i++;
7589
- }
7590
7447
 
7591
- if (window.__webamp.store.getState().media.shuffle !== opts.media.shuffle) {
7592
- this.webamp.store.dispatch({
7593
- type: "TOGGLE_SHUFFLE"
7594
- });
7595
- }
7448
+ }
7449
+ function runClearTimeout(marker) {
7450
+ if (cachedClearTimeout === clearTimeout) {
7451
+ //normal enviroments in sane situations
7452
+ return clearTimeout(marker);
7453
+ }
7454
+ // if clearTimeout wasn't available but was latter defined
7455
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
7456
+ cachedClearTimeout = clearTimeout;
7457
+ return clearTimeout(marker);
7458
+ }
7459
+ try {
7460
+ // when when somebody has screwed with setTimeout but no I.E. maddness
7461
+ return cachedClearTimeout(marker);
7462
+ } catch (e){
7463
+ try {
7464
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7465
+ return cachedClearTimeout.call(null, marker);
7466
+ } catch (e){
7467
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
7468
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
7469
+ return cachedClearTimeout.call(this, marker);
7470
+ }
7471
+ }
7596
7472
 
7597
- if (window.__webamp.store.getState().media.repeat !== opts.media.repeat) {
7598
- this.webamp.store.dispatch({
7599
- type: "TOGGLE_REPEAT"
7600
- });
7601
- }
7602
- });
7603
7473
 
7604
- setTimeout(() => {
7605
- if (!window.__webamp) {
7606
- throw new Error("Webamp __webamp is undefined!!");
7607
- } else {
7608
- this.webamp = window.__webamp;
7609
- }
7610
7474
 
7611
- if (typeof localStorage.getItem('app-state') !== "undefined") {
7612
- this.loadOptions2(JSON.parse(localStorage.getItem('app-state')));
7613
- } // emit
7475
+ }
7476
+ var queue = [];
7477
+ var draining = false;
7478
+ var currentQueue;
7479
+ var queueIndex = -1;
7614
7480
 
7481
+ function cleanUpNextTick() {
7482
+ if (!draining || !currentQueue) {
7483
+ return;
7484
+ }
7485
+ draining = false;
7486
+ if (currentQueue.length) {
7487
+ queue = currentQueue.concat(queue);
7488
+ } else {
7489
+ queueIndex = -1;
7490
+ }
7491
+ if (queue.length) {
7492
+ drainQueue();
7493
+ }
7494
+ }
7615
7495
 
7616
- if (emit !== false) {
7617
- var _window, _window$Telegram;
7496
+ function drainQueue() {
7497
+ if (draining) {
7498
+ return;
7499
+ }
7500
+ var timeout = runTimeout(cleanUpNextTick);
7501
+ draining = true;
7618
7502
 
7619
- const lastList = this.getCookie('lastlist');
7503
+ var len = queue.length;
7504
+ while(len) {
7505
+ currentQueue = queue;
7506
+ queue = [];
7507
+ while (++queueIndex < len) {
7508
+ if (currentQueue) {
7509
+ currentQueue[queueIndex].run();
7510
+ }
7511
+ }
7512
+ queueIndex = -1;
7513
+ len = queue.length;
7514
+ }
7515
+ currentQueue = null;
7516
+ draining = false;
7517
+ runClearTimeout(timeout);
7518
+ }
7620
7519
 
7621
- if (typeof lastList !== "undefined") {
7622
- this.getTrackListFromYandexDisk(lastList);
7623
- } // @ts-ignore | because no global var telegram avail in project types
7520
+ process.nextTick = function (fun) {
7521
+ var args = new Array(arguments.length - 1);
7522
+ if (arguments.length > 1) {
7523
+ for (var i = 1; i < arguments.length; i++) {
7524
+ args[i - 1] = arguments[i];
7525
+ }
7526
+ }
7527
+ queue.push(new Item(fun, args));
7528
+ if (queue.length === 1 && !draining) {
7529
+ runTimeout(drainQueue);
7530
+ }
7531
+ };
7532
+
7533
+ // v8 likes predictible objects
7534
+ function Item(fun, array) {
7535
+ this.fun = fun;
7536
+ this.array = array;
7537
+ }
7538
+ Item.prototype.run = function () {
7539
+ this.fun.apply(null, this.array);
7540
+ };
7541
+ process.title = 'browser';
7542
+ process.browser = true;
7543
+ process.env = {};
7544
+ process.argv = [];
7545
+ process.version = ''; // empty string to avoid regexp issues
7546
+ process.versions = {};
7624
7547
 
7548
+ function noop() {}
7625
7549
 
7626
- if (!((_window = window) !== null && _window !== void 0 && (_window$Telegram = _window.Telegram) !== null && _window$Telegram !== void 0 && _window$Telegram.WebApp)) {
7627
- console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
7628
- } else {
7629
- var _window2, _window2$Telegram;
7550
+ process.on = noop;
7551
+ process.addListener = noop;
7552
+ process.once = noop;
7553
+ process.off = noop;
7554
+ process.removeListener = noop;
7555
+ process.removeAllListeners = noop;
7556
+ process.emit = noop;
7557
+ process.prependListener = noop;
7558
+ process.prependOnceListener = noop;
7630
7559
 
7631
- // @ts-ignore | because no global var telegram avail in project types
7632
- this.telegram = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Telegram = _window2.Telegram) === null || _window2$Telegram === void 0 ? void 0 : _window2$Telegram.WebApp;
7633
- this.initializeTelegramWebAppEvents();
7634
- }
7560
+ process.listeners = function (name) { return [] }
7635
7561
 
7636
- this.initializeApplicationHandlers();
7637
- }
7638
- }, 1000);
7639
- }
7562
+ process.binding = function (name) {
7563
+ throw new Error('process.binding is not supported');
7564
+ };
7640
7565
 
7641
- initializeTelegramWebAppEvents() {
7642
- this.telegram.offEvent("deactivated", () => {
7643
- this.updateAppState();
7644
- });
7645
- }
7566
+ process.cwd = function () { return '/' };
7567
+ process.chdir = function (dir) {
7568
+ throw new Error('process.chdir is not supported');
7569
+ };
7570
+ process.umask = function() { return 0; };
7646
7571
 
7647
- initializeApplicationHandlers() {
7648
- const window_handlers = ['unload', 'beforeunload', 'pagehide'];
7649
- window_handlers.forEach(handler => {
7650
- window.addEventListener(handler, () => {
7651
- this.updateAppState();
7652
- });
7653
- });
7654
- this.webamp.onTrackDidChange(() => {
7655
- console.log(this.webamp.store.getState());
7656
- this.updateAppState();
7657
- });
7658
- this.webamp.onWillClose(() => {
7659
- this.updateAppState();
7660
- });
7661
- this.webamp.onClose(() => {
7662
- this.updateAppState();
7663
- });
7664
- this.webamp.onMinimize(() => {
7665
- this.updateAppState();
7666
- });
7667
- this.webamp.store.dispatch({
7668
- type: "ENABLE_MILKDROP",
7669
- open: false
7670
- });
7671
- const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
7672
7572
 
7673
- this.webamp.__onStateChange(() => {
7674
- this.onTrackNeedToLoad();
7675
- this.updateAppState();
7676
- });
7573
+ /***/ }),
7574
+ /* 34 */
7575
+ /***/ (function(module, exports) {
7677
7576
 
7678
- ev.forEach(ev => this.webamp.media.on(ev, () => {
7679
- this.updateAppState();
7680
- }));
7577
+ if (typeof Object.create === 'function') {
7578
+ // implementation from standard node.js 'util' module
7579
+ module.exports = function inherits(ctor, superCtor) {
7580
+ if (superCtor) {
7581
+ ctor.super_ = superCtor
7582
+ ctor.prototype = Object.create(superCtor.prototype, {
7583
+ constructor: {
7584
+ value: ctor,
7585
+ enumerable: false,
7586
+ writable: true,
7587
+ configurable: true
7588
+ }
7589
+ })
7590
+ }
7591
+ };
7592
+ } else {
7593
+ // old school shim for old browsers
7594
+ module.exports = function inherits(ctor, superCtor) {
7595
+ if (superCtor) {
7596
+ ctor.super_ = superCtor
7597
+ var TempCtor = function () {}
7598
+ TempCtor.prototype = superCtor.prototype
7599
+ ctor.prototype = new TempCtor()
7600
+ ctor.prototype.constructor = ctor
7601
+ }
7681
7602
  }
7682
-
7683
7603
  }
7684
7604
 
7605
+
7685
7606
  /***/ }),
7686
7607
  /* 35 */
7687
7608
  /***/ (function(module, exports, __webpack_require__) {
@@ -8504,7 +8425,7 @@ function nextTick(fn, arg1, arg2, arg3) {
8504
8425
  }
8505
8426
 
8506
8427
 
8507
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
8428
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33)))
8508
8429
 
8509
8430
  /***/ }),
8510
8431
  /* 48 */
@@ -9065,11 +8986,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
9065
8986
  return target;
9066
8987
  }
9067
8988
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
9068
- var hoist_non_react_statics_cjs = __webpack_require__(29);
8989
+ var hoist_non_react_statics_cjs = __webpack_require__(30);
9069
8990
  var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
9070
8991
 
9071
8992
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/react-is/index.js
9072
- var react_is = __webpack_require__(28);
8993
+ var react_is = __webpack_require__(29);
9073
8994
 
9074
8995
  // CONCATENATED MODULE: /home/exezt-/Projects/webamp/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js
9075
8996
  // React currently throws a warning when using useLayoutEffect on the server.
@@ -13086,7 +13007,7 @@ function toggleEqAuto() {
13086
13007
  };
13087
13008
  }
13088
13009
  // EXTERNAL MODULE: ../winamp-eqf/index.js
13089
- var winamp_eqf = __webpack_require__(31);
13010
+ var winamp_eqf = __webpack_require__(32);
13090
13011
 
13091
13012
  // CONCATENATED MODULE: ./js/skinSprites.ts
13092
13013
 
@@ -15220,7 +15141,7 @@ function selectAll() {
15220
15141
  };
15221
15142
  }
15222
15143
  // EXTERNAL MODULE: ./js/lib/webamp-telegram-handler.ts
15223
- var webamp_telegram_handler = __webpack_require__(34);
15144
+ var webamp_telegram_handler = __webpack_require__(26);
15224
15145
 
15225
15146
  // CONCATENATED MODULE: ./js/actionCreators/files.ts
15226
15147
 
@@ -15647,21 +15568,20 @@ function files_addFilesFromUrl(atIndex = 0) {
15647
15568
  // };
15648
15569
  }
15649
15570
  function files_addFilesFromList() {
15650
- return async (dispatch, getState, {
15651
- handleLoadListEvent
15652
- }) => {
15653
- if (handleLoadListEvent) {
15654
- const tracks = await handleLoadListEvent();
15655
-
15656
- if (tracks != null) {
15657
- dispatch(playlist_removeAllTracks());
15658
- dispatch(files_loadMediaFiles(tracks, constants["e" /* LOAD_STYLE */].NONE, 0));
15659
- return;
15660
- }
15661
- } else {
15662
- alert("Not supported in Webamp");
15663
- }
15664
- };
15571
+ new webamp_telegram_handler["a" /* default */](false).loadCustomTracks(); // return async (dispatch, getState, { handleLoadListEvent }) => {
15572
+ // if (handleLoadListEvent) {
15573
+ // const tracks = await handleLoadListEvent();
15574
+ //
15575
+ // if (tracks != null) {
15576
+ // dispatch(removeAllTracks());
15577
+ //
15578
+ // dispatch(loadMediaFiles(tracks, LOAD_STYLE.NONE, 0));
15579
+ // return;
15580
+ // }
15581
+ // } else {
15582
+ // alert("Not supported in Webamp");
15583
+ // }
15584
+ // };
15665
15585
  }
15666
15586
  function files_saveFilesToList() {
15667
15587
  return (dispatch, getState, {
@@ -23168,7 +23088,7 @@ exports = module.exports = __webpack_require__(110);
23168
23088
  exports.Stream = exports;
23169
23089
  exports.Readable = exports;
23170
23090
  exports.Writable = __webpack_require__(56);
23171
- exports.Duplex = __webpack_require__(26);
23091
+ exports.Duplex = __webpack_require__(27);
23172
23092
  exports.Transform = __webpack_require__(114);
23173
23093
  exports.PassThrough = __webpack_require__(156);
23174
23094
 
@@ -23245,7 +23165,7 @@ Writable.WritableState = WritableState;
23245
23165
 
23246
23166
  /*<replacement>*/
23247
23167
  var util = Object.create(__webpack_require__(37));
23248
- util.inherits = __webpack_require__(33);
23168
+ util.inherits = __webpack_require__(34);
23249
23169
  /*</replacement>*/
23250
23170
 
23251
23171
  /*<replacement>*/
@@ -23278,7 +23198,7 @@ util.inherits(Writable, Stream);
23278
23198
  function nop() {}
23279
23199
 
23280
23200
  function WritableState(options, stream) {
23281
- Duplex = Duplex || __webpack_require__(26);
23201
+ Duplex = Duplex || __webpack_require__(27);
23282
23202
 
23283
23203
  options = options || {};
23284
23204
 
@@ -23428,7 +23348,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot
23428
23348
  }
23429
23349
 
23430
23350
  function Writable(options) {
23431
- Duplex = Duplex || __webpack_require__(26);
23351
+ Duplex = Duplex || __webpack_require__(27);
23432
23352
 
23433
23353
  // Writable ctor is applied to Duplexes, too.
23434
23354
  // `realHasInstance` is necessary because using plain `instanceof`
@@ -23865,7 +23785,7 @@ Writable.prototype._destroy = function (err, cb) {
23865
23785
  this.end();
23866
23786
  cb(err);
23867
23787
  };
23868
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32), __webpack_require__(107).setImmediate, __webpack_require__(19)))
23788
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33), __webpack_require__(107).setImmediate, __webpack_require__(19)))
23869
23789
 
23870
23790
  /***/ }),
23871
23791
  /* 57 */
@@ -25012,7 +24932,7 @@ module.exports = toString;
25012
24932
  /* 81 */
25013
24933
  /***/ (function(module, exports, __webpack_require__) {
25014
24934
 
25015
- var Symbol = __webpack_require__(27),
24935
+ var Symbol = __webpack_require__(28),
25016
24936
  arrayMap = __webpack_require__(84),
25017
24937
  isArray = __webpack_require__(85),
25018
24938
  isSymbol = __webpack_require__(86);
@@ -25175,7 +25095,7 @@ module.exports = isSymbol;
25175
25095
  /* 87 */
25176
25096
  /***/ (function(module, exports, __webpack_require__) {
25177
25097
 
25178
- var Symbol = __webpack_require__(27),
25098
+ var Symbol = __webpack_require__(28),
25179
25099
  getRawTag = __webpack_require__(88),
25180
25100
  objectToString = __webpack_require__(89);
25181
25101
 
@@ -25209,7 +25129,7 @@ module.exports = baseGetTag;
25209
25129
  /* 88 */
25210
25130
  /***/ (function(module, exports, __webpack_require__) {
25211
25131
 
25212
- var Symbol = __webpack_require__(27);
25132
+ var Symbol = __webpack_require__(28);
25213
25133
 
25214
25134
  /** Used for built-in method references. */
25215
25135
  var objectProto = Object.prototype;
@@ -27082,7 +27002,7 @@ fileType.stream = readableStream => new Promise((resolve, reject) => {
27082
27002
  module.exports = Stream;
27083
27003
 
27084
27004
  var EE = __webpack_require__(54).EventEmitter;
27085
- var inherits = __webpack_require__(33);
27005
+ var inherits = __webpack_require__(34);
27086
27006
 
27087
27007
  inherits(Stream, EE);
27088
27008
  Stream.Readable = __webpack_require__(55);
@@ -27259,7 +27179,7 @@ function _isUint8Array(obj) {
27259
27179
 
27260
27180
  /*<replacement>*/
27261
27181
  var util = Object.create(__webpack_require__(37));
27262
- util.inherits = __webpack_require__(33);
27182
+ util.inherits = __webpack_require__(34);
27263
27183
  /*</replacement>*/
27264
27184
 
27265
27185
  /*<replacement>*/
@@ -27293,7 +27213,7 @@ function prependListener(emitter, event, fn) {
27293
27213
  }
27294
27214
 
27295
27215
  function ReadableState(options, stream) {
27296
- Duplex = Duplex || __webpack_require__(26);
27216
+ Duplex = Duplex || __webpack_require__(27);
27297
27217
 
27298
27218
  options = options || {};
27299
27219
 
@@ -27370,7 +27290,7 @@ function ReadableState(options, stream) {
27370
27290
  }
27371
27291
 
27372
27292
  function Readable(options) {
27373
- Duplex = Duplex || __webpack_require__(26);
27293
+ Duplex = Duplex || __webpack_require__(27);
27374
27294
 
27375
27295
  if (!(this instanceof Readable)) return new Readable(options);
27376
27296
 
@@ -28211,7 +28131,7 @@ function indexOf(xs, x) {
28211
28131
  }
28212
28132
  return -1;
28213
28133
  }
28214
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(32)))
28134
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(33)))
28215
28135
 
28216
28136
  /***/ }),
28217
28137
  /* 111 */
@@ -28674,11 +28594,11 @@ function simpleEnd(buf) {
28674
28594
 
28675
28595
  module.exports = Transform;
28676
28596
 
28677
- var Duplex = __webpack_require__(26);
28597
+ var Duplex = __webpack_require__(27);
28678
28598
 
28679
28599
  /*<replacement>*/
28680
28600
  var util = Object.create(__webpack_require__(37));
28681
- util.inherits = __webpack_require__(33);
28601
+ util.inherits = __webpack_require__(34);
28682
28602
  /*</replacement>*/
28683
28603
 
28684
28604
  util.inherits(Transform, Duplex);
@@ -29453,7 +29373,7 @@ __webpack_require__.r(__webpack_exports__);
29453
29373
  /* harmony import */ var music_metadata_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(119);
29454
29374
  /* harmony import */ var music_metadata_browser__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(music_metadata_browser__WEBPACK_IMPORTED_MODULE_2__);
29455
29375
  /* harmony import */ var _webampLazy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51);
29456
- /* harmony import */ var _lib_webamp_telegram_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34);
29376
+ /* harmony import */ var _lib_webamp_telegram_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26);
29457
29377
 
29458
29378
 
29459
29379
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
@@ -29824,7 +29744,7 @@ function fromByteArray (uint8) {
29824
29744
  attachTo.clearImmediate = clearImmediate;
29825
29745
  }(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
29826
29746
 
29827
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(32)))
29747
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(33)))
29828
29748
 
29829
29749
  /***/ }),
29830
29750
  /* 123 */
@@ -31384,7 +31304,7 @@ function callbackify(original) {
31384
31304
  }
31385
31305
  exports.callbackify = callbackify;
31386
31306
 
31387
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(32)))
31307
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(33)))
31388
31308
 
31389
31309
  /***/ }),
31390
31310
  /* 130 */
@@ -33946,7 +33866,7 @@ var Transform = __webpack_require__(114);
33946
33866
 
33947
33867
  /*<replacement>*/
33948
33868
  var util = Object.create(__webpack_require__(37));
33949
- util.inherits = __webpack_require__(33);
33869
+ util.inherits = __webpack_require__(34);
33950
33870
  /*</replacement>*/
33951
33871
 
33952
33872
  util.inherits(PassThrough, Transform);
@@ -33972,7 +33892,7 @@ module.exports = __webpack_require__(56);
33972
33892
  /* 158 */
33973
33893
  /***/ (function(module, exports, __webpack_require__) {
33974
33894
 
33975
- module.exports = __webpack_require__(26);
33895
+ module.exports = __webpack_require__(27);
33976
33896
 
33977
33897
 
33978
33898
  /***/ }),