@exezt-/webamp 1.5.0-0x703 → 1.5.0-0x705

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.
@@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap
91
91
  /******/
92
92
  /******/
93
93
  /******/ // Load entry module and return exports
94
- /******/ return __webpack_require__(__webpack_require__.s = 48);
94
+ /******/ return __webpack_require__(__webpack_require__.s = 50);
95
95
  /******/ })
96
96
  /************************************************************************/
97
97
  /******/ ([
@@ -102,7 +102,7 @@ return /******/ (function(modules) { // webpackBootstrap
102
102
 
103
103
 
104
104
  if (true) {
105
- module.exports = __webpack_require__(55);
105
+ module.exports = __webpack_require__(57);
106
106
  } else {}
107
107
 
108
108
 
@@ -114,259 +114,700 @@ if (true) {
114
114
 
115
115
 
116
116
  if (true) {
117
- module.exports = __webpack_require__(56);
117
+ module.exports = __webpack_require__(58);
118
118
  } else {}
119
119
 
120
120
 
121
121
  /***/ }),
122
122
  /* 2 */
123
- /***/ (function(module, exports) {
123
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
124
124
 
125
- function _defineProperty(obj, key, value) {
126
- if (key in obj) {
127
- Object.defineProperty(obj, key, {
128
- value: value,
129
- enumerable: true,
130
- configurable: true,
131
- writable: true
132
- });
133
- } else {
134
- obj[key] = value;
135
- }
125
+ "use strict";
126
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BANDS; });
127
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return WINDOWS; });
128
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return LOAD_STYLE; });
129
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return MEDIA_TAG_REQUEST_STATUS; });
130
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return UTF8_ELLIPSIS; });
131
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CHARACTER_WIDTH; });
132
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return WINDOW_RESIZE_SEGMENT_WIDTH; });
133
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return WINDOW_RESIZE_SEGMENT_HEIGHT; });
134
+ /* unused harmony export WINDOW_HEIGHT */
135
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return WINDOW_WIDTH; });
136
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return TRACK_HEIGHT; });
137
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return LETTERS; });
138
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return DEFAULT_SKIN; });
139
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return VISUALIZERS; });
140
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return VISUALIZER_ORDER; });
141
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return TIME_MODE; });
142
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return MEDIA_STATUS; });
143
+ /* harmony import */ var _baseSkin_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
144
+ var _baseSkin_json__WEBPACK_IMPORTED_MODULE_0___namespace = /*#__PURE__*/__webpack_require__.t(40, 1);
136
145
 
137
- return obj;
138
- }
146
+ const BANDS = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
147
+ const WINDOWS = {
148
+ MAIN: "main",
149
+ PLAYLIST: "playlist",
150
+ EQUALIZER: "equalizer",
151
+ MILKDROP: "milkdrop"
152
+ };
153
+ const LOAD_STYLE = {
154
+ BUFFER: "BUFFER",
155
+ PLAY: "PLAY",
156
+ NONE: "NONE"
157
+ }; // TODO: Make this an enum?
139
158
 
140
- module.exports = _defineProperty;
159
+ const MEDIA_TAG_REQUEST_STATUS = {
160
+ INITIALIZED: "INITIALIZED",
161
+ FAILED: "FAILED",
162
+ COMPLETE: "COMPLETE",
163
+ NOT_REQUESTED: "NOT_REQUESTED"
164
+ };
165
+ const UTF8_ELLIPSIS = "\u2026";
166
+ const CHARACTER_WIDTH = 5;
167
+ const WINDOW_RESIZE_SEGMENT_WIDTH = 25;
168
+ const WINDOW_RESIZE_SEGMENT_HEIGHT = 29;
169
+ const WINDOW_HEIGHT = 116;
170
+ const WINDOW_WIDTH = 275;
171
+ const TRACK_HEIGHT = 13;
172
+ const LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
173
+ const DEFAULT_SKIN = _baseSkin_json__WEBPACK_IMPORTED_MODULE_0__;
174
+ const VISUALIZERS = {
175
+ OSCILLOSCOPE: "OSCILLOSCOPE",
176
+ BAR: "BAR",
177
+ NONE: "NONE",
178
+ MILKDROP: "MILKDROP"
179
+ };
180
+ const VISUALIZER_ORDER = [VISUALIZERS.BAR, VISUALIZERS.OSCILLOSCOPE, // TODO: Verify the order
181
+ VISUALIZERS.NONE];
182
+ const TIME_MODE = {
183
+ ELAPSED: "ELAPSED",
184
+ REMAINING: "REMAINING"
185
+ }; // TODO: Convert to enum once we are fully Typescript
186
+
187
+ const MEDIA_STATUS = {
188
+ PLAYING: "PLAYING",
189
+ STOPPED: "STOPPED",
190
+ PAUSED: "PAUSED"
191
+ };
141
192
 
142
193
  /***/ }),
143
194
  /* 3 */
144
- /***/ (function(module, exports, __webpack_require__) {
195
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
145
196
 
146
197
  "use strict";
198
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return imgFromUrl; });
199
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getTimeObj; });
200
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getTimeStr; });
201
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return parseViscolors; });
202
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return parseIni; });
203
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return clamp; });
204
+ /* unused harmony export sum */
205
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return base64FromDataArray; });
206
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return base64FromArrayBuffer; });
207
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return downloadURI; });
208
+ /* unused harmony export toPercent */
209
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return percentToRange; });
210
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return percentToIndex; });
211
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return normalizeEqBand; });
212
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return denormalizeEqBand; });
213
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return merge; });
214
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return segment; });
215
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return shuffle; });
216
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return sort; });
217
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return moveSelected; });
218
+ /* unused harmony export spliceIn */
219
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return replaceAtIndex; });
220
+ /* unused harmony export debounce */
221
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return throttle; });
222
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return uniqueId; });
223
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return objectForEach; });
224
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return objectMap; });
225
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return objectFilter; });
226
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return calculateBoundingBox; });
227
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return findLastIndex; });
228
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getWindowSize; });
229
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getScreenSize; });
230
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getX; });
231
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getY; });
232
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return weakMapMemoize; });
233
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
147
234
 
235
+ function imgFromUrl(url) {
236
+ return new Promise((resolve, reject) => {
237
+ const img = new Image();
148
238
 
149
- exports.__esModule = true;
150
- exports.defaultMemoize = defaultMemoize;
151
- exports.createSelectorCreator = createSelectorCreator;
152
- exports.createStructuredSelector = createStructuredSelector;
153
- function defaultEqualityCheck(a, b) {
154
- return a === b;
239
+ img.onload = () => {
240
+ resolve(img);
241
+ };
242
+
243
+ img.onerror = reject;
244
+ img.src = url;
245
+ });
155
246
  }
247
+ const getTimeObj = time => {
248
+ if (time == null) {
249
+ // If we clean up `<MiniTime />` we don't need to do this any more.
250
+ return {
251
+ minutesFirstDigit: " ",
252
+ minutesSecondDigit: " ",
253
+ secondsFirstDigit: " ",
254
+ secondsSecondDigit: " "
255
+ };
256
+ }
156
257
 
157
- function areArgumentsShallowlyEqual(equalityCheck, prev, next) {
158
- if (prev === null || next === null || prev.length !== next.length) {
159
- return false;
258
+ const minutes = Math.floor(time / 60);
259
+ const seconds = time % 60;
260
+ const digits = time == null ? [" ", " ", " ", " "] : [String(Math.floor(minutes / 10)), String(Math.floor(minutes % 10)), String(Math.floor(seconds / 10)), String(Math.floor(seconds % 10))];
261
+ const [minutesFirstDigit, minutesSecondDigit, secondsFirstDigit, secondsSecondDigit] = digits;
262
+ return {
263
+ minutesFirstDigit,
264
+ minutesSecondDigit,
265
+ secondsFirstDigit,
266
+ secondsSecondDigit
267
+ };
268
+ };
269
+ const getTimeStr = (time, truncate = true) => {
270
+ if (time == null) {
271
+ return "";
160
272
  }
161
273
 
162
- // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
163
- var length = prev.length;
164
- for (var i = 0; i < length; i++) {
165
- if (!equalityCheck(prev[i], next[i])) {
166
- return false;
274
+ const {
275
+ minutesFirstDigit,
276
+ minutesSecondDigit,
277
+ secondsFirstDigit,
278
+ secondsSecondDigit
279
+ } = getTimeObj(time);
280
+ return [truncate && minutesFirstDigit === "0" ? "" : minutesFirstDigit, minutesSecondDigit, ":", secondsFirstDigit, secondsSecondDigit].join("");
281
+ };
282
+ const parseViscolors = text => {
283
+ const entries = text.split("\n");
284
+ const regex = /^\s*(\d+)\s*,?\s*(\d+)\s*,?\s*(\d+)/;
285
+ const colors = [..._constants__WEBPACK_IMPORTED_MODULE_0__[/* DEFAULT_SKIN */ "c"].colors];
286
+ entries.map(line => regex.exec(line)).filter(Boolean).map(matches => matches.slice(1, 4).join(",")).map((rgb, i) => {
287
+ colors[i] = `rgb(${rgb})`;
288
+ });
289
+ return colors;
290
+ };
291
+ const SECTION_REGEX = /^\s*\[(.+?)\]\s*$/;
292
+ const PROPERTY_REGEX = /^\s*([^;][^=]*)\s*=\s*(.*)\s*$/;
293
+ const parseIni = text => {
294
+ let section, match;
295
+ return text.split(/[\r\n]+/g).reduce((data, line) => {
296
+ if ((match = line.match(PROPERTY_REGEX)) && section != null) {
297
+ const key = match[1].trim().toLowerCase();
298
+ const value = match[2] // Ignore anything after a second `=`
299
+ // TODO: What if this is inside quotes or escaped?
300
+ .replace(/\=.*$/g, "").trim() // Strip quotes
301
+ // TODO: What about escaped quotes?
302
+ // TODO: What about unbalanced quotes?
303
+ .replace(/(^")|("$)|(^')|('$)/g, "");
304
+ data[section][key] = value;
305
+ } else if (match = line.match(SECTION_REGEX)) {
306
+ section = match[1].trim().toLowerCase();
307
+ data[section] = {};
167
308
  }
168
- }
169
309
 
170
- return true;
310
+ return data;
311
+ }, {});
312
+ };
313
+ const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
314
+ const sum = values => values.reduce((total, value) => total + value, 0);
315
+ function base64FromDataArray(dataArray) {
316
+ return window.btoa(Array.from(dataArray).map(byte => String.fromCharCode(byte)).join(""));
171
317
  }
318
+ const base64FromArrayBuffer = arrayBuffer => {
319
+ return base64FromDataArray(new Uint8Array(arrayBuffer));
320
+ }; // https://stackoverflow.com/a/15832662/1263117
172
321
 
173
- function defaultMemoize(func) {
174
- var equalityCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultEqualityCheck;
175
-
176
- var lastArgs = null;
177
- var lastResult = null;
178
- // we reference arguments instead of spreading them for performance reasons
179
- return function () {
180
- if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {
181
- // apply arguments instead of spreading for performance.
182
- lastResult = func.apply(null, arguments);
183
- }
184
-
185
- lastArgs = arguments;
186
- return lastResult;
187
- };
322
+ function downloadURI(uri, name) {
323
+ const link = document.createElement("a");
324
+ link.download = name;
325
+ link.href = uri;
326
+ window.document.body.appendChild(link);
327
+ link.click();
328
+ window.document.body.removeChild(link);
188
329
  }
330
+ const toPercent = (min, max, value) => (value - min) / (max - min);
331
+ const percentToRange = (percent, min, max) => min + Math.round(percent * (max - min));
332
+ const percentToIndex = (percent, length) => percentToRange(percent, 0, length - 1);
189
333
 
190
- function getDependencies(funcs) {
191
- var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
334
+ const rebound = (oldMin, oldMax, newMin, newMax) => oldValue => percentToRange(toPercent(oldMin, oldMax, oldValue), newMin, newMax); // Convert an .eqf value to a 0-100
192
335
 
193
- if (!dependencies.every(function (dep) {
194
- return typeof dep === 'function';
195
- })) {
196
- var dependencyTypes = dependencies.map(function (dep) {
197
- return typeof dep;
198
- }).join(', ');
199
- throw new Error('Selector creators expect all input-selectors to be functions, ' + ('instead received the following types: [' + dependencyTypes + ']'));
200
- }
201
336
 
202
- return dependencies;
203
- }
337
+ const normalizeEqBand = rebound(1, 64, 0, 100); // Convert a 0-100 to an .eqf value
204
338
 
205
- function createSelectorCreator(memoize) {
206
- for (var _len = arguments.length, memoizeOptions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
207
- memoizeOptions[_key - 1] = arguments[_key];
208
- }
339
+ const denormalizeEqBand = rebound(0, 100, 1, 64); // Merge a `source` object to a `target` recursively
340
+ // TODO: The typing here is a bit of a disaster.
209
341
 
210
- return function () {
211
- for (var _len2 = arguments.length, funcs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
212
- funcs[_key2] = arguments[_key2];
213
- }
342
+ function merge(target, source) {
343
+ const s = source;
344
+ const t = target; // Iterate through `source` properties and if an `Object` set property to merge of `target` and `source` properties
214
345
 
215
- var recomputations = 0;
216
- var resultFunc = funcs.pop();
217
- var dependencies = getDependencies(funcs);
346
+ for (const key of Object.keys(s)) {
347
+ if (s[key] instanceof Object) Object.assign(s[key], merge(t[key], s[key]));
348
+ } // Join `target` and modified `source`
218
349
 
219
- var memoizedResultFunc = memoize.apply(undefined, [function () {
220
- recomputations++;
221
- // apply arguments instead of spreading for performance.
222
- return resultFunc.apply(null, arguments);
223
- }].concat(memoizeOptions));
224
350
 
225
- // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
226
- var selector = defaultMemoize(function () {
227
- var params = [];
228
- var length = dependencies.length;
351
+ Object.assign(target || {}, source);
352
+ return target;
353
+ } // Maps a value in a range (defined my min/max) to a value in an array (options).
229
354
 
230
- for (var i = 0; i < length; i++) {
231
- // apply arguments instead of spreading and mutate a local list of params for performance.
232
- params.push(dependencies[i].apply(null, arguments));
233
- }
355
+ function segment(min, max, value, newValues) {
356
+ const ratio = toPercent(min, max, value);
357
+ /*
358
+ | 0 | 1 | 2 |
359
+ 0 1 2 3
360
+ */
234
361
 
235
- // apply arguments instead of spreading for performance.
236
- return memoizedResultFunc.apply(null, params);
237
- });
362
+ return newValues[percentToIndex(ratio, newValues.length)];
363
+ } // https://bost.ocks.org/mike/shuffle/
364
+ // Shuffle an array in O(n)
238
365
 
239
- selector.resultFunc = resultFunc;
240
- selector.recomputations = function () {
241
- return recomputations;
242
- };
243
- selector.resetRecomputations = function () {
244
- return recomputations = 0;
245
- };
246
- return selector;
247
- };
248
- }
366
+ function shuffle(array) {
367
+ const sorted = [...array];
368
+ let m = sorted.length; // While there remain elements to shuffle…
249
369
 
250
- var createSelector = exports.createSelector = createSelectorCreator(defaultMemoize);
251
-
252
- function createStructuredSelector(selectors) {
253
- var selectorCreator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createSelector;
370
+ while (m) {
371
+ // Pick a remaining element…
372
+ const i = Math.floor(Math.random() * m--); // And swap it with the current element.
254
373
 
255
- if (typeof selectors !== 'object') {
256
- throw new Error('createStructuredSelector expects first argument to be an object ' + ('where each property is a selector, instead received a ' + typeof selectors));
374
+ const val = sorted[m];
375
+ sorted[m] = sorted[i];
376
+ sorted[i] = val;
257
377
  }
258
- var objectKeys = Object.keys(selectors);
259
- return selectorCreator(objectKeys.map(function (key) {
260
- return selectors[key];
261
- }), function () {
262
- for (var _len3 = arguments.length, values = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
263
- values[_key3] = arguments[_key3];
378
+
379
+ return sorted;
380
+ }
381
+ function sort(array, iteratee) {
382
+ return [...array].sort((a, b) => {
383
+ const aKey = iteratee(a);
384
+ const bKey = iteratee(b);
385
+
386
+ if (aKey < bKey) {
387
+ return -1;
388
+ } else if (aKey > bKey) {
389
+ return 1;
264
390
  }
265
391
 
266
- return values.reduce(function (composition, value, index) {
267
- composition[objectKeys[index]] = value;
268
- return composition;
269
- }, {});
392
+ return 0;
270
393
  });
271
394
  }
395
+ function moveSelected(arr, isSelected, offset) {
396
+ const newArr = new Array(arr.length);
397
+ let next = 0;
272
398
 
273
- /***/ }),
274
- /* 4 */
275
- /***/ (function(module, exports, __webpack_require__) {
399
+ for (let i = 0; i < newArr.length; i++) {
400
+ const from = i - offset; // Is a value supposed to move here?
276
401
 
277
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
278
- Copyright (c) 2017 Jed Watson.
279
- Licensed under the MIT License (MIT), see
280
- http://jedwatson.github.io/classnames
281
- */
282
- /* global define */
402
+ if (from >= 0 && from < arr.length && isSelected(from)) {
403
+ newArr[i] = arr[from];
404
+ } else {
405
+ while (next < arr.length && isSelected(next)) {
406
+ next++;
407
+ }
283
408
 
284
- (function () {
285
- 'use strict';
409
+ newArr[i] = arr[next];
410
+ next++;
411
+ }
412
+ }
286
413
 
287
- var hasOwn = {}.hasOwnProperty;
414
+ return newArr;
415
+ }
416
+ function spliceIn(original, start, newValues) {
417
+ const newArr = [...original];
418
+ newArr.splice(start, 0, ...newValues);
419
+ return newArr;
420
+ }
421
+ function replaceAtIndex(arr, index, newValue) {
422
+ return [...arr.slice(0, index), newValue, ...arr.slice(index + 1)];
423
+ }
424
+ function debounce(func, delay) {
425
+ let timeout;
426
+ let callbackArgs = [];
427
+ return function (context, ...args) {
428
+ callbackArgs = args;
288
429
 
289
- function classNames () {
290
- var classes = [];
430
+ if (timeout != null) {
431
+ clearTimeout(timeout);
432
+ }
291
433
 
292
- for (var i = 0; i < arguments.length; i++) {
293
- var arg = arguments[i];
294
- if (!arg) continue;
434
+ timeout = window.setTimeout(() => {
435
+ func.apply(context, callbackArgs);
436
+ }, delay);
437
+ };
438
+ } // Trailing edge only throttle
295
439
 
296
- var argType = typeof arg;
440
+ function throttle(func, delay) {
441
+ let timeout = null;
442
+ let callbackArgs = [];
443
+ return function (context, ...args) {
444
+ callbackArgs = args;
297
445
 
298
- if (argType === 'string' || argType === 'number') {
299
- classes.push(arg);
300
- } else if (Array.isArray(arg) && arg.length) {
301
- var inner = classNames.apply(null, arg);
302
- if (inner) {
303
- classes.push(inner);
304
- }
305
- } else if (argType === 'object') {
306
- for (var key in arg) {
307
- if (hasOwn.call(arg, key) && arg[key]) {
308
- classes.push(key);
309
- }
310
- }
311
- }
312
- }
446
+ if (!timeout) {
447
+ timeout = window.setTimeout(() => {
448
+ func.apply(context, callbackArgs);
449
+ timeout = null;
450
+ }, delay);
451
+ }
452
+ };
453
+ }
454
+ let counter = 0;
455
+ function uniqueId() {
456
+ return counter++;
457
+ }
458
+ function objectForEach(obj, cb) {
459
+ Object.keys(obj).forEach(key => cb(obj[key], key));
460
+ }
461
+ function objectMap(obj, cb) {
462
+ const modified = {};
463
+ Object.keys(obj).forEach(key => modified[key] = cb(obj[key], key));
464
+ return modified;
465
+ }
466
+ function objectFilter(obj, predicate) {
467
+ // TODO: Could return the original reference if no values change
468
+ return Object.keys(obj).reduce((newObj, key) => {
469
+ if (predicate(obj[key], key)) {
470
+ newObj[key] = obj[key];
471
+ }
313
472
 
314
- return classes.join(' ');
315
- }
473
+ return newObj;
474
+ }, {});
475
+ }
476
+ const calculateBoundingBox = windows => {
477
+ if (windows.length === 0) {
478
+ return null;
479
+ }
316
480
 
317
- if ( true && module.exports) {
318
- classNames.default = classNames;
319
- module.exports = classNames;
320
- } else if (true) {
321
- // register as 'classnames', consistent with npm package name
322
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
323
- return classNames;
324
- }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
325
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
326
- } else {}
327
- }());
481
+ const windowSizes = windows.map(w => ({
482
+ left: w.x,
483
+ top: w.y,
484
+ bottom: w.y + w.height,
485
+ right: w.x + w.width
486
+ }));
487
+ return windowSizes.reduce((b, w) => ({
488
+ left: Math.min(b.left, w.left),
489
+ top: Math.min(b.top, w.top),
490
+ bottom: Math.max(b.bottom, w.bottom),
491
+ right: Math.max(b.right, w.right)
492
+ }));
493
+ };
494
+ function findLastIndex(arr, cb) {
495
+ for (let i = arr.length - 1; i >= 0; i--) {
496
+ if (cb(arr[i])) {
497
+ return i;
498
+ }
499
+ }
328
500
 
501
+ return -1;
502
+ }
503
+ function getWindowSize() {
504
+ // Aparently this is crazy across browsers.
505
+ return {
506
+ width: Math.max(document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth, document.body.clientWidth, document.documentElement.clientWidth),
507
+ height: Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight)
508
+ };
509
+ }
510
+ function getScreenSize() {
511
+ return {
512
+ width: window.screen.width,
513
+ height: window.screen.height
514
+ };
515
+ }
329
516
 
330
- /***/ }),
331
- /* 5 */
332
- /***/ (function(module, exports, __webpack_require__) {
517
+ function getPos(e) {
518
+ switch (e.type) {
519
+ case "touchstart":
520
+ case "touchmove":
521
+ {
522
+ var _targetTouches$;
333
523
 
334
- "use strict";
524
+ const touch = (_targetTouches$ = e.targetTouches[0]) !== null && _targetTouches$ !== void 0 ? _targetTouches$ : e.touches[0];
335
525
 
526
+ if (touch == null) {
527
+ // Investigating https://github.com/captbaritone/webamp/issues/1105
528
+ throw new Error("Unexpected touch event with zero touch targets.");
529
+ }
336
530
 
337
- function checkDCE() {
338
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
339
- if (
340
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
341
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
342
- ) {
343
- return;
344
- }
345
- if (false) {}
346
- try {
347
- // Verify that the code above has been dead code eliminated (DCE'd).
348
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
349
- } catch (err) {
350
- // DevTools shouldn't crash React, no matter what.
351
- // We should still report in case we break this code.
352
- console.error(err);
531
+ return touch;
532
+ }
533
+
534
+ case "mousedown":
535
+ case "mousemove":
536
+ {
537
+ return e;
538
+ }
539
+
540
+ default:
541
+ throw new Error(`Unexpected event type: ${e.type}`);
353
542
  }
354
543
  }
355
544
 
356
- if (true) {
357
- // DCE check should happen before ReactDOM bundle executes so that
358
- // DevTools can report bad minification during injection.
359
- checkDCE();
360
- module.exports = __webpack_require__(57);
361
- } else {}
545
+ function getX(e) {
546
+ return getPos(e).clientX;
547
+ }
548
+ function getY(e) {
549
+ return getPos(e).clientY;
550
+ }
551
+ function weakMapMemoize(func) {
552
+ const cache = new WeakMap();
553
+ return value => {
554
+ if (!cache.has(value)) {
555
+ cache.set(value, func(value));
556
+ }
362
557
 
558
+ return cache.get(value);
559
+ };
560
+ }
363
561
 
364
562
  /***/ }),
365
- /* 6 */,
366
- /* 7 */
367
- /***/ (function(module, exports, __webpack_require__) {
563
+ /* 4 */
564
+ /***/ (function(module, exports) {
368
565
 
369
- var objectWithoutPropertiesLoose = __webpack_require__(65);
566
+ function _defineProperty(obj, key, value) {
567
+ if (key in obj) {
568
+ Object.defineProperty(obj, key, {
569
+ value: value,
570
+ enumerable: true,
571
+ configurable: true,
572
+ writable: true
573
+ });
574
+ } else {
575
+ obj[key] = value;
576
+ }
577
+
578
+ return obj;
579
+ }
580
+
581
+ module.exports = _defineProperty;
582
+
583
+ /***/ }),
584
+ /* 5 */
585
+ /***/ (function(module, exports, __webpack_require__) {
586
+
587
+ "use strict";
588
+
589
+
590
+ exports.__esModule = true;
591
+ exports.defaultMemoize = defaultMemoize;
592
+ exports.createSelectorCreator = createSelectorCreator;
593
+ exports.createStructuredSelector = createStructuredSelector;
594
+ function defaultEqualityCheck(a, b) {
595
+ return a === b;
596
+ }
597
+
598
+ function areArgumentsShallowlyEqual(equalityCheck, prev, next) {
599
+ if (prev === null || next === null || prev.length !== next.length) {
600
+ return false;
601
+ }
602
+
603
+ // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
604
+ var length = prev.length;
605
+ for (var i = 0; i < length; i++) {
606
+ if (!equalityCheck(prev[i], next[i])) {
607
+ return false;
608
+ }
609
+ }
610
+
611
+ return true;
612
+ }
613
+
614
+ function defaultMemoize(func) {
615
+ var equalityCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultEqualityCheck;
616
+
617
+ var lastArgs = null;
618
+ var lastResult = null;
619
+ // we reference arguments instead of spreading them for performance reasons
620
+ return function () {
621
+ if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {
622
+ // apply arguments instead of spreading for performance.
623
+ lastResult = func.apply(null, arguments);
624
+ }
625
+
626
+ lastArgs = arguments;
627
+ return lastResult;
628
+ };
629
+ }
630
+
631
+ function getDependencies(funcs) {
632
+ var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
633
+
634
+ if (!dependencies.every(function (dep) {
635
+ return typeof dep === 'function';
636
+ })) {
637
+ var dependencyTypes = dependencies.map(function (dep) {
638
+ return typeof dep;
639
+ }).join(', ');
640
+ throw new Error('Selector creators expect all input-selectors to be functions, ' + ('instead received the following types: [' + dependencyTypes + ']'));
641
+ }
642
+
643
+ return dependencies;
644
+ }
645
+
646
+ function createSelectorCreator(memoize) {
647
+ for (var _len = arguments.length, memoizeOptions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
648
+ memoizeOptions[_key - 1] = arguments[_key];
649
+ }
650
+
651
+ return function () {
652
+ for (var _len2 = arguments.length, funcs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
653
+ funcs[_key2] = arguments[_key2];
654
+ }
655
+
656
+ var recomputations = 0;
657
+ var resultFunc = funcs.pop();
658
+ var dependencies = getDependencies(funcs);
659
+
660
+ var memoizedResultFunc = memoize.apply(undefined, [function () {
661
+ recomputations++;
662
+ // apply arguments instead of spreading for performance.
663
+ return resultFunc.apply(null, arguments);
664
+ }].concat(memoizeOptions));
665
+
666
+ // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
667
+ var selector = defaultMemoize(function () {
668
+ var params = [];
669
+ var length = dependencies.length;
670
+
671
+ for (var i = 0; i < length; i++) {
672
+ // apply arguments instead of spreading and mutate a local list of params for performance.
673
+ params.push(dependencies[i].apply(null, arguments));
674
+ }
675
+
676
+ // apply arguments instead of spreading for performance.
677
+ return memoizedResultFunc.apply(null, params);
678
+ });
679
+
680
+ selector.resultFunc = resultFunc;
681
+ selector.recomputations = function () {
682
+ return recomputations;
683
+ };
684
+ selector.resetRecomputations = function () {
685
+ return recomputations = 0;
686
+ };
687
+ return selector;
688
+ };
689
+ }
690
+
691
+ var createSelector = exports.createSelector = createSelectorCreator(defaultMemoize);
692
+
693
+ function createStructuredSelector(selectors) {
694
+ var selectorCreator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createSelector;
695
+
696
+ if (typeof selectors !== 'object') {
697
+ throw new Error('createStructuredSelector expects first argument to be an object ' + ('where each property is a selector, instead received a ' + typeof selectors));
698
+ }
699
+ var objectKeys = Object.keys(selectors);
700
+ return selectorCreator(objectKeys.map(function (key) {
701
+ return selectors[key];
702
+ }), function () {
703
+ for (var _len3 = arguments.length, values = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
704
+ values[_key3] = arguments[_key3];
705
+ }
706
+
707
+ return values.reduce(function (composition, value, index) {
708
+ composition[objectKeys[index]] = value;
709
+ return composition;
710
+ }, {});
711
+ });
712
+ }
713
+
714
+ /***/ }),
715
+ /* 6 */
716
+ /***/ (function(module, exports, __webpack_require__) {
717
+
718
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
719
+ Copyright (c) 2017 Jed Watson.
720
+ Licensed under the MIT License (MIT), see
721
+ http://jedwatson.github.io/classnames
722
+ */
723
+ /* global define */
724
+
725
+ (function () {
726
+ 'use strict';
727
+
728
+ var hasOwn = {}.hasOwnProperty;
729
+
730
+ function classNames () {
731
+ var classes = [];
732
+
733
+ for (var i = 0; i < arguments.length; i++) {
734
+ var arg = arguments[i];
735
+ if (!arg) continue;
736
+
737
+ var argType = typeof arg;
738
+
739
+ if (argType === 'string' || argType === 'number') {
740
+ classes.push(arg);
741
+ } else if (Array.isArray(arg) && arg.length) {
742
+ var inner = classNames.apply(null, arg);
743
+ if (inner) {
744
+ classes.push(inner);
745
+ }
746
+ } else if (argType === 'object') {
747
+ for (var key in arg) {
748
+ if (hasOwn.call(arg, key) && arg[key]) {
749
+ classes.push(key);
750
+ }
751
+ }
752
+ }
753
+ }
754
+
755
+ return classes.join(' ');
756
+ }
757
+
758
+ if ( true && module.exports) {
759
+ classNames.default = classNames;
760
+ module.exports = classNames;
761
+ } else if (true) {
762
+ // register as 'classnames', consistent with npm package name
763
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
764
+ return classNames;
765
+ }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
766
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
767
+ } else {}
768
+ }());
769
+
770
+
771
+ /***/ }),
772
+ /* 7 */
773
+ /***/ (function(module, exports, __webpack_require__) {
774
+
775
+ "use strict";
776
+
777
+
778
+ function checkDCE() {
779
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
780
+ if (
781
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
782
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
783
+ ) {
784
+ return;
785
+ }
786
+ if (false) {}
787
+ try {
788
+ // Verify that the code above has been dead code eliminated (DCE'd).
789
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
790
+ } catch (err) {
791
+ // DevTools shouldn't crash React, no matter what.
792
+ // We should still report in case we break this code.
793
+ console.error(err);
794
+ }
795
+ }
796
+
797
+ if (true) {
798
+ // DCE check should happen before ReactDOM bundle executes so that
799
+ // DevTools can report bad minification during injection.
800
+ checkDCE();
801
+ module.exports = __webpack_require__(59);
802
+ } else {}
803
+
804
+
805
+ /***/ }),
806
+ /* 8 */,
807
+ /* 9 */
808
+ /***/ (function(module, exports, __webpack_require__) {
809
+
810
+ var objectWithoutPropertiesLoose = __webpack_require__(67);
370
811
 
371
812
  function _objectWithoutProperties(source, excluded) {
372
813
  if (source == null) return {};
@@ -390,9 +831,9 @@ function _objectWithoutProperties(source, excluded) {
390
831
  module.exports = _objectWithoutProperties;
391
832
 
392
833
  /***/ }),
393
- /* 8 */,
394
- /* 9 */,
395
- /* 10 */
834
+ /* 10 */,
835
+ /* 11 */,
836
+ /* 12 */
396
837
  /***/ (function(module, exports) {
397
838
 
398
839
  /*
@@ -474,7 +915,7 @@ function toComment(sourceMap) {
474
915
 
475
916
 
476
917
  /***/ }),
477
- /* 11 */
918
+ /* 13 */
478
919
  /***/ (function(module, exports, __webpack_require__) {
479
920
 
480
921
  /*
@@ -543,7 +984,7 @@ var singleton = null;
543
984
  var singletonCounter = 0;
544
985
  var stylesInsertedAtTop = [];
545
986
 
546
- var fixUrls = __webpack_require__(70);
987
+ var fixUrls = __webpack_require__(72);
547
988
 
548
989
  module.exports = function(list, options) {
549
990
  if (typeof DEBUG !== "undefined" && DEBUG) {
@@ -878,7 +1319,7 @@ function updateLink (link, options, obj) {
878
1319
 
879
1320
 
880
1321
  /***/ }),
881
- /* 12 */
1322
+ /* 14 */
882
1323
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
883
1324
 
884
1325
  "use strict";
@@ -889,7 +1330,7 @@ __webpack_require__.r(__webpack_exports__);
889
1330
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; });
890
1331
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
891
1332
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; });
892
- /* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28);
1333
+ /* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
893
1334
 
894
1335
 
895
1336
  /**
@@ -1542,7 +1983,7 @@ if (false) {}
1542
1983
 
1543
1984
 
1544
1985
  /***/ }),
1545
- /* 13 */
1986
+ /* 15 */
1546
1987
  /***/ (function(module, exports, __webpack_require__) {
1547
1988
 
1548
1989
  "use strict";
@@ -1610,9 +2051,9 @@ exports.default = {
1610
2051
  };
1611
2052
 
1612
2053
  /***/ }),
1613
- /* 14 */,
1614
- /* 15 */,
1615
- /* 16 */
2054
+ /* 16 */,
2055
+ /* 17 */,
2056
+ /* 18 */
1616
2057
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1617
2058
 
1618
2059
  "use strict";
@@ -2628,7 +3069,7 @@ function validateIntType(bits) {
2628
3069
 
2629
3070
 
2630
3071
  /***/ }),
2631
- /* 17 */
3072
+ /* 19 */
2632
3073
  /***/ (function(module, exports) {
2633
3074
 
2634
3075
  var g;
@@ -2654,8 +3095,8 @@ module.exports = g;
2654
3095
 
2655
3096
 
2656
3097
  /***/ }),
2657
- /* 18 */,
2658
- /* 19 */
3098
+ /* 20 */,
3099
+ /* 21 */
2659
3100
  /***/ (function(module, exports, __webpack_require__) {
2660
3101
 
2661
3102
  "use strict";
@@ -2707,10 +3148,10 @@ module.exports = invariant;
2707
3148
 
2708
3149
 
2709
3150
  /***/ }),
2710
- /* 20 */,
2711
- /* 21 */,
2712
3151
  /* 22 */,
2713
- /* 23 */
3152
+ /* 23 */,
3153
+ /* 24 */,
3154
+ /* 25 */
2714
3155
  /***/ (function(module, exports, __webpack_require__) {
2715
3156
 
2716
3157
  "use strict";
@@ -2807,11 +3248,11 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
2807
3248
 
2808
3249
 
2809
3250
  /***/ }),
2810
- /* 24 */,
2811
- /* 25 */
3251
+ /* 26 */,
3252
+ /* 27 */
2812
3253
  /***/ (function(module, exports, __webpack_require__) {
2813
3254
 
2814
- var root = __webpack_require__(79);
3255
+ var root = __webpack_require__(81);
2815
3256
 
2816
3257
  /** Built-in value references. */
2817
3258
  var Symbol = root.Symbol;
@@ -2820,25 +3261,25 @@ module.exports = Symbol;
2820
3261
 
2821
3262
 
2822
3263
  /***/ }),
2823
- /* 26 */
3264
+ /* 28 */
2824
3265
  /***/ (function(module, exports, __webpack_require__) {
2825
3266
 
2826
3267
  "use strict";
2827
3268
 
2828
3269
 
2829
3270
  if (true) {
2830
- module.exports = __webpack_require__(63);
3271
+ module.exports = __webpack_require__(65);
2831
3272
  } else {}
2832
3273
 
2833
3274
 
2834
3275
  /***/ }),
2835
- /* 27 */
3276
+ /* 29 */
2836
3277
  /***/ (function(module, exports, __webpack_require__) {
2837
3278
 
2838
3279
  "use strict";
2839
3280
 
2840
3281
 
2841
- var reactIs = __webpack_require__(26);
3282
+ var reactIs = __webpack_require__(28);
2842
3283
 
2843
3284
  /**
2844
3285
  * Copyright 2015, Yahoo! Inc.
@@ -2942,11 +3383,11 @@ module.exports = hoistNonReactStatics;
2942
3383
 
2943
3384
 
2944
3385
  /***/ }),
2945
- /* 28 */
3386
+ /* 30 */
2946
3387
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2947
3388
 
2948
3389
  "use strict";
2949
- /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36);
3390
+ /* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
2950
3391
  /* global window */
2951
3392
 
2952
3393
 
@@ -2965,15 +3406,15 @@ if (typeof self !== 'undefined') {
2965
3406
  var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(root);
2966
3407
  /* harmony default export */ __webpack_exports__["a"] = (result);
2967
3408
 
2968
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17), __webpack_require__(64)(module)))
3409
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19), __webpack_require__(66)(module)))
2969
3410
 
2970
3411
  /***/ }),
2971
- /* 29 */
3412
+ /* 31 */
2972
3413
  /***/ (function(module, exports, __webpack_require__) {
2973
3414
 
2974
- var parser = __webpack_require__(66);
3415
+ var parser = __webpack_require__(68);
2975
3416
 
2976
- var creator = __webpack_require__(67);
3417
+ var creator = __webpack_require__(69);
2977
3418
 
2978
3419
  module.exports = {
2979
3420
  parser: parser,
@@ -2981,12 +3422,12 @@ module.exports = {
2981
3422
  };
2982
3423
 
2983
3424
  /***/ }),
2984
- /* 30 */,
2985
- /* 31 */,
2986
3425
  /* 32 */,
2987
3426
  /* 33 */,
2988
3427
  /* 34 */,
2989
- /* 35 */
3428
+ /* 35 */,
3429
+ /* 36 */,
3430
+ /* 37 */
2990
3431
  /***/ (function(module, exports) {
2991
3432
 
2992
3433
  var PRESET_VALUES = ["hz60", "hz170", "hz310", "hz600", "hz1000", "hz3000", "hz6000", "hz12000", "hz14000", "hz16000", "preamp"];
@@ -2997,7 +3438,7 @@ module.exports = {
2997
3438
  };
2998
3439
 
2999
3440
  /***/ }),
3000
- /* 36 */
3441
+ /* 38 */
3001
3442
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3002
3443
 
3003
3444
  "use strict";
@@ -3022,13 +3463,13 @@ function symbolObservablePonyfill(root) {
3022
3463
 
3023
3464
 
3024
3465
  /***/ }),
3025
- /* 37 */
3466
+ /* 39 */
3026
3467
  /***/ (function(module, exports, __webpack_require__) {
3027
3468
 
3028
3469
  "use strict";
3029
3470
 
3030
3471
 
3031
- var compose = __webpack_require__(12).compose;
3472
+ var compose = __webpack_require__(14).compose;
3032
3473
 
3033
3474
  exports.__esModule = true;
3034
3475
  exports.composeWithDevTools = (
@@ -3049,13 +3490,13 @@ exports.devToolsEnhancer = (
3049
3490
 
3050
3491
 
3051
3492
  /***/ }),
3052
- /* 38 */
3493
+ /* 40 */
3053
3494
  /***/ (function(module) {
3054
3495
 
3055
3496
  module.exports = JSON.parse("{\"images\":{\"EQ_PREAMP_LINE\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHEAAAABCAYAAADpXEERAAAAE0lEQVQoU2Pcdfruf4ZRMKRDAAD1lwNjTqcaUQAAAABJRU5ErkJggg==\",\"EQ_GRAPH_LINE_COLORS\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAATCAYAAABRC2cZAAAAR0lEQVQYV2O4rCT9n+F9kOJ/hvfViv8ZHkzSQCE2afxneH/HEJm49Nr0PwOYWPLIAkp0PjL4z1B41uQ/Q9QGnf8MWrPEIAQANWYwvnlToNIAAAAASUVORK5CYII=\"},\"colors\":[\"rgb(0,0,0)\",\"rgb(24,33,41)\",\"rgb(239,49,16)\",\"rgb(206,41,16)\",\"rgb(214,90,0)\",\"rgb(214,102,0)\",\"rgb(214,115,0)\",\"rgb(198,123,8)\",\"rgb(222,165,24)\",\"rgb(214,181,33)\",\"rgb(189,222,41)\",\"rgb(148,222,33)\",\"rgb(41,206,16)\",\"rgb(50,190,16)\",\"rgb(57,181,16)\",\"rgb(49,156,8)\",\"rgb(41,148,0)\",\"rgb(24,132,8)\",\"rgb(255,255,255)\",\"rgb(214,214,222)\",\"rgb(181,189,189)\",\"rgb(160,170,175)\",\"rgb(148,156,165)\",\"rgb(150,150,150)\"],\"playlistStyle\":{\"normal\":\"#00FF00\",\"current\":\"#FFFFFF\",\"normalbg\":\"#000000\",\"selectedbg\":\"#0000FF\",\"font\":\"Arial\"}}");
3056
3497
 
3057
3498
  /***/ }),
3058
- /* 39 */
3499
+ /* 41 */
3059
3500
  /***/ (function(module, exports, __webpack_require__) {
3060
3501
 
3061
3502
  "use strict";
@@ -3150,11 +3591,11 @@ TinyQueue.prototype = {
3150
3591
 
3151
3592
 
3152
3593
  /***/ }),
3153
- /* 40 */
3594
+ /* 42 */
3154
3595
  /***/ (function(module, exports, __webpack_require__) {
3155
3596
 
3156
- var deburrLetter = __webpack_require__(75),
3157
- toString = __webpack_require__(77);
3597
+ var deburrLetter = __webpack_require__(77),
3598
+ toString = __webpack_require__(79);
3158
3599
 
3159
3600
  /** Used to match Latin Unicode letters (excluding mathematical operators). */
3160
3601
  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
@@ -3201,13 +3642,13 @@ module.exports = deburr;
3201
3642
 
3202
3643
 
3203
3644
  /***/ }),
3204
- /* 41 */
3645
+ /* 43 */
3205
3646
  /***/ (function(module) {
3206
3647
 
3207
3648
  module.exports = JSON.parse("{\"type\":\"Winamp EQ library file v1.1\",\"presets\":[{\"name\":\"Classical\",\"hz60\":33,\"hz170\":33,\"hz310\":33,\"hz600\":33,\"hz1000\":33,\"hz3000\":33,\"hz6000\":20,\"hz12000\":20,\"hz14000\":20,\"hz16000\":16,\"preamp\":33},{\"name\":\"Club\",\"hz60\":33,\"hz170\":33,\"hz310\":38,\"hz600\":42,\"hz1000\":42,\"hz3000\":42,\"hz6000\":38,\"hz12000\":33,\"hz14000\":33,\"hz16000\":33,\"preamp\":33},{\"name\":\"Dance\",\"hz60\":48,\"hz170\":44,\"hz310\":36,\"hz600\":32,\"hz1000\":32,\"hz3000\":22,\"hz6000\":20,\"hz12000\":20,\"hz14000\":32,\"hz16000\":32,\"preamp\":33},{\"name\":\"Laptop speakers/headphones\",\"hz60\":40,\"hz170\":50,\"hz310\":41,\"hz600\":26,\"hz1000\":28,\"hz3000\":35,\"hz6000\":40,\"hz12000\":48,\"hz14000\":53,\"hz16000\":56,\"preamp\":33},{\"name\":\"Large hall\",\"hz60\":49,\"hz170\":49,\"hz310\":42,\"hz600\":42,\"hz1000\":33,\"hz3000\":24,\"hz6000\":24,\"hz12000\":24,\"hz14000\":33,\"hz16000\":33,\"preamp\":33},{\"name\":\"Party\",\"hz60\":44,\"hz170\":44,\"hz310\":33,\"hz600\":33,\"hz1000\":33,\"hz3000\":33,\"hz6000\":33,\"hz12000\":33,\"hz14000\":44,\"hz16000\":44,\"preamp\":33},{\"name\":\"Pop\",\"hz60\":29,\"hz170\":40,\"hz310\":44,\"hz600\":45,\"hz1000\":41,\"hz3000\":30,\"hz6000\":28,\"hz12000\":28,\"hz14000\":29,\"hz16000\":29,\"preamp\":33},{\"name\":\"Reggae\",\"hz60\":33,\"hz170\":33,\"hz310\":31,\"hz600\":22,\"hz1000\":33,\"hz3000\":43,\"hz6000\":43,\"hz12000\":33,\"hz14000\":33,\"hz16000\":33,\"preamp\":33},{\"name\":\"Rock\",\"hz60\":45,\"hz170\":40,\"hz310\":23,\"hz600\":19,\"hz1000\":26,\"hz3000\":39,\"hz6000\":47,\"hz12000\":50,\"hz14000\":50,\"hz16000\":50,\"preamp\":33},{\"name\":\"Soft\",\"hz60\":40,\"hz170\":35,\"hz310\":30,\"hz600\":28,\"hz1000\":30,\"hz3000\":39,\"hz6000\":46,\"hz12000\":48,\"hz14000\":50,\"hz16000\":52,\"preamp\":33},{\"name\":\"Ska\",\"hz60\":28,\"hz170\":24,\"hz310\":25,\"hz600\":31,\"hz1000\":39,\"hz3000\":42,\"hz6000\":47,\"hz12000\":48,\"hz14000\":50,\"hz16000\":48,\"preamp\":33},{\"name\":\"Full Bass\",\"hz60\":48,\"hz170\":48,\"hz310\":48,\"hz600\":42,\"hz1000\":35,\"hz3000\":25,\"hz6000\":18,\"hz12000\":15,\"hz14000\":14,\"hz16000\":14,\"preamp\":33},{\"name\":\"Soft Rock\",\"hz60\":39,\"hz170\":39,\"hz310\":36,\"hz600\":31,\"hz1000\":25,\"hz3000\":23,\"hz6000\":26,\"hz12000\":31,\"hz14000\":37,\"hz16000\":47,\"preamp\":33},{\"name\":\"Full Treble\",\"hz60\":16,\"hz170\":16,\"hz310\":16,\"hz600\":25,\"hz1000\":37,\"hz3000\":50,\"hz6000\":58,\"hz12000\":58,\"hz14000\":58,\"hz16000\":60,\"preamp\":33},{\"name\":\"Full Bass & Treble\",\"hz60\":44,\"hz170\":42,\"hz310\":33,\"hz600\":20,\"hz1000\":24,\"hz3000\":35,\"hz6000\":46,\"hz12000\":50,\"hz14000\":52,\"hz16000\":52,\"preamp\":33},{\"name\":\"Live\",\"hz60\":24,\"hz170\":33,\"hz310\":39,\"hz600\":41,\"hz1000\":42,\"hz3000\":42,\"hz6000\":39,\"hz12000\":37,\"hz14000\":37,\"hz16000\":36,\"preamp\":33},{\"name\":\"Techno\",\"hz60\":45,\"hz170\":42,\"hz310\":33,\"hz600\":23,\"hz1000\":24,\"hz3000\":33,\"hz6000\":45,\"hz12000\":48,\"hz14000\":48,\"hz16000\":47,\"preamp\":33}]}");
3208
3649
 
3209
3650
  /***/ }),
3210
- /* 42 */
3651
+ /* 44 */
3211
3652
  /***/ (function(module, exports, __webpack_require__) {
3212
3653
 
3213
3654
  "use strict";
@@ -3234,7 +3675,7 @@ var __spread = (this && this.__spread) || function () {
3234
3675
  };
3235
3676
  Object.defineProperty(exports, "__esModule", { value: true });
3236
3677
  exports.convertAniBinaryToCSS = void 0;
3237
- var parser_1 = __webpack_require__(96);
3678
+ var parser_1 = __webpack_require__(98);
3238
3679
  var JIFFIES_PER_MS = 1000 / 60;
3239
3680
  // Generate CSS for an animated cursor.
3240
3681
  //
@@ -3299,12 +3740,12 @@ function sum(values) {
3299
3740
  //# sourceMappingURL=index.js.map
3300
3741
 
3301
3742
  /***/ }),
3302
- /* 43 */,
3303
- /* 44 */,
3304
3743
  /* 45 */,
3305
3744
  /* 46 */,
3306
3745
  /* 47 */,
3307
- /* 48 */
3746
+ /* 48 */,
3747
+ /* 49 */,
3748
+ /* 50 */
3308
3749
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3309
3750
 
3310
3751
  "use strict";
@@ -3312,7 +3753,7 @@ function sum(values) {
3312
3753
  __webpack_require__.r(__webpack_exports__);
3313
3754
 
3314
3755
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/@babel/runtime/helpers/defineProperty.js
3315
- var defineProperty = __webpack_require__(2);
3756
+ var defineProperty = __webpack_require__(4);
3316
3757
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
3317
3758
 
3318
3759
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/react/jsx-runtime.js
@@ -3323,11 +3764,11 @@ var react = __webpack_require__(1);
3323
3764
  var react_default = /*#__PURE__*/__webpack_require__.n(react);
3324
3765
 
3325
3766
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/react-dom/index.js
3326
- var react_dom = __webpack_require__(5);
3767
+ var react_dom = __webpack_require__(7);
3327
3768
  var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom);
3328
3769
 
3329
3770
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/prop-types/index.js
3330
- var prop_types = __webpack_require__(60);
3771
+ var prop_types = __webpack_require__(62);
3331
3772
 
3332
3773
  // CONCATENATED MODULE: /home/exezt-/Projects/webamp/node_modules/react-redux/es/components/Context.js
3333
3774
 
@@ -3551,11 +3992,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
3551
3992
  return target;
3552
3993
  }
3553
3994
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
3554
- var hoist_non_react_statics_cjs = __webpack_require__(27);
3995
+ var hoist_non_react_statics_cjs = __webpack_require__(29);
3555
3996
  var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
3556
3997
 
3557
3998
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/react-is/index.js
3558
- var react_is = __webpack_require__(26);
3999
+ var react_is = __webpack_require__(28);
3559
4000
 
3560
4001
  // CONCATENATED MODULE: /home/exezt-/Projects/webamp/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js
3561
4002
  // React currently throws a warning when using useLayoutEffect on the server.
@@ -3949,7 +4390,7 @@ function shallowEqual(objA, objB) {
3949
4390
  return true;
3950
4391
  }
3951
4392
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/redux/es/redux.js
3952
- var redux = __webpack_require__(12);
4393
+ var redux = __webpack_require__(14);
3953
4394
 
3954
4395
  // CONCATENATED MODULE: /home/exezt-/Projects/webamp/node_modules/react-redux/es/utils/isPlainObject.js
3955
4396
  /**
@@ -4622,7 +5063,7 @@ thunk.withExtraArgument = createThunkMiddleware;
4622
5063
 
4623
5064
  /* harmony default export */ var es = (thunk);
4624
5065
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/redux-devtools-extension/index.js
4625
- var redux_devtools_extension = __webpack_require__(37);
5066
+ var redux_devtools_extension = __webpack_require__(39);
4626
5067
 
4627
5068
  // CONCATENATED MODULE: ./js/actionTypes.ts
4628
5069
  const ADD_TRACK_FROM_URL = "ADD_TRACK_FROM_URL";
@@ -4638,459 +5079,83 @@ const SET_BALANCE = "SET_BALANCE";
4638
5079
  const SET_BAND_VALUE = "SET_BAND_VALUE";
4639
5080
  const SET_FOCUS = "SET_FOCUS";
4640
5081
  const SET_BAND_FOCUS = "SET_BAND_FOCUS";
4641
- const SET_FOCUSED_WINDOW = "SET_FOCUSED_WINDOW";
4642
- const SET_MEDIA = "SET_MEDIA";
4643
- const SET_SCRUB_POSITION = "SET_SCRUB_POSITION";
4644
- const SET_SKIN_DATA = "SET_SKIN_DATA";
4645
- const SET_VOLUME = "SET_VOLUME";
4646
- const START_WORKING = "START_WORKING";
4647
- const STEP_MARQUEE = "STEP_MARQUEE";
4648
- const STOP = "STOP";
4649
- const STOP_WORKING = "STOP_WORKING";
4650
- const TOGGLE_DOUBLESIZE_MODE = "TOGGLE_DOUBLESIZE_MODE";
4651
- const SET_EQ_AUTO = "SET_EQ_AUTO";
4652
- const SET_EQ_ON = "SET_EQ_ON";
4653
- const SET_EQ_OFF = "SET_EQ_OFF";
4654
- const TOGGLE_LLAMA_MODE = "TOGGLE_LLAMA_MODE";
4655
- const TOGGLE_REPEAT = "TOGGLE_REPEAT";
4656
- const TOGGLE_SHUFFLE = "TOGGLE_SHUFFLE";
4657
- const TOGGLE_TIME_MODE = "TOGGLE_TIME_MODE";
4658
- const TOGGLE_VISUALIZER_STYLE = "TOGGLE_VISUALIZER_STYLE";
4659
- const UNSET_FOCUS = "UNSET_FOCUS";
4660
- const UPDATE_TIME_ELAPSED = "UPDATE_TIME_ELAPSED";
4661
- const SET_USER_MESSAGE = "SET_USER_MESSAGE";
4662
- const UNSET_USER_MESSAGE = "UNSET_USER_MESSAGE";
4663
- const SET_PLAYLIST_SCROLL_POSITION = "SET_PLAYLIST_SCROLL_POSITION";
4664
- const CLICKED_TRACK = "CLICKED_TRACK";
4665
- const CTRL_CLICKED_TRACK = "CTRL_CLICKED_TRACK";
4666
- const SHIFT_CLICKED_TRACK = "SHIFT_CLICKED_TRACK";
4667
- const SELECT_ALL = "SELECT_ALL";
4668
- const SELECT_ZERO = "SELECT_ZERO";
4669
- const INVERT_SELECTION = "INVERT_SELECTION";
4670
- const REMOVE_ALL_TRACKS = "REMOVE_ALL_TRACKS";
4671
- const CROP_TRACKS = "CROP_TRACKS";
4672
- const FILE_INFO = "FILE_INFO";
4673
- const REMOVE_TRACKS = "REMOVE_TRACKS";
4674
- const SET_AVAILABLE_SKINS = "SET_AVAILABLE_SKINS";
4675
- const REVERSE_LIST = "REVERSE_LIST";
4676
- const RANDOMIZE_LIST = "RANDOMIZE_LIST";
4677
- const SET_TRACK_ORDER = "SET_TRACK_ORDER";
4678
- const PLAY_TRACK = "PLAY_TRACK";
4679
- const BUFFER_TRACK = "BUFFER_TRACK";
4680
- const DRAG_SELECTED = "DRAG_SELECTED";
4681
- const SET_MEDIA_TAGS = "SET_MEDIA_TAGS";
4682
- const SET_MEDIA_DURATION = "SET_MEDIA_DURATION";
4683
- const TOGGLE_WINDOW = "TOGGLE_WINDOW";
4684
- const CLOSE_WINDOW = "CLOSE_WINDOW";
4685
- const MEDIA_TAG_REQUEST_INITIALIZED = "MEDIA_TAG_REQUEST_INITIALIZED";
4686
- const MEDIA_TAG_REQUEST_FAILED = "MEDIA_TAG_REQUEST_FAILED";
4687
- const NETWORK_CONNECTED = "NETWORK_CONNECTED";
4688
- const NETWORK_DISCONNECTED = "NETWORK_DISCONNECTED";
4689
- const UPDATE_WINDOW_POSITIONS = "UPDATE_WINDOW_POSITIONS";
4690
- const WINDOW_SIZE_CHANGED = "WINDOW_SIZE_CHANGED";
4691
- const TOGGLE_WINDOW_SHADE_MODE = "TOGGLE_WINDOW_SHADE_MODE";
4692
- const LOADED = "LOADED";
4693
- const SET_Z_INDEX = "SET_Z_INDEX";
4694
- const DISABLE_MARQUEE = "DISABLE_MARQUEE";
4695
- const SET_DUMMY_VIZ_DATA = "SET_DUMMY_VIZ_DATA";
4696
- const LOADING = "LOADING";
4697
- const CLOSE_REQUESTED = "CLOSE_REQUESTED";
4698
- const LOAD_SERIALIZED_STATE = "LOAD_SERIALIZED_STATE";
4699
- const RESET_WINDOW_SIZES = "RESET_WINDOW_SIZES";
4700
- const BROWSER_WINDOW_SIZE_CHANGED = "BROWSER_WINDOW_SIZE_CHANGED";
4701
- const LOAD_DEFAULT_SKIN = "LOAD_DEFAULT_SKIN";
4702
- const ENABLE_MILKDROP = "ENABLE_MILKDROP";
4703
- const SET_MILKDROP_DESKTOP = "SET_MILKDROP_DESKTOP";
4704
- const SET_VISUALIZER_STYLE = "SET_VISUALIZER_STYLE";
4705
- const GOT_BUTTERCHURN_PRESETS = "GOT_BUTTERCHURN_PRESETS";
4706
- const GOT_BUTTERCHURN = "GOT_BUTTERCHURN";
4707
- const RESOLVE_PRESET_AT_INDEX = "RESOLVE_PRESET_AT_INDEX";
4708
- const SELECT_PRESET_AT_INDEX = "SELECT_PRESET_AT_INDEX";
4709
- const TOGGLE_PRESET_OVERLAY = "TOGGLE_PRESET_OVERLAY";
4710
- const PRESET_REQUESTED = "PRESET_REQUESTED";
4711
- const TOGGLE_RANDOMIZE_PRESETS = "TOGGLE_RANDOMIZE_PRESETS";
4712
- const TOGGLE_PRESET_CYCLING = "TOGGLE_PRESET_CYCLING";
4713
- const SCHEDULE_MILKDROP_MESSAGE = "SCHEDULE_MILKDROP_MESSAGE";
4714
- const SET_MILKDROP_FULLSCREEN = "SET_MILKDROP_FULLSCREEN";
4715
- // EXTERNAL MODULE: ./js/baseSkin.json
4716
- var baseSkin = __webpack_require__(38);
4717
-
4718
- // CONCATENATED MODULE: ./js/constants.ts
4719
-
4720
- const BANDS = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
4721
- const WINDOWS = {
4722
- MAIN: "main",
4723
- PLAYLIST: "playlist",
4724
- EQUALIZER: "equalizer",
4725
- MILKDROP: "milkdrop"
4726
- };
4727
- const LOAD_STYLE = {
4728
- BUFFER: "BUFFER",
4729
- PLAY: "PLAY",
4730
- NONE: "NONE"
4731
- }; // TODO: Make this an enum?
4732
-
4733
- const MEDIA_TAG_REQUEST_STATUS = {
4734
- INITIALIZED: "INITIALIZED",
4735
- FAILED: "FAILED",
4736
- COMPLETE: "COMPLETE",
4737
- NOT_REQUESTED: "NOT_REQUESTED"
4738
- };
4739
- const UTF8_ELLIPSIS = "\u2026";
4740
- const CHARACTER_WIDTH = 5;
4741
- const WINDOW_RESIZE_SEGMENT_WIDTH = 25;
4742
- const WINDOW_RESIZE_SEGMENT_HEIGHT = 29;
4743
- const WINDOW_HEIGHT = 116;
4744
- const WINDOW_WIDTH = 275;
4745
- const TRACK_HEIGHT = 13;
4746
- const LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
4747
- const DEFAULT_SKIN = baseSkin;
4748
- const VISUALIZERS = {
4749
- OSCILLOSCOPE: "OSCILLOSCOPE",
4750
- BAR: "BAR",
4751
- NONE: "NONE",
4752
- MILKDROP: "MILKDROP"
4753
- };
4754
- const VISUALIZER_ORDER = [VISUALIZERS.BAR, VISUALIZERS.OSCILLOSCOPE, // TODO: Verify the order
4755
- VISUALIZERS.NONE];
4756
- const TIME_MODE = {
4757
- ELAPSED: "ELAPSED",
4758
- REMAINING: "REMAINING"
4759
- }; // TODO: Convert to enum once we are fully Typescript
4760
-
4761
- const MEDIA_STATUS = {
4762
- PLAYING: "PLAYING",
4763
- STOPPED: "STOPPED",
4764
- PAUSED: "PAUSED"
4765
- };
4766
- // CONCATENATED MODULE: ./js/utils.ts
4767
-
4768
- function imgFromUrl(url) {
4769
- return new Promise((resolve, reject) => {
4770
- const img = new Image();
4771
-
4772
- img.onload = () => {
4773
- resolve(img);
4774
- };
4775
-
4776
- img.onerror = reject;
4777
- img.src = url;
4778
- });
4779
- }
4780
- const getTimeObj = time => {
4781
- if (time == null) {
4782
- // If we clean up `<MiniTime />` we don't need to do this any more.
4783
- return {
4784
- minutesFirstDigit: " ",
4785
- minutesSecondDigit: " ",
4786
- secondsFirstDigit: " ",
4787
- secondsSecondDigit: " "
4788
- };
4789
- }
4790
-
4791
- const minutes = Math.floor(time / 60);
4792
- const seconds = time % 60;
4793
- const digits = time == null ? [" ", " ", " ", " "] : [String(Math.floor(minutes / 10)), String(Math.floor(minutes % 10)), String(Math.floor(seconds / 10)), String(Math.floor(seconds % 10))];
4794
- const [minutesFirstDigit, minutesSecondDigit, secondsFirstDigit, secondsSecondDigit] = digits;
4795
- return {
4796
- minutesFirstDigit,
4797
- minutesSecondDigit,
4798
- secondsFirstDigit,
4799
- secondsSecondDigit
4800
- };
4801
- };
4802
- const getTimeStr = (time, truncate = true) => {
4803
- if (time == null) {
4804
- return "";
4805
- }
4806
-
4807
- const {
4808
- minutesFirstDigit,
4809
- minutesSecondDigit,
4810
- secondsFirstDigit,
4811
- secondsSecondDigit
4812
- } = getTimeObj(time);
4813
- return [truncate && minutesFirstDigit === "0" ? "" : minutesFirstDigit, minutesSecondDigit, ":", secondsFirstDigit, secondsSecondDigit].join("");
4814
- };
4815
- const parseViscolors = text => {
4816
- const entries = text.split("\n");
4817
- const regex = /^\s*(\d+)\s*,?\s*(\d+)\s*,?\s*(\d+)/;
4818
- const colors = [...DEFAULT_SKIN.colors];
4819
- entries.map(line => regex.exec(line)).filter(Boolean).map(matches => matches.slice(1, 4).join(",")).map((rgb, i) => {
4820
- colors[i] = `rgb(${rgb})`;
4821
- });
4822
- return colors;
4823
- };
4824
- const SECTION_REGEX = /^\s*\[(.+?)\]\s*$/;
4825
- const PROPERTY_REGEX = /^\s*([^;][^=]*)\s*=\s*(.*)\s*$/;
4826
- const parseIni = text => {
4827
- let section, match;
4828
- return text.split(/[\r\n]+/g).reduce((data, line) => {
4829
- if ((match = line.match(PROPERTY_REGEX)) && section != null) {
4830
- const key = match[1].trim().toLowerCase();
4831
- const value = match[2] // Ignore anything after a second `=`
4832
- // TODO: What if this is inside quotes or escaped?
4833
- .replace(/\=.*$/g, "").trim() // Strip quotes
4834
- // TODO: What about escaped quotes?
4835
- // TODO: What about unbalanced quotes?
4836
- .replace(/(^")|("$)|(^')|('$)/g, "");
4837
- data[section][key] = value;
4838
- } else if (match = line.match(SECTION_REGEX)) {
4839
- section = match[1].trim().toLowerCase();
4840
- data[section] = {};
4841
- }
4842
-
4843
- return data;
4844
- }, {});
4845
- };
4846
- const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
4847
- const sum = values => values.reduce((total, value) => total + value, 0);
4848
- function base64FromDataArray(dataArray) {
4849
- return window.btoa(Array.from(dataArray).map(byte => String.fromCharCode(byte)).join(""));
4850
- }
4851
- const base64FromArrayBuffer = arrayBuffer => {
4852
- return base64FromDataArray(new Uint8Array(arrayBuffer));
4853
- }; // https://stackoverflow.com/a/15832662/1263117
4854
-
4855
- function downloadURI(uri, name) {
4856
- const link = document.createElement("a");
4857
- link.download = name;
4858
- link.href = uri;
4859
- window.document.body.appendChild(link);
4860
- link.click();
4861
- window.document.body.removeChild(link);
4862
- }
4863
- const toPercent = (min, max, value) => (value - min) / (max - min);
4864
- const percentToRange = (percent, min, max) => min + Math.round(percent * (max - min));
4865
- const percentToIndex = (percent, length) => percentToRange(percent, 0, length - 1);
4866
-
4867
- const rebound = (oldMin, oldMax, newMin, newMax) => oldValue => percentToRange(toPercent(oldMin, oldMax, oldValue), newMin, newMax); // Convert an .eqf value to a 0-100
4868
-
4869
-
4870
- const normalizeEqBand = rebound(1, 64, 0, 100); // Convert a 0-100 to an .eqf value
4871
-
4872
- const denormalizeEqBand = rebound(0, 100, 1, 64); // Merge a `source` object to a `target` recursively
4873
- // TODO: The typing here is a bit of a disaster.
4874
-
4875
- function merge(target, source) {
4876
- const s = source;
4877
- const t = target; // Iterate through `source` properties and if an `Object` set property to merge of `target` and `source` properties
4878
-
4879
- for (const key of Object.keys(s)) {
4880
- if (s[key] instanceof Object) Object.assign(s[key], merge(t[key], s[key]));
4881
- } // Join `target` and modified `source`
4882
-
4883
-
4884
- Object.assign(target || {}, source);
4885
- return target;
4886
- } // Maps a value in a range (defined my min/max) to a value in an array (options).
4887
-
4888
- function segment(min, max, value, newValues) {
4889
- const ratio = toPercent(min, max, value);
4890
- /*
4891
- | 0 | 1 | 2 |
4892
- 0 1 2 3
4893
- */
4894
-
4895
- return newValues[percentToIndex(ratio, newValues.length)];
4896
- } // https://bost.ocks.org/mike/shuffle/
4897
- // Shuffle an array in O(n)
4898
-
4899
- function utils_shuffle(array) {
4900
- const sorted = [...array];
4901
- let m = sorted.length; // While there remain elements to shuffle…
4902
-
4903
- while (m) {
4904
- // Pick a remaining element…
4905
- const i = Math.floor(Math.random() * m--); // And swap it with the current element.
4906
-
4907
- const val = sorted[m];
4908
- sorted[m] = sorted[i];
4909
- sorted[i] = val;
4910
- }
4911
-
4912
- return sorted;
4913
- }
4914
- function sort(array, iteratee) {
4915
- return [...array].sort((a, b) => {
4916
- const aKey = iteratee(a);
4917
- const bKey = iteratee(b);
4918
-
4919
- if (aKey < bKey) {
4920
- return -1;
4921
- } else if (aKey > bKey) {
4922
- return 1;
4923
- }
4924
-
4925
- return 0;
4926
- });
4927
- }
4928
- function moveSelected(arr, isSelected, offset) {
4929
- const newArr = new Array(arr.length);
4930
- let next = 0;
4931
-
4932
- for (let i = 0; i < newArr.length; i++) {
4933
- const from = i - offset; // Is a value supposed to move here?
4934
-
4935
- if (from >= 0 && from < arr.length && isSelected(from)) {
4936
- newArr[i] = arr[from];
4937
- } else {
4938
- while (next < arr.length && isSelected(next)) {
4939
- next++;
4940
- }
4941
-
4942
- newArr[i] = arr[next];
4943
- next++;
4944
- }
4945
- }
4946
-
4947
- return newArr;
4948
- }
4949
- function spliceIn(original, start, newValues) {
4950
- const newArr = [...original];
4951
- newArr.splice(start, 0, ...newValues);
4952
- return newArr;
4953
- }
4954
- function replaceAtIndex(arr, index, newValue) {
4955
- return [...arr.slice(0, index), newValue, ...arr.slice(index + 1)];
4956
- }
4957
- function debounce(func, delay) {
4958
- let timeout;
4959
- let callbackArgs = [];
4960
- return function (context, ...args) {
4961
- callbackArgs = args;
4962
-
4963
- if (timeout != null) {
4964
- clearTimeout(timeout);
4965
- }
4966
-
4967
- timeout = window.setTimeout(() => {
4968
- func.apply(context, callbackArgs);
4969
- }, delay);
4970
- };
4971
- } // Trailing edge only throttle
4972
-
4973
- function throttle(func, delay) {
4974
- let timeout = null;
4975
- let callbackArgs = [];
4976
- return function (context, ...args) {
4977
- callbackArgs = args;
4978
-
4979
- if (!timeout) {
4980
- timeout = window.setTimeout(() => {
4981
- func.apply(context, callbackArgs);
4982
- timeout = null;
4983
- }, delay);
4984
- }
4985
- };
4986
- }
4987
- let counter = 0;
4988
- function uniqueId() {
4989
- return counter++;
4990
- }
4991
- function objectForEach(obj, cb) {
4992
- Object.keys(obj).forEach(key => cb(obj[key], key));
4993
- }
4994
- function objectMap(obj, cb) {
4995
- const modified = {};
4996
- Object.keys(obj).forEach(key => modified[key] = cb(obj[key], key));
4997
- return modified;
4998
- }
4999
- function objectFilter(obj, predicate) {
5000
- // TODO: Could return the original reference if no values change
5001
- return Object.keys(obj).reduce((newObj, key) => {
5002
- if (predicate(obj[key], key)) {
5003
- newObj[key] = obj[key];
5004
- }
5005
-
5006
- return newObj;
5007
- }, {});
5008
- }
5009
- const calculateBoundingBox = windows => {
5010
- if (windows.length === 0) {
5011
- return null;
5012
- }
5013
-
5014
- const windowSizes = windows.map(w => ({
5015
- left: w.x,
5016
- top: w.y,
5017
- bottom: w.y + w.height,
5018
- right: w.x + w.width
5019
- }));
5020
- return windowSizes.reduce((b, w) => ({
5021
- left: Math.min(b.left, w.left),
5022
- top: Math.min(b.top, w.top),
5023
- bottom: Math.max(b.bottom, w.bottom),
5024
- right: Math.max(b.right, w.right)
5025
- }));
5026
- };
5027
- function findLastIndex(arr, cb) {
5028
- for (let i = arr.length - 1; i >= 0; i--) {
5029
- if (cb(arr[i])) {
5030
- return i;
5031
- }
5032
- }
5033
-
5034
- return -1;
5035
- }
5036
- function utils_getWindowSize() {
5037
- // Aparently this is crazy across browsers.
5038
- return {
5039
- width: Math.max(document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth, document.body.clientWidth, document.documentElement.clientWidth),
5040
- height: Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight)
5041
- };
5042
- }
5043
- function getScreenSize() {
5044
- return {
5045
- width: window.screen.width,
5046
- height: window.screen.height
5047
- };
5048
- }
5049
-
5050
- function getPos(e) {
5051
- switch (e.type) {
5052
- case "touchstart":
5053
- case "touchmove":
5054
- {
5055
- var _targetTouches$;
5056
-
5057
- const touch = (_targetTouches$ = e.targetTouches[0]) !== null && _targetTouches$ !== void 0 ? _targetTouches$ : e.touches[0];
5058
-
5059
- if (touch == null) {
5060
- // Investigating https://github.com/captbaritone/webamp/issues/1105
5061
- throw new Error("Unexpected touch event with zero touch targets.");
5062
- }
5063
-
5064
- return touch;
5065
- }
5066
-
5067
- case "mousedown":
5068
- case "mousemove":
5069
- {
5070
- return e;
5071
- }
5072
-
5073
- default:
5074
- throw new Error(`Unexpected event type: ${e.type}`);
5075
- }
5076
- }
5077
-
5078
- function getX(e) {
5079
- return getPos(e).clientX;
5080
- }
5081
- function getY(e) {
5082
- return getPos(e).clientY;
5083
- }
5084
- function weakMapMemoize(func) {
5085
- const cache = new WeakMap();
5086
- return value => {
5087
- if (!cache.has(value)) {
5088
- cache.set(value, func(value));
5089
- }
5082
+ const SET_FOCUSED_WINDOW = "SET_FOCUSED_WINDOW";
5083
+ const SET_MEDIA = "SET_MEDIA";
5084
+ const SET_SCRUB_POSITION = "SET_SCRUB_POSITION";
5085
+ const SET_SKIN_DATA = "SET_SKIN_DATA";
5086
+ const SET_VOLUME = "SET_VOLUME";
5087
+ const START_WORKING = "START_WORKING";
5088
+ const STEP_MARQUEE = "STEP_MARQUEE";
5089
+ const STOP = "STOP";
5090
+ const STOP_WORKING = "STOP_WORKING";
5091
+ const TOGGLE_DOUBLESIZE_MODE = "TOGGLE_DOUBLESIZE_MODE";
5092
+ const SET_EQ_AUTO = "SET_EQ_AUTO";
5093
+ const SET_EQ_ON = "SET_EQ_ON";
5094
+ const SET_EQ_OFF = "SET_EQ_OFF";
5095
+ const TOGGLE_LLAMA_MODE = "TOGGLE_LLAMA_MODE";
5096
+ const TOGGLE_REPEAT = "TOGGLE_REPEAT";
5097
+ const TOGGLE_SHUFFLE = "TOGGLE_SHUFFLE";
5098
+ const TOGGLE_TIME_MODE = "TOGGLE_TIME_MODE";
5099
+ const TOGGLE_VISUALIZER_STYLE = "TOGGLE_VISUALIZER_STYLE";
5100
+ const UNSET_FOCUS = "UNSET_FOCUS";
5101
+ const UPDATE_TIME_ELAPSED = "UPDATE_TIME_ELAPSED";
5102
+ const SET_USER_MESSAGE = "SET_USER_MESSAGE";
5103
+ const UNSET_USER_MESSAGE = "UNSET_USER_MESSAGE";
5104
+ const SET_PLAYLIST_SCROLL_POSITION = "SET_PLAYLIST_SCROLL_POSITION";
5105
+ const CLICKED_TRACK = "CLICKED_TRACK";
5106
+ const CTRL_CLICKED_TRACK = "CTRL_CLICKED_TRACK";
5107
+ const SHIFT_CLICKED_TRACK = "SHIFT_CLICKED_TRACK";
5108
+ const SELECT_ALL = "SELECT_ALL";
5109
+ const SELECT_ZERO = "SELECT_ZERO";
5110
+ const INVERT_SELECTION = "INVERT_SELECTION";
5111
+ const REMOVE_ALL_TRACKS = "REMOVE_ALL_TRACKS";
5112
+ const CROP_TRACKS = "CROP_TRACKS";
5113
+ const FILE_INFO = "FILE_INFO";
5114
+ const REMOVE_TRACKS = "REMOVE_TRACKS";
5115
+ const SET_AVAILABLE_SKINS = "SET_AVAILABLE_SKINS";
5116
+ const REVERSE_LIST = "REVERSE_LIST";
5117
+ const RANDOMIZE_LIST = "RANDOMIZE_LIST";
5118
+ const SET_TRACK_ORDER = "SET_TRACK_ORDER";
5119
+ const PLAY_TRACK = "PLAY_TRACK";
5120
+ const BUFFER_TRACK = "BUFFER_TRACK";
5121
+ const DRAG_SELECTED = "DRAG_SELECTED";
5122
+ const SET_MEDIA_TAGS = "SET_MEDIA_TAGS";
5123
+ const SET_MEDIA_DURATION = "SET_MEDIA_DURATION";
5124
+ const TOGGLE_WINDOW = "TOGGLE_WINDOW";
5125
+ const CLOSE_WINDOW = "CLOSE_WINDOW";
5126
+ const MEDIA_TAG_REQUEST_INITIALIZED = "MEDIA_TAG_REQUEST_INITIALIZED";
5127
+ const MEDIA_TAG_REQUEST_FAILED = "MEDIA_TAG_REQUEST_FAILED";
5128
+ const NETWORK_CONNECTED = "NETWORK_CONNECTED";
5129
+ const NETWORK_DISCONNECTED = "NETWORK_DISCONNECTED";
5130
+ const UPDATE_WINDOW_POSITIONS = "UPDATE_WINDOW_POSITIONS";
5131
+ const WINDOW_SIZE_CHANGED = "WINDOW_SIZE_CHANGED";
5132
+ const TOGGLE_WINDOW_SHADE_MODE = "TOGGLE_WINDOW_SHADE_MODE";
5133
+ const LOADED = "LOADED";
5134
+ const SET_Z_INDEX = "SET_Z_INDEX";
5135
+ const DISABLE_MARQUEE = "DISABLE_MARQUEE";
5136
+ const SET_DUMMY_VIZ_DATA = "SET_DUMMY_VIZ_DATA";
5137
+ const LOADING = "LOADING";
5138
+ const CLOSE_REQUESTED = "CLOSE_REQUESTED";
5139
+ const LOAD_SERIALIZED_STATE = "LOAD_SERIALIZED_STATE";
5140
+ const RESET_WINDOW_SIZES = "RESET_WINDOW_SIZES";
5141
+ const BROWSER_WINDOW_SIZE_CHANGED = "BROWSER_WINDOW_SIZE_CHANGED";
5142
+ const LOAD_DEFAULT_SKIN = "LOAD_DEFAULT_SKIN";
5143
+ const ENABLE_MILKDROP = "ENABLE_MILKDROP";
5144
+ const SET_MILKDROP_DESKTOP = "SET_MILKDROP_DESKTOP";
5145
+ const SET_VISUALIZER_STYLE = "SET_VISUALIZER_STYLE";
5146
+ const GOT_BUTTERCHURN_PRESETS = "GOT_BUTTERCHURN_PRESETS";
5147
+ const GOT_BUTTERCHURN = "GOT_BUTTERCHURN";
5148
+ const RESOLVE_PRESET_AT_INDEX = "RESOLVE_PRESET_AT_INDEX";
5149
+ const SELECT_PRESET_AT_INDEX = "SELECT_PRESET_AT_INDEX";
5150
+ const TOGGLE_PRESET_OVERLAY = "TOGGLE_PRESET_OVERLAY";
5151
+ const PRESET_REQUESTED = "PRESET_REQUESTED";
5152
+ const TOGGLE_RANDOMIZE_PRESETS = "TOGGLE_RANDOMIZE_PRESETS";
5153
+ const TOGGLE_PRESET_CYCLING = "TOGGLE_PRESET_CYCLING";
5154
+ const SCHEDULE_MILKDROP_MESSAGE = "SCHEDULE_MILKDROP_MESSAGE";
5155
+ const SET_MILKDROP_FULLSCREEN = "SET_MILKDROP_FULLSCREEN";
5156
+ // EXTERNAL MODULE: ./js/utils.ts
5157
+ var utils = __webpack_require__(3);
5090
5158
 
5091
- return cache.get(value);
5092
- };
5093
- }
5094
5159
  // CONCATENATED MODULE: ./js/reducers/playlist.ts
5095
5160
 
5096
5161
 
@@ -5197,7 +5262,7 @@ const playlist = (state = defaultPlaylistState, action) => {
5197
5262
 
5198
5263
  case RANDOMIZE_LIST:
5199
5264
  return _objectSpread(_objectSpread({}, state), {}, {
5200
- trackOrder: utils_shuffle(state.trackOrder)
5265
+ trackOrder: Object(utils["A" /* shuffle */])(state.trackOrder)
5201
5266
  });
5202
5267
 
5203
5268
  case SET_TRACK_ORDER:
@@ -5224,7 +5289,7 @@ const playlist = (state = defaultPlaylistState, action) => {
5224
5289
 
5225
5290
  case DRAG_SELECTED:
5226
5291
  return _objectSpread(_objectSpread({}, state), {}, {
5227
- trackOrder: moveSelected(state.trackOrder, i => state.selectedTracks.has(state.trackOrder[i]), action.offset),
5292
+ trackOrder: Object(utils["p" /* moveSelected */])(state.trackOrder, i => state.selectedTracks.has(state.trackOrder[i]), action.offset),
5228
5293
  // TODO: This could probably be made to work, but we clear it just to be safe.
5229
5294
  lastSelectedIndex: null
5230
5295
  });
@@ -5236,9 +5301,12 @@ const playlist = (state = defaultPlaylistState, action) => {
5236
5301
 
5237
5302
  /* harmony default export */ var reducers_playlist = (playlist);
5238
5303
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/@babel/runtime/helpers/objectWithoutProperties.js
5239
- var objectWithoutProperties = __webpack_require__(7);
5304
+ var objectWithoutProperties = __webpack_require__(9);
5240
5305
  var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
5241
5306
 
5307
+ // EXTERNAL MODULE: ./js/constants.ts
5308
+ var constants = __webpack_require__(2);
5309
+
5242
5310
  // CONCATENATED MODULE: ./js/reducers/windows.ts
5243
5311
 
5244
5312
 
@@ -5251,11 +5319,11 @@ function windows_objectSpread(target) { for (var i = 1; i < arguments.length; i+
5251
5319
 
5252
5320
 
5253
5321
  const defaultWindowsState = {
5254
- focused: WINDOWS.MAIN,
5322
+ focused: constants["m" /* WINDOWS */].MAIN,
5255
5323
  positionsAreRelative: true,
5256
5324
  genWindows: {
5257
5325
  // TODO: Remove static capabilites and derive them from ids/generic
5258
- [WINDOWS.MAIN]: {
5326
+ [constants["m" /* WINDOWS */].MAIN]: {
5259
5327
  title: "Main Window",
5260
5328
  size: [0, 0],
5261
5329
  open: true,
@@ -5269,7 +5337,7 @@ const defaultWindowsState = {
5269
5337
  y: 0
5270
5338
  }
5271
5339
  },
5272
- [WINDOWS.EQUALIZER]: {
5340
+ [constants["m" /* WINDOWS */].EQUALIZER]: {
5273
5341
  title: "Equalizer",
5274
5342
  size: [0, 0],
5275
5343
  open: true,
@@ -5283,7 +5351,7 @@ const defaultWindowsState = {
5283
5351
  y: 0
5284
5352
  }
5285
5353
  },
5286
- [WINDOWS.PLAYLIST]: {
5354
+ [constants["m" /* WINDOWS */].PLAYLIST]: {
5287
5355
  title: "Playlist Editor",
5288
5356
  size: [0, 0],
5289
5357
  open: true,
@@ -5302,7 +5370,7 @@ const defaultWindowsState = {
5302
5370
  width: 0,
5303
5371
  height: 0
5304
5372
  },
5305
- windowOrder: [WINDOWS.PLAYLIST, WINDOWS.EQUALIZER, WINDOWS.MILKDROP, WINDOWS.MAIN]
5373
+ windowOrder: [constants["m" /* WINDOWS */].PLAYLIST, constants["m" /* WINDOWS */].EQUALIZER, constants["m" /* WINDOWS */].MILKDROP, constants["m" /* WINDOWS */].MAIN]
5306
5374
  };
5307
5375
 
5308
5376
  const windows_windows = (state = defaultWindowsState, action) => {
@@ -5310,7 +5378,7 @@ const windows_windows = (state = defaultWindowsState, action) => {
5310
5378
  case ENABLE_MILKDROP:
5311
5379
  return windows_objectSpread(windows_objectSpread({}, state), {}, {
5312
5380
  genWindows: windows_objectSpread(windows_objectSpread({}, state.genWindows), {}, {
5313
- [WINDOWS.MILKDROP]: {
5381
+ [constants["m" /* WINDOWS */].MILKDROP]: {
5314
5382
  title: "Milkdrop",
5315
5383
  size: [0, 0],
5316
5384
  open: action.open,
@@ -5394,7 +5462,7 @@ const windows_windows = (state = defaultWindowsState, action) => {
5394
5462
  case UPDATE_WINDOW_POSITIONS:
5395
5463
  return windows_objectSpread(windows_objectSpread({}, state), {}, {
5396
5464
  positionsAreRelative: action.absolute === true ? false : state.positionsAreRelative,
5397
- genWindows: objectMap(state.genWindows, (w, windowId) => {
5465
+ genWindows: utils["t" /* objectMap */](state.genWindows, (w, windowId) => {
5398
5466
  const newPosition = action.positions[windowId];
5399
5467
 
5400
5468
  if (newPosition == null) {
@@ -5409,7 +5477,7 @@ const windows_windows = (state = defaultWindowsState, action) => {
5409
5477
 
5410
5478
  case RESET_WINDOW_SIZES:
5411
5479
  return windows_objectSpread(windows_objectSpread({}, state), {}, {
5412
- genWindows: objectMap(state.genWindows, w => windows_objectSpread(windows_objectSpread({}, w), {}, {
5480
+ genWindows: utils["t" /* objectMap */](state.genWindows, w => windows_objectSpread(windows_objectSpread({}, w), {}, {
5413
5481
  // Not sure why TypeScript can't figure this out for itself.
5414
5482
  size: [0, 0]
5415
5483
  }))
@@ -5424,7 +5492,7 @@ const windows_windows = (state = defaultWindowsState, action) => {
5424
5492
  } = action.serializedState.windows;
5425
5493
  return windows_objectSpread(windows_objectSpread({}, state), {}, {
5426
5494
  positionsAreRelative,
5427
- genWindows: objectMap(state.genWindows, (w, windowId) => {
5495
+ genWindows: utils["t" /* objectMap */](state.genWindows, (w, windowId) => {
5428
5496
  const serializedW = genWindows[windowId];
5429
5497
 
5430
5498
  if (serializedW == null) {
@@ -5459,7 +5527,7 @@ const windows_windows = (state = defaultWindowsState, action) => {
5459
5527
  function getSerializedState(state) {
5460
5528
  return {
5461
5529
  positionsAreRelative: state.positionsAreRelative,
5462
- genWindows: objectMap(state.genWindows, w => {
5530
+ genWindows: utils["t" /* objectMap */](state.genWindows, w => {
5463
5531
  return {
5464
5532
  size: w.size,
5465
5533
  open: w.open,
@@ -5483,7 +5551,7 @@ function media_objectSpread(target) { for (var i = 1; i < arguments.length; i++)
5483
5551
 
5484
5552
 
5485
5553
  const defaultState = {
5486
- timeMode: TIME_MODE.ELAPSED,
5554
+ timeMode: constants["h" /* TIME_MODE */].ELAPSED,
5487
5555
  timeElapsed: 0,
5488
5556
  // The winamp ini file declares the default volume as "200".
5489
5557
  // The UI seems to show a default volume near 78, which would
@@ -5493,7 +5561,7 @@ const defaultState = {
5493
5561
  shuffle: false,
5494
5562
  repeat: false,
5495
5563
  // TODO: Enforce possible values
5496
- status: MEDIA_STATUS.STOPPED
5564
+ status: constants["f" /* MEDIA_STATUS */].STOPPED
5497
5565
  };
5498
5566
 
5499
5567
  const media_media = (state = defaultState, action) => {
@@ -5502,22 +5570,22 @@ const media_media = (state = defaultState, action) => {
5502
5570
  case PLAY:
5503
5571
  case IS_PLAYING:
5504
5572
  return media_objectSpread(media_objectSpread({}, state), {}, {
5505
- status: MEDIA_STATUS.PLAYING
5573
+ status: constants["f" /* MEDIA_STATUS */].PLAYING
5506
5574
  });
5507
5575
 
5508
5576
  case PAUSE:
5509
5577
  return media_objectSpread(media_objectSpread({}, state), {}, {
5510
- status: MEDIA_STATUS.PAUSED
5578
+ status: constants["f" /* MEDIA_STATUS */].PAUSED
5511
5579
  });
5512
5580
 
5513
5581
  case STOP:
5514
5582
  case IS_STOPPED:
5515
5583
  return media_objectSpread(media_objectSpread({}, state), {}, {
5516
- status: MEDIA_STATUS.STOPPED
5584
+ status: constants["f" /* MEDIA_STATUS */].STOPPED
5517
5585
  });
5518
5586
 
5519
5587
  case TOGGLE_TIME_MODE:
5520
- const newMode = state.timeMode === TIME_MODE.REMAINING ? TIME_MODE.ELAPSED : TIME_MODE.REMAINING;
5588
+ const newMode = state.timeMode === constants["h" /* TIME_MODE */].REMAINING ? constants["h" /* TIME_MODE */].ELAPSED : constants["h" /* TIME_MODE */].REMAINING;
5521
5589
  return media_objectSpread(media_objectSpread({}, state), {}, {
5522
5590
  timeMode: newMode
5523
5591
  });
@@ -5574,7 +5642,7 @@ function media_getSerializedState(state) {
5574
5642
  }
5575
5643
  /* harmony default export */ var reducers_media = (media_media);
5576
5644
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/reselect/lib/index.js
5577
- var lib = __webpack_require__(3);
5645
+ var lib = __webpack_require__(5);
5578
5646
 
5579
5647
  // CONCATENATED MODULE: ./js/reducers/display.ts
5580
5648
 
@@ -5620,8 +5688,8 @@ const defaultDisplayState = {
5620
5688
  llama: false,
5621
5689
  closed: false,
5622
5690
  working: false,
5623
- skinImages: DEFAULT_SKIN.images,
5624
- skinColors: DEFAULT_SKIN.colors,
5691
+ skinImages: constants["c" /* DEFAULT_SKIN */].images,
5692
+ skinColors: constants["c" /* DEFAULT_SKIN */].colors,
5625
5693
  skinCursors: null,
5626
5694
  skinPlaylistStyle: null,
5627
5695
  skinRegion: {},
@@ -5727,7 +5795,7 @@ const display = (state = defaultDisplayState, action) => {
5727
5795
 
5728
5796
  case TOGGLE_VISUALIZER_STYLE:
5729
5797
  return display_objectSpread(display_objectSpread({}, state), {}, {
5730
- visualizerStyle: (state.visualizerStyle + 1) % VISUALIZER_ORDER.length
5798
+ visualizerStyle: (state.visualizerStyle + 1) % constants["l" /* VISUALIZER_ORDER */].length
5731
5799
  });
5732
5800
 
5733
5801
  case SET_PLAYLIST_SCROLL_POSITION:
@@ -5758,7 +5826,7 @@ const display = (state = defaultDisplayState, action) => {
5758
5826
  url
5759
5827
  });
5760
5828
 
5761
- const newSkinCursors = skinCursors == null ? null : objectMap(skinCursors, upgrade);
5829
+ const newSkinCursors = skinCursors == null ? null : utils["t" /* objectMap */](skinCursors, upgrade);
5762
5830
  return display_objectSpread(display_objectSpread({}, state), {}, {
5763
5831
  skinCursors: newSkinCursors
5764
5832
  }, rest);
@@ -5791,7 +5859,7 @@ const display_getSerializedState = state => {
5791
5859
  // values here. Since this is going to get serialized to JSON (which will
5792
5860
  // drop undefined) it's fine.
5793
5861
  // This code is geting removed soon anyway.
5794
- newCursors = objectMap(skinCursors, cursor => {
5862
+ newCursors = utils["t" /* objectMap */](skinCursors, cursor => {
5795
5863
  return cursor.type === "cur" ? cursor.url : undefined;
5796
5864
  });
5797
5865
  }
@@ -5810,7 +5878,7 @@ const display_getSerializedState = state => {
5810
5878
  };
5811
5879
  };
5812
5880
  const getVisualizerStyle = Object(lib["createSelector"])(state => state.visualizerStyle, visualizationStyle => {
5813
- return VISUALIZER_ORDER[visualizationStyle];
5881
+ return constants["l" /* VISUALIZER_ORDER */][visualizationStyle];
5814
5882
  });
5815
5883
  // CONCATENATED MODULE: ./js/reducers/userInput.ts
5816
5884
 
@@ -5985,7 +6053,7 @@ const settings = (state = defaultSettingsState, action) => {
5985
6053
 
5986
6054
  /* harmony default export */ var reducers_settings = (settings);
5987
6055
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/invariant/browser.js
5988
- var browser = __webpack_require__(19);
6056
+ var browser = __webpack_require__(21);
5989
6057
  var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
5990
6058
 
5991
6059
  // CONCATENATED MODULE: ./js/fileUtils.ts
@@ -6093,7 +6161,7 @@ function urlIsBlobUrl(url) {
6093
6161
  }
6094
6162
 
6095
6163
  function curUrlFromByteArray(arr) {
6096
- const base64 = base64FromDataArray(arr);
6164
+ const base64 = utils["b" /* base64FromDataArray */](arr);
6097
6165
  return `data:image/x-win-bitmap;base64,${base64}`;
6098
6166
  } // This is not perfect, but... meh: https://stackoverflow.com/a/36756650/1263117
6099
6167
 
@@ -6113,7 +6181,7 @@ function filenameFromUrl(url) {
6113
6181
  // CONCATENATED MODULE: ./js/trackUtils.ts
6114
6182
 
6115
6183
 
6116
- const trackName = weakMapMemoize(track => {
6184
+ const trackName = utils["E" /* weakMapMemoize */](track => {
6117
6185
  const {
6118
6186
  artist,
6119
6187
  title,
@@ -6137,7 +6205,7 @@ const trackName = weakMapMemoize(track => {
6137
6205
 
6138
6206
  return "???";
6139
6207
  });
6140
- const trackFilename = weakMapMemoize(track => {
6208
+ const trackFilename = utils["E" /* weakMapMemoize */](track => {
6141
6209
  if (track.url) {
6142
6210
  const urlFilename = filenameFromUrl(track.url);
6143
6211
 
@@ -6175,7 +6243,7 @@ const tracks_tracks = (state = tracks_defaultPlaylistState, action) => {
6175
6243
  defaultName: action.defaultName || null,
6176
6244
  duration: (_action$duration = action.duration) !== null && _action$duration !== void 0 ? _action$duration : null,
6177
6245
  url: action.url,
6178
- mediaTagsRequestStatus: MEDIA_TAG_REQUEST_STATUS.INITIALIZED
6246
+ mediaTagsRequestStatus: constants["g" /* MEDIA_TAG_REQUEST_STATUS */].INITIALIZED
6179
6247
  }
6180
6248
  });
6181
6249
 
@@ -6193,14 +6261,14 @@ const tracks_tracks = (state = tracks_defaultPlaylistState, action) => {
6193
6261
  case MEDIA_TAG_REQUEST_INITIALIZED:
6194
6262
  return tracks_objectSpread(tracks_objectSpread({}, state), {}, {
6195
6263
  [action.id]: tracks_objectSpread(tracks_objectSpread({}, state[action.id]), {}, {
6196
- mediaTagsRequestStatus: MEDIA_TAG_REQUEST_STATUS.INITIALIZED
6264
+ mediaTagsRequestStatus: constants["g" /* MEDIA_TAG_REQUEST_STATUS */].INITIALIZED
6197
6265
  })
6198
6266
  });
6199
6267
 
6200
6268
  case MEDIA_TAG_REQUEST_FAILED:
6201
6269
  return tracks_objectSpread(tracks_objectSpread({}, state), {}, {
6202
6270
  [action.id]: tracks_objectSpread(tracks_objectSpread({}, state[action.id]), {}, {
6203
- mediaTagsRequestStatus: MEDIA_TAG_REQUEST_STATUS.FAILED
6271
+ mediaTagsRequestStatus: constants["g" /* MEDIA_TAG_REQUEST_STATUS */].FAILED
6204
6272
  })
6205
6273
  });
6206
6274
 
@@ -6231,7 +6299,7 @@ const tracks_tracks = (state = tracks_defaultPlaylistState, action) => {
6231
6299
  } = track;
6232
6300
  return tracks_objectSpread(tracks_objectSpread({}, state), {}, {
6233
6301
  [action.id]: tracks_objectSpread(tracks_objectSpread({}, track), {}, {
6234
- mediaTagsRequestStatus: MEDIA_TAG_REQUEST_STATUS.COMPLETE,
6302
+ mediaTagsRequestStatus: constants["g" /* MEDIA_TAG_REQUEST_STATUS */].COMPLETE,
6235
6303
  title,
6236
6304
  artist,
6237
6305
  album,
@@ -6335,7 +6403,7 @@ const milkdrop_milkdrop = (state = defaultMilkdropState, action) => {
6335
6403
  case RESOLVE_PRESET_AT_INDEX:
6336
6404
  const preset = state.presets[action.index];
6337
6405
  return milkdrop_objectSpread(milkdrop_objectSpread({}, state), {}, {
6338
- presets: replaceAtIndex(state.presets, action.index, {
6406
+ presets: utils["y" /* replaceAtIndex */](state.presets, action.index, {
6339
6407
  type: "RESOLVED",
6340
6408
  name: preset.name,
6341
6409
  preset: action.json
@@ -6600,8 +6668,8 @@ const getBalanceText = balance => {
6600
6668
  };
6601
6669
  const getVolumeText = volume => `Volume: ${volume}%`;
6602
6670
  const getPositionText = (duration, seekToPercent) => {
6603
- const newElapsedStr = getTimeStr(duration * seekToPercent / 100, false);
6604
- const durationStr = getTimeStr(duration, false);
6671
+ const newElapsedStr = utils["j" /* getTimeStr */](duration * seekToPercent / 100, false);
6672
+ const durationStr = utils["j" /* getTimeStr */](duration, false);
6605
6673
  return `Seek to: ${newElapsedStr}/${durationStr} (${seekToPercent}%)`;
6606
6674
  };
6607
6675
  const getDoubleSizeModeText = enabled => `${enabled ? "Disable" : "Enable"} doublesize mode`;
@@ -6766,10 +6834,10 @@ const getSliders = state => state.equalizer.sliders;
6766
6834
  const getEqfData = Object(lib["createSelector"])(getSliders, sliders => {
6767
6835
  const preset = {
6768
6836
  name: "Entry1",
6769
- preamp: denormalizeEqBand(sliders.preamp)
6837
+ preamp: utils["e" /* denormalizeEqBand */](sliders.preamp)
6770
6838
  };
6771
- BANDS.forEach(band => {
6772
- preset[`hz${band}`] = denormalizeEqBand(sliders[band]);
6839
+ constants["a" /* BANDS */].forEach(band => {
6840
+ preset[`hz${band}`] = utils["e" /* denormalizeEqBand */](sliders[band]);
6773
6841
  });
6774
6842
  const eqfData = {
6775
6843
  presets: [preset],
@@ -6811,7 +6879,7 @@ const runningTimeFromTracks = tracks => tracks.reduce((time, track) => time + Nu
6811
6879
  const getTotalRunningTime = Object(lib["createSelector"])(getOrderedTrackObjects, runningTimeFromTracks);
6812
6880
  const getSelectedRunningTime = Object(lib["createSelector"])(getSelectedTrackObjects, runningTimeFromTracks); // Note: We should append "+" to these values if some of the tracks are of unknown time.
6813
6881
 
6814
- const getRunningTimeMessage = Object(lib["createSelector"])(getTotalRunningTime, getSelectedRunningTime, (totalRunningTime, selectedRunningTime) => `${getTimeStr(selectedRunningTime)}/${getTimeStr(totalRunningTime)}`); // TODO: use slectors to get memoization
6882
+ const getRunningTimeMessage = Object(lib["createSelector"])(getTotalRunningTime, getSelectedRunningTime, (totalRunningTime, selectedRunningTime) => `${utils["j" /* getTimeStr */](selectedRunningTime)}/${utils["j" /* getTimeStr */](totalRunningTime)}`); // TODO: use slectors to get memoization
6815
6883
 
6816
6884
  const getCurrentTrackIndex = state => {
6817
6885
  const {
@@ -6889,7 +6957,7 @@ const getNextTrackId = (state, n = 1) => {
6889
6957
  return null;
6890
6958
  }
6891
6959
 
6892
- nextIndex = clamp(nextIndex, 0, trackCount - 1);
6960
+ nextIndex = utils["d" /* clamp */](nextIndex, 0, trackCount - 1);
6893
6961
  return trackOrder[nextIndex];
6894
6962
  };
6895
6963
  const getGenWindows = state => {
@@ -6900,7 +6968,7 @@ const selectors_getWindowOpen = Object(lib["createSelector"])(getGenWindows, gen
6900
6968
  });
6901
6969
  const selectors_getWindowHidden = Object(lib["createSelector"])(getMilkdropWindowEnabled, milkdropWindowEnabled => {
6902
6970
  return windowId => {
6903
- return windowId === WINDOWS.MILKDROP && !milkdropWindowEnabled;
6971
+ return windowId === constants["m" /* WINDOWS */].MILKDROP && !milkdropWindowEnabled;
6904
6972
  };
6905
6973
  });
6906
6974
  const selectors_getWindowShade = Object(lib["createSelector"])(getGenWindows, genWindows => {
@@ -6909,11 +6977,11 @@ const selectors_getWindowShade = Object(lib["createSelector"])(getGenWindows, ge
6909
6977
  const selectors_getWindowSize = Object(lib["createSelector"])(getGenWindows, genWindows => {
6910
6978
  return windowId => genWindows[windowId].size;
6911
6979
  });
6912
- const getWindowPositions = Object(lib["createSelector"])(getGenWindows, windows => objectMap(windows, w => w.position));
6980
+ const getWindowPositions = Object(lib["createSelector"])(getGenWindows, windows => utils["t" /* objectMap */](windows, w => w.position));
6913
6981
  const BASE_WINDOW_HEIGHT = 58;
6914
6982
  const getNumberOfVisibleTracks = Object(lib["createSelector"])(selectors_getWindowSize, getWindowSize_ => {
6915
6983
  const playlistSize = getWindowSize_("playlist");
6916
- return Math.floor((BASE_WINDOW_HEIGHT + WINDOW_RESIZE_SEGMENT_HEIGHT * playlistSize[1]) / TRACK_HEIGHT);
6984
+ return Math.floor((BASE_WINDOW_HEIGHT + constants["n" /* WINDOW_RESIZE_SEGMENT_HEIGHT */] * playlistSize[1]) / constants["i" /* TRACK_HEIGHT */]);
6917
6985
  });
6918
6986
  const getOverflowTrackCount = Object(lib["createSelector"])(getTrackCount, getNumberOfVisibleTracks, (trackCount, numberOfVisibleTracks) => Math.max(0, trackCount - numberOfVisibleTracks));
6919
6987
 
@@ -6928,7 +6996,7 @@ const getPlaylistScrollPosition = Object(lib["createSelector"])(getOverflowTrack
6928
6996
  });
6929
6997
  const getScrollOffset = Object(lib["createSelector"])(_getPlaylistScrollPosition, getTrackCount, getNumberOfVisibleTracks, (playlistScrollPosition, trackCount, numberOfVisibleTracks) => {
6930
6998
  const overflow = Math.max(0, trackCount - numberOfVisibleTracks);
6931
- return percentToIndex(playlistScrollPosition / 100, overflow + 1);
6999
+ return utils["w" /* percentToIndex */](playlistScrollPosition / 100, overflow + 1);
6932
7000
  });
6933
7001
  const getVisibleTrackIds = Object(lib["createSelector"])(getScrollOffset, getTrackOrder, getNumberOfVisibleTracks, (offset, trackOrder, numberOfVisibleTracks) => trackOrder.slice(offset, offset + numberOfVisibleTracks));
6934
7002
  function getAllTracksAreVisible(state) {
@@ -6961,12 +7029,12 @@ const getCurrentTrackDisplayName = Object(lib["createSelector"])(getCurrentTrack
6961
7029
  const getMediaStatus = state => {
6962
7030
  return state.media.status;
6963
7031
  };
6964
- const getMediaIsPlaying = state => state.media.status === MEDIA_STATUS.PLAYING;
7032
+ const getMediaIsPlaying = state => state.media.status === constants["f" /* MEDIA_STATUS */].PLAYING;
6965
7033
  const getCurrentTrack = Object(lib["createSelector"])(getCurrentTrackId, getTracks, (trackId, tracks) => {
6966
7034
  return trackId == null ? null : tracks[trackId];
6967
7035
  });
6968
7036
  const getCurrentlyPlayingTrackIdIfLoaded = Object(lib["createSelector"])(getMediaIsPlaying, getCurrentTrack, (mediaIsPlaying, currentTrack) => {
6969
- if (!mediaIsPlaying || !currentTrack || currentTrack.mediaTagsRequestStatus === MEDIA_TAG_REQUEST_STATUS.INITIALIZED) {
7037
+ if (!mediaIsPlaying || !currentTrack || currentTrack.mediaTagsRequestStatus === constants["g" /* MEDIA_TAG_REQUEST_STATUS */].INITIALIZED) {
6970
7038
  return null;
6971
7039
  }
6972
7040
 
@@ -6988,26 +7056,26 @@ const getCurrentTrackInfo = Object(lib["createSelector"])(getCurrentTrack, track
6988
7056
  };
6989
7057
  });
6990
7058
  const getMinimalMediaText = Object(lib["createSelector"])(getCurrentTrackNumber, getCurrentTrackDisplayName, (trackNumber, name) => name == null ? null : `${trackNumber}. ${name}`);
6991
- const getMediaText = Object(lib["createSelector"])(getMinimalMediaText, getDuration, (minimalMediaText, duration) => minimalMediaText == null ? null : `${minimalMediaText} (${getTimeStr(duration)})`);
7059
+ const getMediaText = Object(lib["createSelector"])(getMinimalMediaText, getDuration, (minimalMediaText, duration) => minimalMediaText == null ? null : `${minimalMediaText} (${utils["j" /* getTimeStr */](duration)})`);
6992
7060
  const getNumberOfTracks = state => getTrackOrder(state).length;
6993
7061
  const getPlaylistDuration = Object(lib["createSelector"])(getTracks, tracks => Object.values(tracks).reduce((total, track) => total + (track.duration || 0), 0));
6994
7062
  const getPlaylistURL = Object(lib["createSelector"])(getNumberOfTracks, getPlaylistDuration, getTrackOrder, getTracks, selectors_getTrackDisplayName, (numberOfTracks, playlistDuration, trackOrder, tracks, getDisplayName) => createPlaylistURL({
6995
7063
  numberOfTracks,
6996
- averageTrackLength: getTimeStr(playlistDuration / numberOfTracks),
7064
+ averageTrackLength: utils["j" /* getTimeStr */](playlistDuration / numberOfTracks),
6997
7065
  // TODO: Handle hours
6998
7066
  playlistLengthMinutes: Math.floor(playlistDuration / 60),
6999
7067
  playlistLengthSeconds: Math.floor(playlistDuration % 60),
7000
- tracks: trackOrder.map((id, i) => `${i + 1}. ${getDisplayName(id)} (${getTimeStr(tracks[id].duration)})`)
7068
+ tracks: trackOrder.map((id, i) => `${i + 1}. ${getDisplayName(id)} (${utils["j" /* getTimeStr */](tracks[id].duration)})`)
7001
7069
  }));
7002
- const selectors_WINDOW_HEIGHT = 116;
7070
+ const WINDOW_HEIGHT = 116;
7003
7071
  const SHADE_WINDOW_HEIGHT = 14;
7004
7072
 
7005
7073
  function getWPixelSize(w, doubled) {
7006
7074
  const [width, height] = w.size;
7007
7075
  const doubledMultiplier = doubled && w.canDouble ? 2 : 1;
7008
7076
  const pix = {
7009
- height: selectors_WINDOW_HEIGHT + height * WINDOW_RESIZE_SEGMENT_HEIGHT,
7010
- width: WINDOW_WIDTH + width * WINDOW_RESIZE_SEGMENT_WIDTH
7077
+ height: WINDOW_HEIGHT + height * constants["n" /* WINDOW_RESIZE_SEGMENT_HEIGHT */],
7078
+ width: constants["p" /* WINDOW_WIDTH */] + width * constants["o" /* WINDOW_RESIZE_SEGMENT_WIDTH */]
7011
7079
  };
7012
7080
  return {
7013
7081
  height: (w.shade ? SHADE_WINDOW_HEIGHT : pix.height) * doubledMultiplier,
@@ -7035,7 +7103,7 @@ function getZIndex(state) {
7035
7103
  } // TODO: This is poorly memoized. It invalidates when a window moves.
7036
7104
 
7037
7105
  const getWindowSizes = Object(lib["createSelector"])(getGenWindows, getDoubled, (windows, doubled) => {
7038
- return objectMap(windows, w => getWPixelSize(w, doubled));
7106
+ return utils["t" /* objectMap */](windows, w => getWPixelSize(w, doubled));
7039
7107
  });
7040
7108
  const selectors_getWindowPixelSize = Object(lib["createSelector"])(getWindowSizes, sizes => {
7041
7109
  return windowId => sizes[windowId];
@@ -7044,7 +7112,7 @@ const selectors_getWindowPixelSize = Object(lib["createSelector"])(getWindowSize
7044
7112
  const getWindowOrder = state => state.windows.windowOrder;
7045
7113
 
7046
7114
  const getNormalizedWindowOrder = Object(lib["createSelector"])(getWindowOrder, getGenWindows, (windowOrder, genWindows) => {
7047
- return [WINDOWS.MAIN, ...windowOrder.filter(windowId => windowId !== WINDOWS.MAIN && genWindows[windowId] != null)];
7115
+ return [constants["m" /* WINDOWS */].MAIN, ...windowOrder.filter(windowId => windowId !== constants["m" /* WINDOWS */].MAIN && genWindows[windowId] != null)];
7048
7116
  }); // TODO: Now that both size and position are stored on genWindows this seems a bit silly.
7049
7117
 
7050
7118
  const getWindowsInfo = Object(lib["createSelector"])(getWindowSizes, getWindowPositions, getNormalizedWindowOrder, (sizes, positions, windowOrder) => {
@@ -7067,10 +7135,10 @@ const getSkinPlaylistStyle = state => {
7067
7135
  return state.display.skinPlaylistStyle || defaultPlaylistStyle;
7068
7136
  };
7069
7137
  const selectors_getVisualizerStyle = state => {
7070
- const milkdrop = state.windows.genWindows[WINDOWS.MILKDROP];
7138
+ const milkdrop = state.windows.genWindows[constants["m" /* WINDOWS */].MILKDROP];
7071
7139
 
7072
7140
  if (milkdrop != null && milkdrop.open) {
7073
- return VISUALIZERS.MILKDROP;
7141
+ return constants["k" /* VISUALIZERS */].MILKDROP;
7074
7142
  }
7075
7143
 
7076
7144
  return getVisualizerStyle(state.display);
@@ -7103,10 +7171,10 @@ function getEqualizerAuto(state) {
7103
7171
  function getBrowserWindowSize(state) {
7104
7172
  return state.windows.browserWindowSize;
7105
7173
  }
7106
- const getOpenWindows = Object(lib["createSelector"])(getGenWindows, genWindows => objectFilter(genWindows, w => w.open));
7174
+ const getOpenWindows = Object(lib["createSelector"])(getGenWindows, genWindows => utils["r" /* objectFilter */](genWindows, w => w.open));
7107
7175
  const getStackedLayoutPositions = Object(lib["createSelector"])(getOpenWindows, getDoubled, (openWindows, doubled) => {
7108
7176
  let offset = 0;
7109
- return objectMap(openWindows, w => {
7177
+ return utils["t" /* objectMap */](openWindows, w => {
7110
7178
  const position = {
7111
7179
  x: 0,
7112
7180
  y: offset
@@ -7259,14 +7327,14 @@ const getPreampLineImage = Object(lib["createSelector"])(getPreampLineUrl, async
7259
7327
  return null;
7260
7328
  }
7261
7329
 
7262
- return imgFromUrl(url);
7330
+ return utils["n" /* imgFromUrl */](url);
7263
7331
  });
7264
7332
  const getLineColorsImage = Object(lib["createSelector"])(getLineColorsUrl, async url => {
7265
7333
  if (url == null) {
7266
7334
  return null;
7267
7335
  }
7268
7336
 
7269
- return imgFromUrl(url);
7337
+ return utils["n" /* imgFromUrl */](url);
7270
7338
  });
7271
7339
  function getDummyVizData(state) {
7272
7340
  return state.display.dummyVizData;
@@ -7508,7 +7576,7 @@ function withWindowGraphIntegrity(action) {
7508
7576
 
7509
7577
  const positionDiff = getPositionDiff(graph, sizeDiff);
7510
7578
  const windowPositions = getWindowPositions(state);
7511
- const newPositions = objectMap(windowPositions, (position, key) => applyDiff(position, positionDiff[key]));
7579
+ const newPositions = utils["t" /* objectMap */](windowPositions, (position, key) => applyDiff(position, positionDiff[key]));
7512
7580
  dispatch(windows_updateWindowPositions(newPositions));
7513
7581
  };
7514
7582
  }
@@ -7618,7 +7686,7 @@ function centerWindows(box) {
7618
7686
  const offsetTop = top + window.scrollY; // A layout has been suplied. We will compute the bounding box and
7619
7687
  // center the given layout.
7620
7688
 
7621
- const bounding = calculateBoundingBox(windowsInfo.filter(w => getOpen(w.key)));
7689
+ const bounding = utils["c" /* calculateBoundingBox */](windowsInfo.filter(w => getOpen(w.key)));
7622
7690
 
7623
7691
  if (bounding == null) {
7624
7692
  // There are no windows to center
@@ -7666,8 +7734,8 @@ function ensureWindowsAreOnScreen() {
7666
7734
  const {
7667
7735
  height,
7668
7736
  width
7669
- } = utils_getWindowSize();
7670
- const bounding = calculateBoundingBox(windowsInfo.filter(w => getOpen(w.key)));
7737
+ } = utils["k" /* getWindowSize */]();
7738
+ const bounding = utils["c" /* calculateBoundingBox */](windowsInfo.filter(w => getOpen(w.key)));
7671
7739
 
7672
7740
  if (bounding == null) {
7673
7741
  // There are no windows visible, so there's no work to do.
@@ -7700,7 +7768,7 @@ function ensureWindowsAreOnScreen() {
7700
7768
  moveX = bounding.right - width;
7701
7769
  }
7702
7770
 
7703
- const newPositions = objectMap(positions, position => ({
7771
+ const newPositions = utils["t" /* objectMap */](positions, position => ({
7704
7772
  x: position.x - moveX,
7705
7773
  y: position.y - moveY
7706
7774
  }));
@@ -7724,7 +7792,7 @@ function ensureWindowsAreOnScreen() {
7724
7792
  function playTrack(id) {
7725
7793
  return (dispatch, getState) => {
7726
7794
  const state = getState();
7727
- const isStopped = getMediaStatus(state) === MEDIA_STATUS.STOPPED;
7795
+ const isStopped = getMediaStatus(state) === constants["f" /* MEDIA_STATUS */].STOPPED;
7728
7796
 
7729
7797
  if (isStopped) {
7730
7798
  dispatch({
@@ -7749,7 +7817,7 @@ function media_play() {
7749
7817
  return (dispatch, getState) => {
7750
7818
  const state = getState();
7751
7819
 
7752
- if (state.media.status === MEDIA_STATUS.STOPPED && state.playlist.currentTrack == null && state.playlist.trackOrder.length === 0) {
7820
+ if (state.media.status === constants["f" /* MEDIA_STATUS */].STOPPED && state.playlist.currentTrack == null && state.playlist.trackOrder.length === 0) {
7753
7821
  dispatch(files_openMediaFileDialog());
7754
7822
  } else {
7755
7823
  dispatch({
@@ -7764,7 +7832,7 @@ function media_pause() {
7764
7832
  status
7765
7833
  } = getState().media;
7766
7834
 
7767
- if (status === MEDIA_STATUS.PLAYING) {
7835
+ if (status === constants["f" /* MEDIA_STATUS */].PLAYING) {
7768
7836
  dispatch({
7769
7837
  type: PAUSE
7770
7838
  });
@@ -7827,7 +7895,7 @@ function media_seekBackward(seconds) {
7827
7895
  function media_setVolume(volume) {
7828
7896
  return {
7829
7897
  type: SET_VOLUME,
7830
- volume: clamp(volume, 0, 100)
7898
+ volume: Object(utils["d" /* clamp */])(volume, 0, 100)
7831
7899
  };
7832
7900
  }
7833
7901
  function adjustVolume(volumeDiff) {
@@ -7845,7 +7913,7 @@ function media_scrollVolume(e) {
7845
7913
  };
7846
7914
  }
7847
7915
  function media_setBalance(balance) {
7848
- balance = clamp(balance, -100, 100); // The balance clips to the center
7916
+ balance = Object(utils["d" /* clamp */])(balance, -100, 100); // The balance clips to the center
7849
7917
 
7850
7918
  if (Math.abs(balance) < 25) {
7851
7919
  balance = 0;
@@ -7895,7 +7963,7 @@ function setEqBand(band, value) {
7895
7963
 
7896
7964
  function _setEqTo(value) {
7897
7965
  return dispatch => {
7898
- Object.values(BANDS).forEach(band => {
7966
+ Object.values(constants["a" /* BANDS */]).forEach(band => {
7899
7967
  dispatch({
7900
7968
  type: SET_BAND_VALUE,
7901
7969
  value,
@@ -7945,7 +8013,7 @@ function toggleEqAuto() {
7945
8013
  };
7946
8014
  }
7947
8015
  // EXTERNAL MODULE: ../winamp-eqf/index.js
7948
- var winamp_eqf = __webpack_require__(29);
8016
+ var winamp_eqf = __webpack_require__(31);
7949
8017
 
7950
8018
  // CONCATENATED MODULE: ./js/skinSprites.ts
7951
8019
 
@@ -7991,7 +8059,7 @@ const FONT_LOOKUP = {
7991
8059
  "7": [1, 7],
7992
8060
  "8": [1, 8],
7993
8061
  "9": [1, 9],
7994
- [UTF8_ELLIPSIS]: [1, 10],
8062
+ [constants["j" /* UTF8_ELLIPSIS */]]: [1, 10],
7995
8063
  ".": [1, 11],
7996
8064
  ":": [1, 12],
7997
8065
  "(": [1, 13],
@@ -9431,7 +9499,7 @@ function pointPairs(arr) {
9431
9499
  return pairedValues;
9432
9500
  }
9433
9501
  function regionParser(regionStr) {
9434
- const iniData = parseIni(regionStr);
9502
+ const iniData = Object(utils["u" /* parseIni */])(regionStr);
9435
9503
  const data = {};
9436
9504
  Object.keys(iniData).forEach(section => {
9437
9505
  const {
@@ -9533,7 +9601,7 @@ async function getFileFromZip(zip, fileName, ext, mode) {
9533
9601
  }
9534
9602
 
9535
9603
  function fallbackGetImgFromBlob(blob) {
9536
- return imgFromUrl(URL.createObjectURL(blob));
9604
+ return utils["n" /* imgFromUrl */](URL.createObjectURL(blob));
9537
9605
  }
9538
9606
 
9539
9607
  async function getImgFromBlob(blob) {
@@ -9629,20 +9697,20 @@ async function getPlaylistStyle(zip) {
9629
9697
  const file = files[0];
9630
9698
 
9631
9699
  if (file == null) {
9632
- return DEFAULT_SKIN.playlistStyle;
9700
+ return constants["c" /* DEFAULT_SKIN */].playlistStyle;
9633
9701
  }
9634
9702
 
9635
9703
  const ini = await file.async("text");
9636
9704
 
9637
9705
  if (ini == null) {
9638
- return DEFAULT_SKIN.playlistStyle;
9706
+ return constants["c" /* DEFAULT_SKIN */].playlistStyle;
9639
9707
  }
9640
9708
 
9641
- const data = ini && parseIni(ini).text;
9709
+ const data = ini && utils["u" /* parseIni */](ini).text;
9642
9710
 
9643
9711
  if (!data) {
9644
9712
  // Corrupt or missing PLEDIT.txt file.
9645
- return DEFAULT_SKIN.playlistStyle;
9713
+ return constants["c" /* DEFAULT_SKIN */].playlistStyle;
9646
9714
  } // Winamp seems to permit colors that contain too many characters.
9647
9715
  // For compatibility with existing skins, we normalize them here.
9648
9716
 
@@ -9660,7 +9728,7 @@ async function getPlaylistStyle(zip) {
9660
9728
 
9661
9729
  data[colorKey] = color.slice(0, 7);
9662
9730
  });
9663
- return skinParserUtils_objectSpread(skinParserUtils_objectSpread({}, DEFAULT_SKIN.playlistStyle), data);
9731
+ return skinParserUtils_objectSpread(skinParserUtils_objectSpread({}, constants["c" /* DEFAULT_SKIN */].playlistStyle), data);
9664
9732
  }
9665
9733
  async function getGenExColors(zip) {
9666
9734
  const img = await getImgFromFilename(zip, "GENEX");
@@ -9771,7 +9839,7 @@ const CURSORS = ["CLOSE", "EQCLOSE", "EQNORMAL", "EQSLID", "EQTITLE", "MAINMENU"
9771
9839
 
9772
9840
  async function genVizColors(zip) {
9773
9841
  const viscolor = await getFileFromZip(zip, "VISCOLOR", "txt", "text");
9774
- return viscolor ? parseViscolors(viscolor.contents) : DEFAULT_SKIN.colors;
9842
+ return viscolor ? Object(utils["v" /* parseViscolors */])(viscolor.contents) : constants["c" /* DEFAULT_SKIN */].colors;
9775
9843
  }
9776
9844
 
9777
9845
  async function genImages(zip) {
@@ -9811,7 +9879,7 @@ async function genGenTextSprites(zip) {
9811
9879
  let x = 1;
9812
9880
  const backgroundColor = getColorAt(0);
9813
9881
  const height = 7;
9814
- return LETTERS.map(letter => {
9882
+ return constants["d" /* LETTERS */].map(letter => {
9815
9883
  let nextBackground = x;
9816
9884
 
9817
9885
  while (getColorAt(nextBackground) !== backgroundColor && nextBackground < canvas.width) {
@@ -9858,7 +9926,7 @@ async function skinParser(zipFileBuffer, JSZip) {
9858
9926
 
9859
9927
  /* harmony default export */ var js_skinParser = (skinParser);
9860
9928
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/tinyqueue/index.js
9861
- var tinyqueue = __webpack_require__(39);
9929
+ var tinyqueue = __webpack_require__(41);
9862
9930
  var tinyqueue_default = /*#__PURE__*/__webpack_require__.n(tinyqueue);
9863
9931
 
9864
9932
  // CONCATENATED MODULE: ./js/loadQueue.js
@@ -9984,7 +10052,7 @@ function playlist_sortListByTitle() {
9984
10052
  return (dispatch, getState) => {
9985
10053
  const state = getState();
9986
10054
  const tracks = getTracks(state);
9987
- const trackOrder = sort(getTrackOrder(state), i => `${tracks[i].title}`.toLowerCase());
10055
+ const trackOrder = Object(utils["B" /* sort */])(getTrackOrder(state), i => `${tracks[i].title}`.toLowerCase());
9988
10056
  return dispatch({
9989
10057
  type: SET_TRACK_ORDER,
9990
10058
  trackOrder
@@ -10002,7 +10070,7 @@ function scrollNTracks(n) {
10002
10070
  const state = getState();
10003
10071
  const overflow = getOverflowTrackCount(state);
10004
10072
  const currentOffset = getScrollOffset(state);
10005
- const position = overflow ? clamp((currentOffset + n) / overflow, 0, 1) : 0;
10073
+ const position = overflow ? Object(utils["d" /* clamp */])((currentOffset + n) / overflow, 0, 1) : 0;
10006
10074
  return dispatch({
10007
10075
  type: SET_PLAYLIST_SCROLL_POSITION,
10008
10076
  position: position * 100
@@ -10018,11 +10086,11 @@ function playlist_scrollPlaylistByDelta(e) {
10018
10086
  e.stopPropagation();
10019
10087
  }
10020
10088
 
10021
- const totalPixelHeight = state.playlist.trackOrder.length * TRACK_HEIGHT;
10089
+ const totalPixelHeight = state.playlist.trackOrder.length * constants["i" /* TRACK_HEIGHT */];
10022
10090
  const percentDelta = e.deltaY / totalPixelHeight * 100;
10023
10091
  dispatch({
10024
10092
  type: SET_PLAYLIST_SCROLL_POSITION,
10025
- position: clamp(state.display.playlistScrollPosition + percentDelta, 0, 100)
10093
+ position: Object(utils["d" /* clamp */])(state.display.playlistScrollPosition + percentDelta, 0, 100)
10026
10094
  });
10027
10095
  };
10028
10096
  }
@@ -10044,7 +10112,7 @@ function playlist_dragSelected(offset) {
10044
10112
  return;
10045
10113
  }
10046
10114
 
10047
- const lastSelected = findLastIndex(trackOrder, trackId => tracks[trackId] && selectedIds.has(trackId));
10115
+ const lastSelected = Object(utils["g" /* findLastIndex */])(trackOrder, trackId => tracks[trackId] && selectedIds.has(trackId));
10048
10116
 
10049
10117
  if (lastSelected === -1) {
10050
10118
  throw new Error("We found a first selected, but not a last selected.");
@@ -10053,7 +10121,7 @@ function playlist_dragSelected(offset) {
10053
10121
 
10054
10122
  const min = -firstSelected;
10055
10123
  const max = trackOrder.length - 1 - lastSelected;
10056
- const normalizedOffset = clamp(offset, min, max);
10124
+ const normalizedOffset = Object(utils["d" /* clamp */])(offset, min, max);
10057
10125
 
10058
10126
  if (normalizedOffset !== 0) {
10059
10127
  dispatch({
@@ -10078,242 +10146,6 @@ function selectAll() {
10078
10146
  type: SELECT_ALL
10079
10147
  };
10080
10148
  }
10081
- // CONCATENATED MODULE: ./js/lib/webamp-telegram-handler.ts
10082
-
10083
- // @ts-ignore
10084
-
10085
- class webamp_telegram_handler_WinampTelegramCustomHandler {
10086
- constructor(emit) {
10087
- defineProperty_default()(this, "webamp", void 0);
10088
-
10089
- defineProperty_default()(this, "telegram", void 0);
10090
-
10091
- defineProperty_default()(this, "updateAppState", () => {
10092
- localStorage.setItem("app-state", JSON.stringify(this.webamp.store.getState()));
10093
- });
10094
-
10095
- defineProperty_default()(this, "getFiles", async ln => {
10096
- const x = new XMLHttpRequest();
10097
- const link = encodeURIComponent(ln);
10098
- x.open('get', `https://cloud-api.yandex.net/v1/disk/public/resources?public_key=${link}`, true);
10099
- x.setRequestHeader('Accept', 'application/json');
10100
- x.setRequestHeader('Content-Type', 'application/json');
10101
- x.setRequestHeader('Authorization', 'OAuth 0dc7925ebcf047a1b001c07d6bd5ac49');
10102
- x.send();
10103
-
10104
- x.onload = async () => {
10105
- if (x.status === 200) {
10106
- var _JSON$parse;
10107
-
10108
- const data = (_JSON$parse = JSON.parse(x.responseText)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse._embedded.items;
10109
- let i = 0;
10110
- this.saveLastPlaylist(ln);
10111
-
10112
- for (const item of data) {
10113
- if (item.size > 0x1400000) {
10114
- console.info(`File ${item.name} can't be loaded due oversize`);
10115
- } else {
10116
- await fetch(`${item.file}&public_key=${item.public_key}`, {
10117
- method: "GET",
10118
- headers: [["Authorization", "OAuth 0dc7925ebcf047a1b001c07d6bd5ac49"]]
10119
- }).then(response => response).then(resp => fetch(resp.url)).then(async response => {
10120
- if (response.status === 302) {
10121
- return await fetch(`${response.headers.get("Location")}&public_key=${item.public_key}`, {
10122
- headers: [["Authorization", "OAuth 0dc7925ebcf047a1b001c07d6bd5ac49"]]
10123
- });
10124
- } else {
10125
- return response;
10126
- }
10127
- }).then(res => {
10128
- var _res$body;
10129
-
10130
- console.log(res);
10131
- const read = (_res$body = res.body) === null || _res$body === void 0 ? void 0 : _res$body.getReader();
10132
- return new ReadableStream({
10133
- start(controller) {
10134
- // @ts-ignore
10135
- function pump() {
10136
- // @ts-ignore
10137
- return read === null || read === void 0 ? void 0 : read.read().then(({
10138
- done,
10139
- value
10140
- }) => {
10141
- if (done) {
10142
- controller.close();
10143
- return;
10144
- }
10145
-
10146
- controller.enqueue(value);
10147
- return pump();
10148
- });
10149
- }
10150
-
10151
- return pump();
10152
- }
10153
-
10154
- });
10155
- }).then(stream => new Response(stream)).then(response => response.blob()).then(blob => URL.createObjectURL(blob)).then(uri => {
10156
- if (i === 0) {
10157
- this.webamp.setTracksToPlay([{
10158
- defaultName: item.name,
10159
- url: uri
10160
- }]);
10161
- } else {
10162
- this.webamp.appendTracks([{
10163
- defaultName: item.name,
10164
- url: uri
10165
- }]);
10166
- }
10167
-
10168
- i++; // yes, it should be here
10169
- });
10170
- }
10171
- }
10172
- }
10173
- };
10174
- });
10175
-
10176
- defineProperty_default()(this, "saveLastPlaylist", playlistLink => {
10177
- document.cookie = `lastlist=${playlistLink}; path=/;`;
10178
- });
10179
-
10180
- defineProperty_default()(this, "getCookie", name => {
10181
- const regex = new RegExp(`(^| )${name}=([^;]+)`);
10182
- const match = document.cookie.match(regex);
10183
-
10184
- if (match) {
10185
- return match[2];
10186
- }
10187
- });
10188
-
10189
- defineProperty_default()(this, "loadOptions", opts => {
10190
- let i = 0;
10191
- let vol = opts.media.volume;
10192
- let balance = opts.media.balance;
10193
- let eq1 = opts.equalizer.sliders.preamp;
10194
- let eq2 = opts.equalizer.sliders["60"];
10195
- let eq3 = opts.equalizer.sliders["170"];
10196
- let eq4 = opts.equalizer.sliders["310"];
10197
- let eq5 = opts.equalizer.sliders["600"];
10198
- let eq6 = opts.equalizer.sliders["1000"];
10199
- let eq7 = opts.equalizer.sliders["3000"];
10200
- let eq8 = opts.equalizer.sliders["6000"];
10201
- let eq9 = opts.equalizer.sliders["12000"];
10202
- let eq10 = opts.equalizer.sliders["14000"];
10203
- let eq11 = opts.equalizer.sliders["16000"];
10204
- let equal = [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10, eq11];
10205
- let bands = [60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000];
10206
- this.webamp.store.dispatch({
10207
- type: "SET_VOLUME",
10208
- volume: clamp(vol, 0, 100)
10209
- });
10210
- this.webamp.store.dispatch({
10211
- type: "SET_BALANCE",
10212
- balance: balance
10213
- });
10214
- this.webamp.store.dispatch({
10215
- type: "SET_BAND_VALUE",
10216
- band: "preamp",
10217
- value: opts.equalizer.sliders.preamp
10218
- });
10219
-
10220
- for (const band of bands) {
10221
- this.webamp.store.dispatch({
10222
- type: "SET_BAND_VALUE",
10223
- band: band,
10224
- value: equal[i]
10225
- });
10226
- i++;
10227
- }
10228
-
10229
- if (window.__webamp.store.getState().media.shuffle !== opts.media.shuffle) {
10230
- this.webamp.store.dispatch({
10231
- type: "TOGGLE_SHUFFLE"
10232
- });
10233
- }
10234
-
10235
- if (window.__webamp.store.getState().media.repeat !== opts.media.repeat) {
10236
- this.webamp.store.dispatch({
10237
- type: "TOGGLE_REPEAT"
10238
- });
10239
- }
10240
- });
10241
-
10242
- if (emit !== false) {
10243
- var _window, _window$Telegram, _window2, _window2$Telegram;
10244
-
10245
- const lastList = this.getCookie('lastlist'); // @ts-ignore | because no global var telegram avail in project types
10246
-
10247
- this.telegram = (_window = window) === null || _window === void 0 ? void 0 : (_window$Telegram = _window.Telegram) === null || _window$Telegram === void 0 ? void 0 : _window$Telegram.WebApp;
10248
-
10249
- if (typeof lastList !== "undefined") {
10250
- this.getFiles(lastList);
10251
- }
10252
-
10253
- if (!window.__webamp) {
10254
- throw new Error("Webamp __webamp is undefined!!");
10255
- } else {
10256
- this.webamp = window.__webamp;
10257
- } // @ts-ignore | because no global var telegram avail in project types
10258
-
10259
-
10260
- if (!((_window2 = window) !== null && _window2 !== void 0 && (_window2$Telegram = _window2.Telegram) !== null && _window2$Telegram !== void 0 && _window2$Telegram.WebApp)) {
10261
- console.error("Telegram is undefined!! Skipping Telegram.WebApp event handler...");
10262
- }
10263
-
10264
- if (typeof localStorage.getItem('app-state') !== "undefined") {
10265
- this.loadOptions(JSON.parse(localStorage.getItem('app-state')));
10266
- }
10267
-
10268
- this.initializeApplicationHandlers();
10269
- }
10270
- }
10271
-
10272
- initializeTelegramWebAppEvents() {
10273
- this.telegram.offEvent("deactivated", () => {
10274
- this.updateAppState();
10275
- });
10276
- }
10277
-
10278
- initializeApplicationHandlers() {
10279
- const window_handlers = ['unload', 'beforeunload', 'pagehide'];
10280
- window_handlers.forEach(handler => {
10281
- window.addEventListener(handler, () => {
10282
- this.updateAppState();
10283
- });
10284
- });
10285
- this.webamp.onTrackDidChange(() => {
10286
- this.updateAppState();
10287
- });
10288
- this.webamp.onWillClose(() => {
10289
- this.updateAppState();
10290
- });
10291
- this.webamp.onClose(() => {
10292
- this.updateAppState();
10293
- });
10294
- this.webamp.onMinimize(() => {
10295
- this.updateAppState();
10296
- });
10297
- this.webamp.store.dispatch({
10298
- type: "ENABLE_MILKDROP",
10299
- open: false
10300
- });
10301
- const ev = ['ended', 'playing', 'timeupdate', 'fileLoaded', 'waiting', 'stopWaiting'];
10302
-
10303
- this.webamp.__onStateChange(() => {
10304
- this.updateAppState();
10305
- }); // this.webamp._actionEmitter.on('')
10306
-
10307
-
10308
- ev.forEach(ev => this.webamp.media.on(ev, () => {
10309
- this.updateAppState();
10310
- }));
10311
- }
10312
-
10313
- }
10314
- setTimeout(() => {
10315
- new webamp_telegram_handler_WinampTelegramCustomHandler(true);
10316
- }, 1000);
10317
10149
  // CONCATENATED MODULE: ./js/actionCreators/files.ts
10318
10150
 
10319
10151
 
@@ -10325,8 +10157,7 @@ setTimeout(() => {
10325
10157
 
10326
10158
 
10327
10159
 
10328
- // Lower is better
10329
-
10160
+ // Lower is better
10330
10161
  const DURATION_VISIBLE_PRIORITY = 5;
10331
10162
  const META_DATA_VISIBLE_PRIORITY = 10;
10332
10163
  const DURATION_PRIORITY = 15;
@@ -10343,7 +10174,7 @@ function addTracksFromReferences(fileReferences, loadStyle, atIndex) {
10343
10174
  }
10344
10175
  const SKIN_FILENAME_MATCHER = new RegExp("(wsz|zip)$", "i");
10345
10176
  const EQF_FILENAME_MATCHER = new RegExp("eqf$", "i");
10346
- function loadFilesFromReferences(fileReferences, loadStyle = LOAD_STYLE.PLAY, atIndex = undefined) {
10177
+ function loadFilesFromReferences(fileReferences, loadStyle = constants["e" /* LOAD_STYLE */].PLAY, atIndex = undefined) {
10347
10178
  return dispatch => {
10348
10179
  if (fileReferences.length < 1) {
10349
10180
  return;
@@ -10480,7 +10311,7 @@ function fetchMediaDuration(url, id) {
10480
10311
  });
10481
10312
  };
10482
10313
  }
10483
- function files_loadMedia(e, loadStyle = LOAD_STYLE.NONE, atIndex = 0) {
10314
+ function files_loadMedia(e, loadStyle = constants["e" /* LOAD_STYLE */].NONE, atIndex = 0) {
10484
10315
  const {
10485
10316
  files
10486
10317
  } = e.dataTransfer;
@@ -10499,23 +10330,23 @@ function files_loadMedia(e, loadStyle = LOAD_STYLE.NONE, atIndex = 0) {
10499
10330
  dispatch(loadFilesFromReferences(files, loadStyle, atIndex));
10500
10331
  };
10501
10332
  }
10502
- function files_loadMediaFiles(tracks, loadStyle = LOAD_STYLE.NONE, atIndex = 0) {
10333
+ function files_loadMediaFiles(tracks, loadStyle = constants["e" /* LOAD_STYLE */].NONE, atIndex = 0) {
10503
10334
  return dispatch => {
10504
- if (loadStyle === LOAD_STYLE.PLAY) {
10335
+ if (loadStyle === constants["e" /* LOAD_STYLE */].PLAY) {
10505
10336
  // I'm the worst. It just so happens that in every case that we autoPlay,
10506
10337
  // we should also clear all tracks.
10507
10338
  dispatch(playlist_removeAllTracks());
10508
10339
  }
10509
10340
 
10510
10341
  tracks.forEach((track, i) => {
10511
- const priority = i === 0 ? loadStyle : LOAD_STYLE.NONE;
10342
+ const priority = i === 0 ? loadStyle : constants["e" /* LOAD_STYLE */].NONE;
10512
10343
  dispatch(loadMediaFile(track, priority, atIndex + i));
10513
10344
  });
10514
10345
  };
10515
10346
  }
10516
- function loadMediaFile(track, priority = LOAD_STYLE.NONE, atIndex = 0) {
10347
+ function loadMediaFile(track, priority = constants["e" /* LOAD_STYLE */].NONE, atIndex = 0) {
10517
10348
  return dispatch => {
10518
- const id = uniqueId();
10349
+ const id = utils["D" /* uniqueId */]();
10519
10350
  const {
10520
10351
  defaultName,
10521
10352
  metaData,
@@ -10541,21 +10372,21 @@ function loadMediaFile(track, priority = LOAD_STYLE.NONE, atIndex = 0) {
10541
10372
  });
10542
10373
 
10543
10374
  switch (priority) {
10544
- case LOAD_STYLE.BUFFER:
10375
+ case constants["e" /* LOAD_STYLE */].BUFFER:
10545
10376
  dispatch({
10546
10377
  type: BUFFER_TRACK,
10547
10378
  id
10548
10379
  });
10549
10380
  break;
10550
10381
 
10551
- case LOAD_STYLE.PLAY:
10382
+ case constants["e" /* LOAD_STYLE */].PLAY:
10552
10383
  dispatch({
10553
10384
  type: PLAY_TRACK,
10554
10385
  id
10555
10386
  });
10556
10387
  break;
10557
10388
 
10558
- case LOAD_STYLE.NONE:
10389
+ case constants["e" /* LOAD_STYLE */].NONE:
10559
10390
  default:
10560
10391
  // If we're not going to load this right away,
10561
10392
  // we should set duration on our own
@@ -10671,10 +10502,10 @@ function setEqFromFileReference(fileReference) {
10671
10502
  }
10672
10503
  function files_setEqFromObject(preset) {
10673
10504
  return dispatch => {
10674
- dispatch(setPreamp(normalizeEqBand(preset.preamp)));
10675
- BANDS.forEach(band => {
10505
+ dispatch(setPreamp(utils["q" /* normalizeEqBand */](preset.preamp)));
10506
+ constants["a" /* BANDS */].forEach(band => {
10676
10507
  // @ts-ignore band and EqfPreset align
10677
- dispatch(setEqBand(band, normalizeEqBand(preset[`hz${band}`])));
10508
+ dispatch(setEqBand(band, utils["q" /* normalizeEqBand */](preset[`hz${band}`])));
10678
10509
  });
10679
10510
  };
10680
10511
  }
@@ -10683,15 +10514,15 @@ function files_downloadPreset() {
10683
10514
  const state = getState();
10684
10515
  const data = getEqfData(state);
10685
10516
  const arrayBuffer = Object(winamp_eqf["creator"])(data);
10686
- const base64 = base64FromArrayBuffer(arrayBuffer);
10517
+ const base64 = utils["a" /* base64FromArrayBuffer */](arrayBuffer);
10687
10518
  const dataURI = `data:application/zip;base64,${base64}`;
10688
- downloadURI(dataURI, "entry.eqf");
10519
+ utils["f" /* downloadURI */](dataURI, "entry.eqf");
10689
10520
  };
10690
10521
  }
10691
10522
  function files_downloadHtmlPlaylist() {
10692
10523
  return (dispatch, getState) => {
10693
10524
  const uri = getPlaylistURL(getState());
10694
- downloadURI(uri, "Winamp Playlist.html");
10525
+ utils["f" /* downloadURI */](uri, "Winamp Playlist.html");
10695
10526
  };
10696
10527
  }
10697
10528
  let el = document.createElement("input");
@@ -10706,7 +10537,7 @@ el = null;
10706
10537
  function files_addFilesAtIndex(nextIndex) {
10707
10538
  return async dispatch => {
10708
10539
  const fileReferences = await promptForFileReferences();
10709
- dispatch(addTracksFromReferences(fileReferences, LOAD_STYLE.NONE, nextIndex));
10540
+ dispatch(addTracksFromReferences(fileReferences, constants["e" /* LOAD_STYLE */].NONE, nextIndex));
10710
10541
  };
10711
10542
  }
10712
10543
  function files_addDirAtIndex(nextIndex) {
@@ -10719,31 +10550,23 @@ function files_addDirAtIndex(nextIndex) {
10719
10550
  const fileReferences = await promptForFileReferences({
10720
10551
  directory: true
10721
10552
  });
10722
- dispatch(addTracksFromReferences(fileReferences, LOAD_STYLE.NONE, nextIndex));
10553
+ dispatch(addTracksFromReferences(fileReferences, constants["e" /* LOAD_STYLE */].NONE, nextIndex));
10723
10554
  };
10724
10555
  }
10725
10556
  function files_addFilesFromUrl(atIndex = 0) {
10726
10557
  return async (dispatch, getState, {
10727
10558
  handleAddUrlEvent
10728
10559
  }) => {
10729
- await new webamp_telegram_handler_WinampTelegramCustomHandler(false).getFiles(prompt('Enter playlist link'));
10560
+ if (handleAddUrlEvent) {} else console.log(0x0fff21);
10730
10561
  };
10731
10562
  }
10732
10563
  function files_addFilesFromList() {
10733
10564
  return async (dispatch, getState, {
10734
10565
  handleLoadListEvent
10735
10566
  }) => {
10736
- if (handleLoadListEvent) {
10737
- const tracks = await handleLoadListEvent();
10567
+ var _await;
10738
10568
 
10739
- if (tracks != null) {
10740
- dispatch(playlist_removeAllTracks());
10741
- dispatch(files_loadMediaFiles(tracks, LOAD_STYLE.NONE, 0));
10742
- return;
10743
- }
10744
- } else {
10745
- alert("Not supported in Webamp");
10746
- }
10569
+ (_await = await handleLoadListEvent()) !== null && _await !== void 0 ? _await : console.log('no event provided');
10747
10570
  };
10748
10571
  }
10749
10572
  function files_saveFilesToList() {
@@ -11094,7 +10917,7 @@ function toggleMilkdropFullscreen() {
11094
10917
  function actionCreators_togglePresetOverlay() {
11095
10918
  return (dispatch, getState) => {
11096
10919
  if (getPresetOverlayOpen(getState())) {
11097
- dispatch(windows_setFocusedWindow(WINDOWS.MILKDROP));
10920
+ dispatch(windows_setFocusedWindow(constants["m" /* WINDOWS */].MILKDROP));
11098
10921
  }
11099
10922
 
11100
10923
  dispatch({
@@ -11248,7 +11071,7 @@ function actionCreators_stepMarquee() {
11248
11071
 
11249
11072
  media.setVolume(getVolume(state));
11250
11073
  media.setBalance(getBalance(state));
11251
- objectForEach(state.equalizer.sliders, (value, slider) => {
11074
+ Object(utils["s" /* objectForEach */])(state.equalizer.sliders, (value, slider) => {
11252
11075
  if (slider === "preamp") {
11253
11076
  media.setPreamp(value);
11254
11077
  } else {
@@ -11280,7 +11103,7 @@ const compose = Object(redux_devtools_extension["composeWithDevTools"])({
11280
11103
  let initialState;
11281
11104
 
11282
11105
  if (stateOverrides) {
11283
- initialState = merge(reducers(undefined, {
11106
+ initialState = Object(utils["o" /* merge */])(reducers(undefined, {
11284
11107
  type: "@@init"
11285
11108
  }), stateOverrides);
11286
11109
  }
@@ -11297,7 +11120,7 @@ const compose = Object(redux_devtools_extension["composeWithDevTools"])({
11297
11120
  return store;
11298
11121
  });
11299
11122
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/fscreen/lib/index.js
11300
- var fscreen_lib = __webpack_require__(13);
11123
+ var fscreen_lib = __webpack_require__(15);
11301
11124
  var fscreen_lib_default = /*#__PURE__*/__webpack_require__.n(fscreen_lib);
11302
11125
 
11303
11126
  // CONCATENATED MODULE: ./js/components/Fullscreen.tsx
@@ -11388,14 +11211,14 @@ function usePromiseValueOrNull(propValue) {
11388
11211
  return value;
11389
11212
  }
11390
11213
  function useScreenSize() {
11391
- const [size] = Object(react["useState"])(getScreenSize()); // TODO: We could subscribe to screen size changes.
11214
+ const [size] = Object(react["useState"])(utils["h" /* getScreenSize */]()); // TODO: We could subscribe to screen size changes.
11392
11215
 
11393
11216
  return size;
11394
11217
  }
11395
11218
  function useWindowSize() {
11396
- const [size, setSize] = Object(react["useState"])(utils_getWindowSize());
11397
- const handler = Object(react["useCallback"])(throttle(() => {
11398
- setSize(utils_getWindowSize());
11219
+ const [size, setSize] = Object(react["useState"])(utils["k" /* getWindowSize */]());
11220
+ const handler = Object(react["useCallback"])(utils["C" /* throttle */](() => {
11221
+ setSize(utils["k" /* getWindowSize */]());
11399
11222
  }, 100), []);
11400
11223
  Object(react["useEffect"])(() => {
11401
11224
  window.addEventListener("resize", handler);
@@ -11512,11 +11335,11 @@ function useTypedDispatch() {
11512
11335
  return useDispatch();
11513
11336
  }
11514
11337
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/classnames/index.js
11515
- var classnames = __webpack_require__(4);
11338
+ var classnames = __webpack_require__(6);
11516
11339
  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
11517
11340
 
11518
11341
  // EXTERNAL MODULE: ./css/gen-window.css
11519
- var gen_window = __webpack_require__(68);
11342
+ var gen_window = __webpack_require__(70);
11520
11343
 
11521
11344
  // CONCATENATED MODULE: ./js/components/ResizeTarget.tsx
11522
11345
 
@@ -11549,10 +11372,10 @@ function ResizeTarget(props) {
11549
11372
  const [width, height] = currentSize;
11550
11373
 
11551
11374
  const handleMove = ee => {
11552
- const x = getX(ee) - mouseStart.x;
11553
- const y = getY(ee) - mouseStart.y;
11554
- const newWidth = Math.max(0, width + Math.round(x / WINDOW_RESIZE_SEGMENT_WIDTH));
11555
- const newHeight = widthOnly ? width : Math.max(0, height + Math.round(y / WINDOW_RESIZE_SEGMENT_HEIGHT));
11375
+ const x = utils["l" /* getX */](ee) - mouseStart.x;
11376
+ const y = utils["m" /* getY */](ee) - mouseStart.y;
11377
+ const newWidth = Math.max(0, width + Math.round(x / constants["o" /* WINDOW_RESIZE_SEGMENT_WIDTH */]));
11378
+ const newHeight = widthOnly ? width : Math.max(0, height + Math.round(y / constants["n" /* WINDOW_RESIZE_SEGMENT_HEIGHT */]));
11556
11379
  const newSize = [newWidth, newHeight];
11557
11380
  props.setWindowSize(newSize);
11558
11381
  };
@@ -11575,8 +11398,8 @@ function ResizeTarget(props) {
11575
11398
 
11576
11399
  const handleMouseDown = e => {
11577
11400
  setMouseStart({
11578
- x: getX(e),
11579
- y: getY(e)
11401
+ x: utils["l" /* getX */](e),
11402
+ y: utils["m" /* getY */](e)
11580
11403
  });
11581
11404
  setMouseDown(true);
11582
11405
  };
@@ -11803,7 +11626,7 @@ function Visualizer({
11803
11626
  const currentPreset = useTypedSelector(getCurrentPreset);
11804
11627
  const transitionType = useTypedSelector(getPresetTransitionType);
11805
11628
  const message = useTypedSelector(getMilkdropMessage);
11806
- const isEnabledVisualizer = visualizerStyle === VISUALIZERS.MILKDROP;
11629
+ const isEnabledVisualizer = visualizerStyle === constants["k" /* VISUALIZERS */].MILKDROP;
11807
11630
  const canvasRef = Object(react["useRef"])(null);
11808
11631
  const [visualizer, setVisualizer] = Object(react["useState"])(null); // Initialize the visualizer
11809
11632
 
@@ -11909,7 +11732,7 @@ function Visualizer({
11909
11732
 
11910
11733
  /* harmony default export */ var MilkdropWindow_Visualizer = (Visualizer);
11911
11734
  // EXTERNAL MODULE: ./css/milkdrop-window.css
11912
- var milkdrop_window = __webpack_require__(71);
11735
+ var milkdrop_window = __webpack_require__(73);
11913
11736
 
11914
11737
  // CONCATENATED MODULE: ./js/components/MilkdropWindow/Background.tsx
11915
11738
 
@@ -12125,7 +11948,7 @@ function getRangeCenteredOnIndex(length, maxRangeSize, indexToCenter) {
12125
11948
  const rangeSize = Math.min(length, maxRangeSize);
12126
11949
  const halfRangeSize = Math.floor(rangeSize / 2);
12127
11950
  const idealStartIndex = indexToCenter - halfRangeSize;
12128
- const startIndex = clamp(idealStartIndex, 0, length - rangeSize);
11951
+ const startIndex = Object(utils["d" /* clamp */])(idealStartIndex, 0, length - rangeSize);
12129
11952
  const endIndex = startIndex + rangeSize - 1;
12130
11953
  return [startIndex, endIndex];
12131
11954
  }
@@ -12191,7 +12014,7 @@ const DropTarget = props => {
12191
12014
 
12192
12015
  /* harmony default export */ var components_DropTarget = (DropTarget);
12193
12016
  // EXTERNAL MODULE: ./css/context-menu.css
12194
- var context_menu = __webpack_require__(73);
12017
+ var context_menu = __webpack_require__(75);
12195
12018
 
12196
12019
  // CONCATENATED MODULE: ./js/components/ContextMenu.tsx
12197
12020
 
@@ -12405,7 +12228,7 @@ const MilkdropContextMenu = props => {
12405
12228
  label: "Desktop Mode",
12406
12229
  hotkey: "Alt+D"
12407
12230
  }), /*#__PURE__*/Object(jsx_runtime["jsx"])(ContextMenu_Hr, {}), /*#__PURE__*/Object(jsx_runtime["jsx"])(Node, {
12408
- onClick: () => closeWindow(WINDOWS.MILKDROP),
12231
+ onClick: () => closeWindow(constants["m" /* WINDOWS */].MILKDROP),
12409
12232
  label: "Quit"
12410
12233
  })]
12411
12234
  });
@@ -12552,14 +12375,14 @@ function Milkdrop({
12552
12375
 
12553
12376
  return /*#__PURE__*/Object(jsx_runtime["jsx"])(components_GenWindow, {
12554
12377
  title: "Milkdrop",
12555
- windowId: WINDOWS.MILKDROP,
12378
+ windowId: constants["m" /* WINDOWS */].MILKDROP,
12556
12379
  onKeyDown: handleKeyDown,
12557
12380
  children: genWindowSize => {
12558
12381
  const size = fullscreen ? screenSize : genWindowSize;
12559
12382
  return /*#__PURE__*/Object(jsx_runtime["jsx"])(MilkdropWindow_MilkdropContextMenu, {
12560
12383
  children: /*#__PURE__*/Object(jsx_runtime["jsx"])(MilkdropWindow_Background, {
12561
12384
  children: /*#__PURE__*/Object(jsx_runtime["jsxs"])(components_DropTarget, {
12562
- windowId: WINDOWS.MILKDROP,
12385
+ windowId: constants["m" /* WINDOWS */].MILKDROP,
12563
12386
  handleDrop: handlePresetDrop,
12564
12387
  children: [overlay && /*#__PURE__*/Object(jsx_runtime["jsx"])(MilkdropWindow_PresetOverlay, MilkdropWindow_objectSpread({}, size)), /*#__PURE__*/Object(jsx_runtime["jsx"])(Fullscreen, {
12565
12388
  enabled: fullscreen,
@@ -12692,12 +12515,12 @@ const OptionsContextMenu = () => {
12692
12515
  label: "Time elapsed",
12693
12516
  hotkey: "(Ctrl+T toggles)",
12694
12517
  onClick: toggleTimeMode,
12695
- checked: timeMode === TIME_MODE.ELAPSED
12518
+ checked: timeMode === constants["h" /* TIME_MODE */].ELAPSED
12696
12519
  }), /*#__PURE__*/Object(jsx_runtime["jsx"])(Node, {
12697
12520
  label: "Time remaining",
12698
12521
  hotkey: "(Ctrl+T toggles)",
12699
12522
  onClick: toggleTimeMode,
12700
- checked: timeMode === TIME_MODE.REMAINING
12523
+ checked: timeMode === constants["h" /* TIME_MODE */].REMAINING
12701
12524
  }), /*#__PURE__*/Object(jsx_runtime["jsx"])(Node, {
12702
12525
  label: "Double Size",
12703
12526
  hotkey: "Ctrl+D",
@@ -12766,7 +12589,7 @@ const MainContextMenu = Object(react["memo"])(({
12766
12589
  console.error("Error loading from file picker", e);
12767
12590
  }
12768
12591
 
12769
- loadMediaFiles(files || [], LOAD_STYLE.PLAY);
12592
+ loadMediaFiles(files || [], constants["e" /* LOAD_STYLE */].PLAY);
12770
12593
  },
12771
12594
  label: picker.contextMenuName
12772
12595
  }, i))]
@@ -12832,8 +12655,8 @@ function useHandleMouseDown(propsWindows) {
12832
12655
 
12833
12656
  const handleMouseMove = ee => {
12834
12657
  const proposedDiff = {
12835
- x: getX(ee) - mouseStart.x,
12836
- y: getY(ee) - mouseStart.y
12658
+ x: utils["l" /* getX */](ee) - mouseStart.x,
12659
+ y: utils["m" /* getY */](ee) - mouseStart.y
12837
12660
  };
12838
12661
  const proposedWindows = moving.map(node => WindowManager_objectSpread(WindowManager_objectSpread({}, node), applyDiff(node, proposedDiff)));
12839
12662
 
@@ -12874,8 +12697,8 @@ function useHandleMouseDown(propsWindows) {
12874
12697
  return;
12875
12698
  }
12876
12699
 
12877
- const x = getX(e);
12878
- const y = getY(e);
12700
+ const x = utils["l" /* getX */](e);
12701
+ const y = utils["m" /* getY */](e);
12879
12702
 
12880
12703
  if (getWindowHidden(key)) {
12881
12704
  // The user may be clicking on full screen Milkdrop.
@@ -12953,7 +12776,7 @@ function WindowManager({
12953
12776
  });
12954
12777
  }
12955
12778
  // EXTERNAL MODULE: /home/exezt-/Projects/webamp/node_modules/lodash/deburr.js
12956
- var deburr = __webpack_require__(40);
12779
+ var deburr = __webpack_require__(42);
12957
12780
  var deburr_default = /*#__PURE__*/__webpack_require__.n(deburr);
12958
12781
 
12959
12782
  // CONCATENATED MODULE: ./js/components/Character.tsx
@@ -12982,7 +12805,7 @@ const Character = react["memo"]((_ref) => {
12982
12805
  });
12983
12806
  /* harmony default export */ var components_Character = (Character);
12984
12807
  // EXTERNAL MODULE: ./css/mini-time.css
12985
- var mini_time = __webpack_require__(88);
12808
+ var mini_time = __webpack_require__(90);
12986
12809
 
12987
12810
  // CONCATENATED MODULE: ./js/components/MiniTime.tsx
12988
12811
 
@@ -13019,16 +12842,16 @@ const MiniTime = () => {
13019
12842
  let seconds = null; // TODO: Clean this up: If stopped, just render the background, rather than
13020
12843
  // rendering spaces twice.
13021
12844
 
13022
- if (status !== MEDIA_STATUS.STOPPED && duration != null) {
13023
- seconds = timeMode === TIME_MODE.ELAPSED ? timeElapsed : duration - timeElapsed;
12845
+ if (status !== constants["f" /* MEDIA_STATUS */].STOPPED && duration != null) {
12846
+ seconds = timeMode === constants["h" /* TIME_MODE */].ELAPSED ? timeElapsed : duration - timeElapsed;
13024
12847
  }
13025
12848
 
13026
- const timeObj = getTimeObj(seconds);
13027
- const showMinus = timeMode === TIME_MODE.REMAINING && status !== MEDIA_STATUS.STOPPED;
12849
+ const timeObj = Object(utils["i" /* getTimeObj */])(seconds);
12850
+ const showMinus = timeMode === constants["h" /* TIME_MODE */].REMAINING && status !== constants["f" /* MEDIA_STATUS */].STOPPED;
13028
12851
  return /*#__PURE__*/Object(jsx_runtime["jsxs"])("div", {
13029
12852
  onClick: toggle,
13030
12853
  className: classnames_default()("mini-time", "countdown", {
13031
- blinking: status === MEDIA_STATUS.PAUSED
12854
+ blinking: status === constants["f" /* MEDIA_STATUS */].PAUSED
13032
12855
  }),
13033
12856
  children: [/*#__PURE__*/Object(jsx_runtime["jsx"])(MiniTime_Background, {}), /*#__PURE__*/Object(jsx_runtime["jsx"])(components_Character, {
13034
12857
  style: {
@@ -13485,7 +13308,7 @@ function Visualizer_Visualizer({
13485
13308
  renderHeight
13486
13309
  });
13487
13310
  const paintFrame = Object(react["useCallback"])(canvasCtx => {
13488
- if (status !== MEDIA_STATUS.PLAYING) {
13311
+ if (status !== constants["f" /* MEDIA_STATUS */].PLAYING) {
13489
13312
  return;
13490
13313
  }
13491
13314
 
@@ -13498,12 +13321,12 @@ function Visualizer_Visualizer({
13498
13321
  }
13499
13322
 
13500
13323
  switch (style) {
13501
- case VISUALIZERS.OSCILLOSCOPE:
13324
+ case constants["k" /* VISUALIZERS */].OSCILLOSCOPE:
13502
13325
  canvasCtx.drawImage(bgCanvas, 0, 0);
13503
13326
  paintOscilloscopeFrame(canvasCtx);
13504
13327
  break;
13505
13328
 
13506
- case VISUALIZERS.BAR:
13329
+ case constants["k" /* VISUALIZERS */].BAR:
13507
13330
  canvasCtx.drawImage(bgCanvas, 0, 0);
13508
13331
  paintBarFrame(canvasCtx);
13509
13332
  break;
@@ -13540,7 +13363,7 @@ function Visualizer_Visualizer({
13540
13363
  };
13541
13364
  }, [canvas, paintFrame]);
13542
13365
 
13543
- if (status === MEDIA_STATUS.STOPPED) {
13366
+ if (status === constants["f" /* MEDIA_STATUS */].STOPPED) {
13544
13367
  return null;
13545
13368
  }
13546
13369
 
@@ -13909,7 +13732,7 @@ function useDragX() {
13909
13732
  const xStart = mouseDownX;
13910
13733
 
13911
13734
  const handleMouseMove = ee => {
13912
- const diff = getX(ee) - xStart;
13735
+ const diff = utils["l" /* getX */](ee) - xStart;
13913
13736
  setDragOffset(-diff);
13914
13737
  }; // TODO: Use `once` or something instead of this flag nonsense
13915
13738
 
@@ -13936,7 +13759,7 @@ function useDragX() {
13936
13759
  return handleMouseUp;
13937
13760
  }, [mouseDownX]);
13938
13761
  const handleMouseDown = react["useCallback"](e => {
13939
- setMouseDownX(getX(e));
13762
+ setMouseDownX(utils["l" /* getX */](e));
13940
13763
  }, []);
13941
13764
  return {
13942
13765
  handleMouseDown,
@@ -14184,13 +14007,13 @@ const Time = Object(react["memo"])(() => {
14184
14007
  const timeElapsed = useTypedSelector(getTimeElapsed);
14185
14008
  const duration = useTypedSelector(getDuration) || 0;
14186
14009
  const timeMode = useTypedSelector(getTimeMode);
14187
- const seconds = timeMode === TIME_MODE.ELAPSED ? timeElapsed : duration - timeElapsed;
14188
- const timeObj = getTimeObj(seconds);
14010
+ const seconds = timeMode === constants["h" /* TIME_MODE */].ELAPSED ? timeElapsed : duration - timeElapsed;
14011
+ const timeObj = utils["i" /* getTimeObj */](seconds);
14189
14012
  return /*#__PURE__*/Object(jsx_runtime["jsxs"])("div", {
14190
14013
  id: "time",
14191
14014
  onClick: toggleTimeMode,
14192
14015
  className: "countdown",
14193
- children: [timeMode === TIME_MODE.REMAINING && /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
14016
+ children: [timeMode === constants["h" /* TIME_MODE */].REMAINING && /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
14194
14017
  id: "minus-sign"
14195
14018
  }), /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
14196
14019
  id: "minute-first-digit",
@@ -14272,7 +14095,7 @@ const MainVolume = Object(react["memo"])(() => {
14272
14095
  });
14273
14096
  /* harmony default export */ var MainWindow_MainVolume = (MainVolume);
14274
14097
  // EXTERNAL MODULE: ./css/main-window.css
14275
- var main_window = __webpack_require__(90);
14098
+ var main_window = __webpack_require__(92);
14276
14099
 
14277
14100
  // CONCATENATED MODULE: ./js/components/MainWindow/index.tsx
14278
14101
 
@@ -14311,7 +14134,7 @@ var main_window = __webpack_require__(90);
14311
14134
 
14312
14135
 
14313
14136
  function loadMediaAndPlay(e) {
14314
- return files_loadMedia(e, LOAD_STYLE.PLAY);
14137
+ return files_loadMedia(e, constants["e" /* LOAD_STYLE */].PLAY);
14315
14138
  }
14316
14139
 
14317
14140
  const MainWindow = react["memo"](({
@@ -14327,10 +14150,10 @@ const MainWindow = react["memo"](({
14327
14150
  const working = useTypedSelector(getWorking);
14328
14151
  const className = classnames_default()({
14329
14152
  window: true,
14330
- play: status === MEDIA_STATUS.PLAYING,
14331
- stop: status === MEDIA_STATUS.STOPPED,
14332
- pause: status === MEDIA_STATUS.PAUSED,
14333
- selected: focused === WINDOWS.MAIN,
14153
+ play: status === constants["f" /* MEDIA_STATUS */].PLAYING,
14154
+ stop: status === constants["f" /* MEDIA_STATUS */].STOPPED,
14155
+ pause: status === constants["f" /* MEDIA_STATUS */].PAUSED,
14156
+ selected: focused === constants["m" /* WINDOWS */].MAIN,
14334
14157
  shade: mainShade,
14335
14158
  draggable: true,
14336
14159
  loading,
@@ -14342,12 +14165,12 @@ const MainWindow = react["memo"](({
14342
14165
  const loadMedia = useActionCreator(loadMediaAndPlay);
14343
14166
  return /*#__PURE__*/Object(jsx_runtime["jsx"])(components_DropTarget, {
14344
14167
  id: "main-window",
14345
- windowId: WINDOWS.MAIN,
14168
+ windowId: constants["m" /* WINDOWS */].MAIN,
14346
14169
  className: className,
14347
14170
  handleDrop: loadMedia,
14348
14171
  onWheel: scrollVolume,
14349
14172
  children: /*#__PURE__*/Object(jsx_runtime["jsxs"])(components_FocusTarget, {
14350
- windowId: WINDOWS.MAIN,
14173
+ windowId: constants["m" /* WINDOWS */].MAIN,
14351
14174
  children: [/*#__PURE__*/Object(jsx_runtime["jsxs"])("div", {
14352
14175
  id: "title-bar",
14353
14176
  className: "selected draggable",
@@ -14441,26 +14264,26 @@ function PlaylistShade() {
14441
14264
  const closeWindow = useActionCreator(windows_closeWindow);
14442
14265
  const toggleShade = useActionCreator(togglePlaylistShadeMode);
14443
14266
  const focusWindow = useActionCreator(windows_setFocusedWindow);
14444
- const addedWidth = playlistSize[0] * WINDOW_RESIZE_SEGMENT_WIDTH;
14267
+ const addedWidth = playlistSize[0] * constants["o" /* WINDOW_RESIZE_SEGMENT_WIDTH */];
14445
14268
  const trimmedName = Object(react["useMemo"])(() => {
14446
14269
  if (name == null) {
14447
14270
  return "[No file]";
14448
14271
  }
14449
14272
 
14450
14273
  const MIN_NAME_WIDTH = 205;
14451
- const nameLength = (MIN_NAME_WIDTH + addedWidth) / CHARACTER_WIDTH;
14452
- return name.length > nameLength ? name.slice(0, nameLength - 1) + UTF8_ELLIPSIS : name;
14274
+ const nameLength = (MIN_NAME_WIDTH + addedWidth) / constants["b" /* CHARACTER_WIDTH */];
14275
+ return name.length > nameLength ? name.slice(0, nameLength - 1) + constants["j" /* UTF8_ELLIPSIS */] : name;
14453
14276
  }, [addedWidth, name]);
14454
14277
  const time = Object(react["useMemo"])(() => {
14455
- return name == null ? "" : getTimeStr(duration);
14278
+ return name == null ? "" : Object(utils["j" /* getTimeStr */])(duration);
14456
14279
  }, [duration, name]);
14457
14280
  return /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
14458
14281
  id: "playlist-window-shade",
14459
14282
  className: classnames_default()("window", "draggable", {
14460
- selected: focused === WINDOWS.PLAYLIST
14283
+ selected: focused === constants["m" /* WINDOWS */].PLAYLIST
14461
14284
  }),
14462
14285
  style: {
14463
- width: `${WINDOW_WIDTH + addedWidth}px`
14286
+ width: `${constants["p" /* WINDOW_WIDTH */] + addedWidth}px`
14464
14287
  },
14465
14288
  onMouseDown: () => focusWindow("playlist"),
14466
14289
  onDoubleClick: toggleShade,
@@ -14961,7 +14784,7 @@ function TrackList() {
14961
14784
 
14962
14785
  const _handleMoveClick = e => {
14963
14786
  setMoving(true);
14964
- setMouseStartY(getY(e));
14787
+ setMouseStartY(utils["m" /* getY */](e));
14965
14788
  };
14966
14789
 
14967
14790
  Object(react["useEffect"])(() => {
@@ -14978,15 +14801,15 @@ function TrackList() {
14978
14801
  let lastDiff = 0;
14979
14802
 
14980
14803
  const handleMouseMove = ee => {
14981
- const x = getX(ee);
14982
- const y = getY(ee);
14804
+ const x = utils["l" /* getX */](ee);
14805
+ const y = utils["m" /* getY */](ee);
14983
14806
 
14984
14807
  if (y < top || y > bottom || x < left || x > right) {
14985
14808
  // Mouse is outside the track list
14986
14809
  return;
14987
14810
  }
14988
14811
 
14989
- const proposedDiff = Math.floor((y - mouseStartY) / TRACK_HEIGHT);
14812
+ const proposedDiff = Math.floor((y - mouseStartY) / constants["i" /* TRACK_HEIGHT */]);
14990
14813
 
14991
14814
  if (proposedDiff !== lastDiff) {
14992
14815
  const diffDiff = proposedDiff - lastDiff;
@@ -15061,7 +14884,7 @@ function TrackList() {
15061
14884
  }))
15062
14885
  }), /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
15063
14886
  className: "playlist-track-durations",
15064
- children: _renderTracks(id => getTimeStr(tracks[id].duration))
14887
+ children: _renderTracks(id => utils["j" /* getTimeStr */](tracks[id].duration))
15065
14888
  })]
15066
14889
  });
15067
14890
  }
@@ -15125,7 +14948,7 @@ function VerticalSlider({
15125
14948
  // Ensure dragging does not cause elements/text to be selected.
15126
14949
  // https://stackoverflow.com/a/19164149/1263117
15127
14950
  const startOffset = y - baseOffset;
15128
- onChange(clamp(startOffset / spanSize, 0, 1));
14951
+ onChange(utils["d" /* clamp */](startOffset / spanSize, 0, 1));
15129
14952
  }
15130
14953
 
15131
14954
  if (touch) {
@@ -15230,7 +15053,7 @@ const Handle = () => /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
15230
15053
 
15231
15054
  function PlaylistScrollBar() {
15232
15055
  const getWindowPixelSize = useTypedSelector(selectors_getWindowPixelSize);
15233
- const playlistHeight = getWindowPixelSize(WINDOWS.PLAYLIST).height;
15056
+ const playlistHeight = getWindowPixelSize(constants["m" /* WINDOWS */].PLAYLIST).height;
15234
15057
  const playlistScrollPosition = useTypedSelector(getPlaylistScrollPosition);
15235
15058
  const allTracksAreVisible = useTypedSelector(getAllTracksAreVisible);
15236
15059
  const setPlaylistScrollPosition = useActionCreator(playlist_setPlaylistScrollPosition);
@@ -15251,7 +15074,7 @@ function PlaylistScrollBar() {
15251
15074
  });
15252
15075
  }
15253
15076
  // EXTERNAL MODULE: ./css/playlist-window.css
15254
- var playlist_window = __webpack_require__(92);
15077
+ var playlist_window = __webpack_require__(94);
15255
15078
 
15256
15079
  // CONCATENATED MODULE: ./js/components/PlaylistWindow/index.tsx
15257
15080
 
@@ -15293,10 +15116,10 @@ function PlaylistWindow_PlaylistWindow({
15293
15116
  const maxTrackIndex = useTypedSelector(_maxTrackIndex);
15294
15117
  const skinPlaylistStyle = useTypedSelector(getSkinPlaylistStyle);
15295
15118
  const getWindowPixelSize = useTypedSelector(selectors_getWindowPixelSize);
15296
- const selected = selectedWindow === WINDOWS.PLAYLIST;
15297
- const playlistShade = Boolean(getWindowShade(WINDOWS.PLAYLIST));
15298
- const playlistSize = getWindowSize(WINDOWS.PLAYLIST);
15299
- const playlistWindowPixelSize = getWindowPixelSize(WINDOWS.PLAYLIST);
15119
+ const selected = selectedWindow === constants["m" /* WINDOWS */].PLAYLIST;
15120
+ const playlistShade = Boolean(getWindowShade(constants["m" /* WINDOWS */].PLAYLIST));
15121
+ const playlistSize = getWindowSize(constants["m" /* WINDOWS */].PLAYLIST);
15122
+ const playlistWindowPixelSize = getWindowPixelSize(constants["m" /* WINDOWS */].PLAYLIST);
15300
15123
  const close = useActionCreator(windows_closeWindow);
15301
15124
  const toggleShade = useActionCreator(togglePlaylistShadeMode);
15302
15125
  const scrollUpFourTracks = useActionCreator(playlist_scrollUpFourTracks);
@@ -15304,11 +15127,11 @@ function PlaylistWindow_PlaylistWindow({
15304
15127
  const scrollVolume = useActionCreator(media_scrollVolume);
15305
15128
  const loadMedia = useActionCreator(files_loadMedia);
15306
15129
  const showVisualizer = playlistSize[0] > 2;
15307
- const activateVisualizer = !getWindowOpen(WINDOWS.MAIN);
15130
+ const activateVisualizer = !getWindowOpen(constants["m" /* WINDOWS */].MAIN);
15308
15131
  const handleDrop = Object(react["useCallback"])((e, targetCoords) => {
15309
15132
  const top = e.clientY - targetCoords.y;
15310
- const atIndex = clamp(offset + Math.round((top - 23) / TRACK_HEIGHT), 0, maxTrackIndex + 1);
15311
- loadMedia(e, LOAD_STYLE.NONE, atIndex);
15133
+ const atIndex = Object(utils["d" /* clamp */])(offset + Math.round((top - 23) / constants["i" /* TRACK_HEIGHT */]), 0, maxTrackIndex + 1);
15134
+ loadMedia(e, constants["e" /* LOAD_STYLE */].NONE, atIndex);
15312
15135
  }, [loadMedia, maxTrackIndex, offset]);
15313
15136
 
15314
15137
  if (playlistShade) {
@@ -15327,10 +15150,10 @@ function PlaylistWindow_PlaylistWindow({
15327
15150
  });
15328
15151
  const showSpacers = playlistSize[0] % 2 === 0;
15329
15152
  return /*#__PURE__*/Object(jsx_runtime["jsx"])(components_FocusTarget, {
15330
- windowId: WINDOWS.PLAYLIST,
15153
+ windowId: constants["m" /* WINDOWS */].PLAYLIST,
15331
15154
  children: /*#__PURE__*/Object(jsx_runtime["jsxs"])(components_DropTarget, {
15332
15155
  id: "playlist-window",
15333
- windowId: WINDOWS.PLAYLIST,
15156
+ windowId: constants["m" /* WINDOWS */].PLAYLIST,
15334
15157
  className: classes,
15335
15158
  style: style,
15336
15159
  handleDrop: handleDrop,
@@ -15357,7 +15180,7 @@ function PlaylistWindow_PlaylistWindow({
15357
15180
  onClick: toggleShade
15358
15181
  }), /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
15359
15182
  id: "playlist-close-button",
15360
- onClick: () => close(WINDOWS.PLAYLIST)
15183
+ onClick: () => close(constants["m" /* WINDOWS */].PLAYLIST)
15361
15184
  })]
15362
15185
  })]
15363
15186
  }), /*#__PURE__*/Object(jsx_runtime["jsxs"])("div", {
@@ -15678,9 +15501,9 @@ function drawEqLine({
15678
15501
  canvasCtx,
15679
15502
  preampLineImage
15680
15503
  }) {
15681
- const preampValue = percentToRange(sliders.preamp / 100, 0, GRAPH_HEIGHT - 1);
15504
+ const preampValue = Object(utils["x" /* percentToRange */])(sliders.preamp / 100, 0, GRAPH_HEIGHT - 1);
15682
15505
  canvasCtx.drawImage(preampLineImage, 0, preampValue, preampLineImage.width, preampLineImage.height);
15683
- const amplitudes = BANDS.map(band => sliders[band]);
15506
+ const amplitudes = constants["a" /* BANDS */].map(band => sliders[band]);
15684
15507
  canvasCtx.fillStyle = colorPattern;
15685
15508
  const paddingLeft = 2; // TODO: This should be 1.5
15686
15509
 
@@ -15692,14 +15515,14 @@ function drawEqLine({
15692
15515
  const percent = (100 - value) / 100; // Each band is 12 pixels widex
15693
15516
 
15694
15517
  xs.push(i * 12);
15695
- ys.push(percentToRange(percent, min, max));
15518
+ ys.push(Object(utils["x" /* percentToRange */])(percent, min, max));
15696
15519
  });
15697
15520
  const allYs = spline(xs, ys);
15698
15521
  const maxX = xs[xs.length - 1];
15699
15522
  let lastY = ys[0];
15700
15523
 
15701
15524
  for (let x = 0; x <= maxX; x++) {
15702
- const y = clamp(Math.round(allYs[x]), 0, GRAPH_HEIGHT - 1);
15525
+ const y = Object(utils["d" /* clamp */])(Math.round(allYs[x]), 0, GRAPH_HEIGHT - 1);
15703
15526
  const yTop = Math.min(y, lastY);
15704
15527
  const height = 1 + Math.abs(lastY - y);
15705
15528
  canvasCtx.fillRect(paddingLeft + x, yTop, 1, height);
@@ -15709,7 +15532,7 @@ function drawEqLine({
15709
15532
 
15710
15533
  /* harmony default export */ var EqualizerWindow_EqGraph = (EqGraph);
15711
15534
  // EXTERNAL MODULE: ./presets/builtin.json
15712
- var builtin = __webpack_require__(41);
15535
+ var builtin = __webpack_require__(43);
15713
15536
 
15714
15537
  // CONCATENATED MODULE: ./js/components/EqualizerWindow/PresetsContextMenu.tsx
15715
15538
 
@@ -15760,7 +15583,7 @@ const PresetsContextMenu = () => {
15760
15583
 
15761
15584
  function EqTitleButtons() {
15762
15585
  const focusedWindow = useTypedSelector(getFocusedWindow);
15763
- const selected = focusedWindow === WINDOWS.EQUALIZER;
15586
+ const selected = focusedWindow === constants["m" /* WINDOWS */].EQUALIZER;
15764
15587
  const closeWindow = useActionCreator(windows_closeWindow);
15765
15588
  const toggleEqualizerShadeMode = useActionCreator(windows_toggleEqualizerShadeMode);
15766
15589
  return /*#__PURE__*/Object(jsx_runtime["jsxs"])(components_ClickedDiv, {
@@ -15770,7 +15593,7 @@ function EqTitleButtons() {
15770
15593
  onClick: toggleEqualizerShadeMode
15771
15594
  }), /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
15772
15595
  id: "equalizer-close",
15773
- onClick: () => closeWindow(WINDOWS.EQUALIZER)
15596
+ onClick: () => closeWindow(constants["m" /* WINDOWS */].EQUALIZER)
15774
15597
  })]
15775
15598
  }, selected ? "selected" : "unselected");
15776
15599
  }
@@ -15790,8 +15613,8 @@ const EqualizerShade = () => {
15790
15613
  const balance = useTypedSelector(getBalance);
15791
15614
  const toggleEqualizerShadeMode = useActionCreator(windows_toggleEqualizerShadeMode);
15792
15615
  const classes = ["left", "center", "right"];
15793
- const eqVolumeClassName = segment(0, 100, volume, classes);
15794
- const eqBalanceClassName = segment(-100, 100, balance, classes);
15616
+ const eqVolumeClassName = Object(utils["z" /* segment */])(0, 100, volume, classes);
15617
+ const eqBalanceClassName = Object(utils["z" /* segment */])(-100, 100, balance, classes);
15795
15618
  return /*#__PURE__*/Object(jsx_runtime["jsxs"])("div", {
15796
15619
  className: "draggable",
15797
15620
  onDoubleClick: toggleEqualizerShadeMode,
@@ -15811,7 +15634,7 @@ const EqualizerShade = () => {
15811
15634
 
15812
15635
  /* harmony default export */ var EqualizerWindow_EqualizerShade = (EqualizerShade);
15813
15636
  // EXTERNAL MODULE: ./css/equalizer-window.css
15814
- var equalizer_window = __webpack_require__(94);
15637
+ var equalizer_window = __webpack_require__(96);
15815
15638
 
15816
15639
  // CONCATENATED MODULE: ./js/components/EqualizerWindow/index.tsx
15817
15640
 
@@ -15837,8 +15660,8 @@ const EqualizerWindow = () => {
15837
15660
  const doubled = useTypedSelector(getDoubled);
15838
15661
  const focusedWindow = useTypedSelector(getFocusedWindow);
15839
15662
  const getWindowShade = useTypedSelector(selectors_getWindowShade);
15840
- const selected = focusedWindow === WINDOWS.EQUALIZER;
15841
- const shade = getWindowShade(WINDOWS.EQUALIZER);
15663
+ const selected = focusedWindow === constants["m" /* WINDOWS */].EQUALIZER;
15664
+ const shade = getWindowShade(constants["m" /* WINDOWS */].EQUALIZER);
15842
15665
  const setPreampValue = useActionCreator(setPreamp);
15843
15666
  const setEqToMin = useActionCreator(equalizer_setEqToMin);
15844
15667
  const setEqToMid = useActionCreator(equalizer_setEqToMid);
@@ -15856,7 +15679,7 @@ const EqualizerWindow = () => {
15856
15679
  id: "equalizer-window",
15857
15680
  className: className,
15858
15681
  children: /*#__PURE__*/Object(jsx_runtime["jsx"])(components_FocusTarget, {
15859
- windowId: WINDOWS.EQUALIZER,
15682
+ windowId: constants["m" /* WINDOWS */].EQUALIZER,
15860
15683
  children: shade ? /*#__PURE__*/Object(jsx_runtime["jsx"])(EqualizerWindow_EqualizerShade, {}) : /*#__PURE__*/Object(jsx_runtime["jsxs"])("div", {
15861
15684
  children: [/*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
15862
15685
  className: "equalizer-top title-bar draggable",
@@ -15875,7 +15698,7 @@ const EqualizerWindow = () => {
15875
15698
  }), /*#__PURE__*/Object(jsx_runtime["jsx"])("div", {
15876
15699
  id: "minus12db",
15877
15700
  onClick: setEqToMin
15878
- }), BANDS.map(hertz => /*#__PURE__*/Object(jsx_runtime["jsx"])(Band, {
15701
+ }), constants["a" /* BANDS */].map(hertz => /*#__PURE__*/Object(jsx_runtime["jsx"])(Band, {
15879
15702
  id: bandClassName(hertz),
15880
15703
  band: hertz,
15881
15704
  onChange: value => setHertzValue(hertz, value)
@@ -16108,7 +15931,7 @@ Object.keys(FONT_LOOKUP).forEach(character => {
16108
15931
  const code = character.charCodeAt(0);
16109
15932
  imageSelectors[key] = [`.character-${code}`];
16110
15933
  });
16111
- LETTERS.forEach(character => {
15934
+ constants["d" /* LETTERS */].forEach(character => {
16112
15935
  imageSelectors[`GEN_TEXT_${character}`] = [`.gen-text-${character.toLowerCase()}`];
16113
15936
  imageSelectors[`GEN_TEXT_SELECTED_${character}`] = [`.gen-window.selected .gen-text-${character.toLowerCase()}`];
16114
15937
  });
@@ -16195,7 +16018,7 @@ function ClipPaths({
16195
16018
  }), paths);
16196
16019
  }
16197
16020
  // EXTERNAL MODULE: ./node_modules/ani-cursor/dist/index.js
16198
- var dist = __webpack_require__(42);
16021
+ var dist = __webpack_require__(44);
16199
16022
 
16200
16023
  // CONCATENATED MODULE: ./js/components/Skin.tsx
16201
16024
 
@@ -16258,7 +16081,7 @@ const getCssRules = Object(lib["createSelector"])(getSkinImages, getSkinCursors,
16258
16081
  });
16259
16082
 
16260
16083
  if (skinGenLetterWidths != null) {
16261
- LETTERS.forEach(letter => {
16084
+ constants["d" /* LETTERS */].forEach(letter => {
16262
16085
  const width = skinGenLetterWidths[`GEN_TEXT_${letter}`];
16263
16086
  const selectedWidth = skinGenLetterWidths[`GEN_TEXT_SELECTED_${letter}`];
16264
16087
  cssRules.push(`${CSS_PREFIX} .gen-text-${letter.toLowerCase()} {width: ${width}px;}`);
@@ -16338,7 +16161,7 @@ function Skin() {
16338
16161
  });
16339
16162
  }
16340
16163
  // EXTERNAL MODULE: ./css/webamp.css
16341
- var webamp = __webpack_require__(98);
16164
+ var webamp = __webpack_require__(100);
16342
16165
 
16343
16166
  // CONCATENATED MODULE: ./js/components/App.tsx
16344
16167
 
@@ -16405,7 +16228,7 @@ function App({
16405
16228
  webampNode.style.right = "0";
16406
16229
  webampNode.style.bottom = "0";
16407
16230
  webampNode.style.overflow = "hidden";
16408
- browserWindowSizeChanged(utils_getWindowSize());
16231
+ browserWindowSizeChanged(utils["k" /* getWindowSize */]());
16409
16232
  webampNode.style.right = "auto";
16410
16233
  webampNode.style.bottom = "auto";
16411
16234
  webampNode.style.overflow = "visible";
@@ -16418,27 +16241,27 @@ function App({
16418
16241
  };
16419
16242
  }, [browserWindowSizeChanged, webampNode]);
16420
16243
  const renderWindows = Object(react["useCallback"])(() => {
16421
- return objectMap(genWindowsInfo, (w, id) => {
16244
+ return utils["t" /* objectMap */](genWindowsInfo, (w, id) => {
16422
16245
  if (!w.open) {
16423
16246
  return null;
16424
16247
  }
16425
16248
 
16426
16249
  switch (id) {
16427
- case WINDOWS.MAIN:
16250
+ case constants["m" /* WINDOWS */].MAIN:
16428
16251
  return /*#__PURE__*/Object(jsx_runtime["jsx"])(components_MainWindow, {
16429
16252
  analyser: media.getAnalyser(),
16430
16253
  filePickers: filePickers
16431
16254
  });
16432
16255
 
16433
- case WINDOWS.EQUALIZER:
16256
+ case constants["m" /* WINDOWS */].EQUALIZER:
16434
16257
  return /*#__PURE__*/Object(jsx_runtime["jsx"])(components_EqualizerWindow, {});
16435
16258
 
16436
- case WINDOWS.PLAYLIST:
16259
+ case constants["m" /* WINDOWS */].PLAYLIST:
16437
16260
  return /*#__PURE__*/Object(jsx_runtime["jsx"])(components_PlaylistWindow, {
16438
16261
  analyser: media.getAnalyser()
16439
16262
  });
16440
16263
 
16441
- case WINDOWS.MILKDROP:
16264
+ case constants["m" /* WINDOWS */].MILKDROP:
16442
16265
  return /*#__PURE__*/Object(jsx_runtime["jsx"])(MilkdropWindow, {
16443
16266
  analyser: media.getAnalyser()
16444
16267
  });
@@ -16814,7 +16637,7 @@ class elementSource_ElementSource {
16814
16637
  this._audio = document.createElement("audio");
16815
16638
  this._audio.crossOrigin = "anonymous";
16816
16639
  this._stalled = false;
16817
- this._status = MEDIA_STATUS.STOPPED; // TODO: #leak
16640
+ this._status = constants["f" /* MEDIA_STATUS */].STOPPED; // TODO: #leak
16818
16641
 
16819
16642
  this._audio.addEventListener("suspend", () => {
16820
16643
  this._setStalled(true);
@@ -16831,7 +16654,7 @@ class elementSource_ElementSource {
16831
16654
  this._audio.addEventListener("ended", () => {
16832
16655
  this._emitter.trigger("ended");
16833
16656
 
16834
- this._setStatus(MEDIA_STATUS.STOPPED);
16657
+ this._setStatus(constants["f" /* MEDIA_STATUS */].STOPPED);
16835
16658
  }); // TODO: Throttle to 50 (if needed)
16836
16659
  // TODO: #leak
16837
16660
 
@@ -16871,7 +16694,7 @@ class elementSource_ElementSource {
16871
16694
 
16872
16695
  this._emitter.trigger("ended");
16873
16696
 
16874
- this._setStatus(MEDIA_STATUS.STOPPED);
16697
+ this._setStatus(constants["f" /* MEDIA_STATUS */].STOPPED);
16875
16698
  });
16876
16699
 
16877
16700
  this._source = this._context.createMediaElementSource(this._audio);
@@ -16896,7 +16719,7 @@ class elementSource_ElementSource {
16896
16719
  }
16897
16720
 
16898
16721
  async play() {
16899
- if (this._status !== MEDIA_STATUS.PAUSED) {
16722
+ if (this._status !== constants["f" /* MEDIA_STATUS */].PAUSED) {
16900
16723
  this.seekToTime(0);
16901
16724
  }
16902
16725
 
@@ -16905,13 +16728,13 @@ class elementSource_ElementSource {
16905
16728
  } catch (err) {//
16906
16729
  }
16907
16730
 
16908
- this._setStatus(MEDIA_STATUS.PLAYING);
16731
+ this._setStatus(constants["f" /* MEDIA_STATUS */].PLAYING);
16909
16732
  }
16910
16733
 
16911
16734
  pause() {
16912
16735
  this._audio.pause();
16913
16736
 
16914
- this._setStatus(MEDIA_STATUS.PAUSED);
16737
+ this._setStatus(constants["f" /* MEDIA_STATUS */].PAUSED);
16915
16738
  }
16916
16739
 
16917
16740
  stop() {
@@ -16919,7 +16742,7 @@ class elementSource_ElementSource {
16919
16742
 
16920
16743
  this._audio.currentTime = 0;
16921
16744
 
16922
- this._setStatus(MEDIA_STATUS.STOPPED);
16745
+ this._setStatus(constants["f" /* MEDIA_STATUS */].STOPPED);
16923
16746
  }
16924
16747
 
16925
16748
  seekToTime(time) {
@@ -16929,7 +16752,7 @@ class elementSource_ElementSource {
16929
16752
  console.log("start", seekable.start(i), "end", seekable.end(i));
16930
16753
  }
16931
16754
  */
16932
- this._audio.currentTime = clamp(time, 0, this.getDuration());
16755
+ this._audio.currentTime = Object(utils["d" /* clamp */])(time, 0, this.getDuration());
16933
16756
 
16934
16757
  this._emitter.trigger("positionChange");
16935
16758
  }
@@ -17074,7 +16897,7 @@ class media_Media {
17074
16897
 
17075
16898
  this._source.on("statusChange", () => {
17076
16899
  switch (this._source.getStatus()) {
17077
- case MEDIA_STATUS.PLAYING:
16900
+ case constants["f" /* MEDIA_STATUS */].PLAYING:
17078
16901
  this._emitter.trigger("playing");
17079
16902
 
17080
16903
  break;
@@ -17091,7 +16914,7 @@ class media_Media {
17091
16914
 
17092
16915
  let output = this._preamp;
17093
16916
  this._bands = {};
17094
- BANDS.forEach((band, i) => {
16917
+ constants["a" /* BANDS */].forEach((band, i) => {
17095
16918
  const filter = this._context.createBiquadFilter();
17096
16919
 
17097
16920
  this._bands[band] = filter;
@@ -17099,7 +16922,7 @@ class media_Media {
17099
16922
  if (i === 0) {
17100
16923
  // The first filter, includes all lower frequencies
17101
16924
  filter.type = "lowshelf";
17102
- } else if (i === BANDS.length - 1) {
16925
+ } else if (i === constants["a" /* BANDS */].length - 1) {
17103
16926
  // The last filter, includes all higher frequencies
17104
16927
  filter.type = "highshelf";
17105
16928
  } else {
@@ -17231,7 +17054,7 @@ class media_Media {
17231
17054
 
17232
17055
  }
17233
17056
  // EXTERNAL MODULE: ./css/base-skin.css
17234
- var base_skin = __webpack_require__(100);
17057
+ var base_skin = __webpack_require__(102);
17235
17058
 
17236
17059
  // CONCATENATED MODULE: ./js/Disposable.ts
17237
17060
 
@@ -17456,12 +17279,12 @@ class webampLazy_Webamp {
17456
17279
  if (layout == null) {
17457
17280
  this.store.dispatch(stackWindows());
17458
17281
  } else {
17459
- objectForEach(layout, (w, windowId) => {
17282
+ utils["s" /* objectForEach */](layout, (w, windowId) => {
17460
17283
  if (w.size != null) {
17461
17284
  this.store.dispatch(windows_setWindowSize(windowId, w.size));
17462
17285
  }
17463
17286
  });
17464
- this.store.dispatch(windows_updateWindowPositions(objectMap(layout, w => w.position), false));
17287
+ this.store.dispatch(windows_updateWindowPositions(utils["t" /* objectMap */](layout, w => w.position), false));
17465
17288
  }
17466
17289
 
17467
17290
  if (enableHotkeys) {
@@ -17503,18 +17326,18 @@ class webampLazy_Webamp {
17503
17326
 
17504
17327
  _bufferTracks(tracks) {
17505
17328
  const nextIndex = getTrackCount(this.store.getState());
17506
- this.store.dispatch(files_loadMediaFiles(tracks, LOAD_STYLE.BUFFER, nextIndex));
17329
+ this.store.dispatch(files_loadMediaFiles(tracks, constants["e" /* LOAD_STYLE */].BUFFER, nextIndex));
17507
17330
  } // Append this array of tracks to the end of the current playlist.
17508
17331
 
17509
17332
 
17510
17333
  appendTracks(tracks) {
17511
17334
  const nextIndex = getTrackCount(this.store.getState());
17512
- this.store.dispatch(files_loadMediaFiles(tracks, LOAD_STYLE.NONE, nextIndex));
17335
+ this.store.dispatch(files_loadMediaFiles(tracks, constants["e" /* LOAD_STYLE */].NONE, nextIndex));
17513
17336
  } // Replace any existing tracks with this array of tracks, and begin playing.
17514
17337
 
17515
17338
 
17516
17339
  setTracksToPlay(tracks) {
17517
- this.store.dispatch(files_loadMediaFiles(tracks, LOAD_STYLE.PLAY));
17340
+ this.store.dispatch(files_loadMediaFiles(tracks, constants["e" /* LOAD_STYLE */].PLAY));
17518
17341
  }
17519
17342
 
17520
17343
  getMediaStatus() {
@@ -17633,13 +17456,13 @@ defineProperty_default()(webampLazy_Webamp, "VERSION", "1.5.0");
17633
17456
  /* harmony default export */ var webampLazy = __webpack_exports__["default"] = (webampLazy_Webamp);
17634
17457
 
17635
17458
  /***/ }),
17636
- /* 49 */,
17637
- /* 50 */,
17638
17459
  /* 51 */,
17639
17460
  /* 52 */,
17640
17461
  /* 53 */,
17641
17462
  /* 54 */,
17642
- /* 55 */
17463
+ /* 55 */,
17464
+ /* 56 */,
17465
+ /* 57 */
17643
17466
  /***/ (function(module, exports, __webpack_require__) {
17644
17467
 
17645
17468
  "use strict";
@@ -17651,12 +17474,12 @@ defineProperty_default()(webampLazy_Webamp, "VERSION", "1.5.0");
17651
17474
  * This source code is licensed under the MIT license found in the
17652
17475
  * LICENSE file in the root directory of this source tree.
17653
17476
  */
17654
- __webpack_require__(23);var f=__webpack_require__(1),g=60103;exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h("react.element");exports.Fragment=h("react.fragment")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};
17477
+ __webpack_require__(25);var f=__webpack_require__(1),g=60103;exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h("react.element");exports.Fragment=h("react.fragment")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};
17655
17478
  function q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=""+k);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;
17656
17479
 
17657
17480
 
17658
17481
  /***/ }),
17659
- /* 56 */
17482
+ /* 58 */
17660
17483
  /***/ (function(module, exports, __webpack_require__) {
17661
17484
 
17662
17485
  "use strict";
@@ -17668,7 +17491,7 @@ function q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=""+k);void 0!==a.key&&
17668
17491
  * This source code is licensed under the MIT license found in the
17669
17492
  * LICENSE file in the root directory of this source tree.
17670
17493
  */
17671
- var l=__webpack_require__(23),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;
17494
+ var l=__webpack_require__(25),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;
17672
17495
  if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element");p=w("react.portal");exports.Fragment=w("react.fragment");exports.StrictMode=w("react.strict_mode");exports.Profiler=w("react.profiler");q=w("react.provider");r=w("react.context");t=w("react.forward_ref");exports.Suspense=w("react.suspense");u=w("react.memo");v=w("react.lazy")}var x="function"===typeof Symbol&&Symbol.iterator;
17673
17496
  function y(a){if(null===a||"object"!==typeof a)return null;a=x&&a[x]||a["@@iterator"];return"function"===typeof a?a:null}function z(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
17674
17497
  var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B={};function C(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}C.prototype.isReactComponent={};C.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(z(85));this.updater.enqueueSetState(this,a,b,"setState")};C.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
@@ -17686,7 +17509,7 @@ exports.useLayoutEffect=function(a,b){return S().useLayoutEffect(a,b)};exports.u
17686
17509
 
17687
17510
 
17688
17511
  /***/ }),
17689
- /* 57 */
17512
+ /* 59 */
17690
17513
  /***/ (function(module, exports, __webpack_require__) {
17691
17514
 
17692
17515
  "use strict";
@@ -17701,7 +17524,7 @@ exports.useLayoutEffect=function(a,b){return S().useLayoutEffect(a,b)};exports.u
17701
17524
  /*
17702
17525
  Modernizr 3.0.0pre (Custom Build) | MIT
17703
17526
  */
17704
- var aa=__webpack_require__(1),m=__webpack_require__(23),r=__webpack_require__(58);function y(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(y(227));var ba=new Set,ca={};function da(a,b){ea(a,b);ea(a+"Capture",b)}
17527
+ var aa=__webpack_require__(1),m=__webpack_require__(25),r=__webpack_require__(60);function y(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(y(227));var ba=new Set,ca={};function da(a,b){ea(a,b);ea(a+"Capture",b)}
17705
17528
  function ea(a,b){ca[a]=b;for(a=0;a<b.length;a++)ba.add(b[a])}
17706
17529
  var fa=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ha=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ia=Object.prototype.hasOwnProperty,
17707
17530
  ja={},ka={};function la(a){if(ia.call(ka,a))return!0;if(ia.call(ja,a))return!1;if(ha.test(a))return ka[a]=!0;ja[a]=!0;return!1}function ma(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
@@ -17990,19 +17813,19 @@ exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!rk(c))throw Er
17990
17813
 
17991
17814
 
17992
17815
  /***/ }),
17993
- /* 58 */
17816
+ /* 60 */
17994
17817
  /***/ (function(module, exports, __webpack_require__) {
17995
17818
 
17996
17819
  "use strict";
17997
17820
 
17998
17821
 
17999
17822
  if (true) {
18000
- module.exports = __webpack_require__(59);
17823
+ module.exports = __webpack_require__(61);
18001
17824
  } else {}
18002
17825
 
18003
17826
 
18004
17827
  /***/ }),
18005
- /* 59 */
17828
+ /* 61 */
18006
17829
  /***/ (function(module, exports, __webpack_require__) {
18007
17830
 
18008
17831
  "use strict";
@@ -18029,7 +17852,7 @@ exports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;
18029
17852
 
18030
17853
 
18031
17854
  /***/ }),
18032
- /* 60 */
17855
+ /* 62 */
18033
17856
  /***/ (function(module, exports, __webpack_require__) {
18034
17857
 
18035
17858
  /**
@@ -18042,12 +17865,12 @@ exports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;
18042
17865
  if (false) { var throwOnDirectAccess, ReactIs; } else {
18043
17866
  // By explicitly using `prop-types` you are opting into new production behavior.
18044
17867
  // http://fb.me/prop-types-in-prod
18045
- module.exports = __webpack_require__(61)();
17868
+ module.exports = __webpack_require__(63)();
18046
17869
  }
18047
17870
 
18048
17871
 
18049
17872
  /***/ }),
18050
- /* 61 */
17873
+ /* 63 */
18051
17874
  /***/ (function(module, exports, __webpack_require__) {
18052
17875
 
18053
17876
  "use strict";
@@ -18060,7 +17883,7 @@ if (false) { var throwOnDirectAccess, ReactIs; } else {
18060
17883
 
18061
17884
 
18062
17885
 
18063
- var ReactPropTypesSecret = __webpack_require__(62);
17886
+ var ReactPropTypesSecret = __webpack_require__(64);
18064
17887
 
18065
17888
  function emptyFunction() {}
18066
17889
  function emptyFunctionWithReset() {}
@@ -18118,7 +17941,7 @@ module.exports = function() {
18118
17941
 
18119
17942
 
18120
17943
  /***/ }),
18121
- /* 62 */
17944
+ /* 64 */
18122
17945
  /***/ (function(module, exports, __webpack_require__) {
18123
17946
 
18124
17947
  "use strict";
@@ -18137,7 +17960,7 @@ module.exports = ReactPropTypesSecret;
18137
17960
 
18138
17961
 
18139
17962
  /***/ }),
18140
- /* 63 */
17963
+ /* 65 */
18141
17964
  /***/ (function(module, exports, __webpack_require__) {
18142
17965
 
18143
17966
  "use strict";
@@ -18159,7 +17982,7 @@ exports.isValidElementType=function(a){return"string"===typeof a||"function"===t
18159
17982
 
18160
17983
 
18161
17984
  /***/ }),
18162
- /* 64 */
17985
+ /* 66 */
18163
17986
  /***/ (function(module, exports) {
18164
17987
 
18165
17988
  module.exports = function(originalModule) {
@@ -18189,7 +18012,7 @@ module.exports = function(originalModule) {
18189
18012
 
18190
18013
 
18191
18014
  /***/ }),
18192
- /* 65 */
18015
+ /* 67 */
18193
18016
  /***/ (function(module, exports) {
18194
18017
 
18195
18018
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -18210,10 +18033,10 @@ function _objectWithoutPropertiesLoose(source, excluded) {
18210
18033
  module.exports = _objectWithoutPropertiesLoose;
18211
18034
 
18212
18035
  /***/ }),
18213
- /* 66 */
18036
+ /* 68 */
18214
18037
  /***/ (function(module, exports, __webpack_require__) {
18215
18038
 
18216
- var CONSTANTS = __webpack_require__(35);
18039
+ var CONSTANTS = __webpack_require__(37);
18217
18040
 
18218
18041
  function parser(arrayBuffer) {
18219
18042
  var data = {};
@@ -18259,10 +18082,10 @@ function parser(arrayBuffer) {
18259
18082
  module.exports = parser;
18260
18083
 
18261
18084
  /***/ }),
18262
- /* 67 */
18085
+ /* 69 */
18263
18086
  /***/ (function(module, exports, __webpack_require__) {
18264
18087
 
18265
- var CONSTANTS = __webpack_require__(35);
18088
+ var CONSTANTS = __webpack_require__(37);
18266
18089
 
18267
18090
  var FILL_SIZE = 4;
18268
18091
  var PRESET_LENGTH = 257;
@@ -18307,11 +18130,11 @@ function creator(data) {
18307
18130
  module.exports = creator;
18308
18131
 
18309
18132
  /***/ }),
18310
- /* 68 */
18133
+ /* 70 */
18311
18134
  /***/ (function(module, exports, __webpack_require__) {
18312
18135
 
18313
18136
 
18314
- var content = __webpack_require__(69);
18137
+ var content = __webpack_require__(71);
18315
18138
 
18316
18139
  if(typeof content === 'string') content = [[module.i, content, '']];
18317
18140
 
@@ -18325,17 +18148,17 @@ var options = {"hmr":true}
18325
18148
  options.transform = transform
18326
18149
  options.insertInto = undefined;
18327
18150
 
18328
- var update = __webpack_require__(11)(content, options);
18151
+ var update = __webpack_require__(13)(content, options);
18329
18152
 
18330
18153
  if(content.locals) module.exports = content.locals;
18331
18154
 
18332
18155
  if(false) {}
18333
18156
 
18334
18157
  /***/ }),
18335
- /* 69 */
18158
+ /* 71 */
18336
18159
  /***/ (function(module, exports, __webpack_require__) {
18337
18160
 
18338
- exports = module.exports = __webpack_require__(10)(false);
18161
+ exports = module.exports = __webpack_require__(12)(false);
18339
18162
  // imports
18340
18163
 
18341
18164
 
@@ -18346,7 +18169,7 @@ exports.push([module.i, "#webamp .gen-text-space{width:5px}#webamp .gen-text-let
18346
18169
 
18347
18170
 
18348
18171
  /***/ }),
18349
- /* 70 */
18172
+ /* 72 */
18350
18173
  /***/ (function(module, exports) {
18351
18174
 
18352
18175
 
@@ -18441,11 +18264,11 @@ module.exports = function (css) {
18441
18264
 
18442
18265
 
18443
18266
  /***/ }),
18444
- /* 71 */
18267
+ /* 73 */
18445
18268
  /***/ (function(module, exports, __webpack_require__) {
18446
18269
 
18447
18270
 
18448
- var content = __webpack_require__(72);
18271
+ var content = __webpack_require__(74);
18449
18272
 
18450
18273
  if(typeof content === 'string') content = [[module.i, content, '']];
18451
18274
 
@@ -18459,17 +18282,17 @@ var options = {"hmr":true}
18459
18282
  options.transform = transform
18460
18283
  options.insertInto = undefined;
18461
18284
 
18462
- var update = __webpack_require__(11)(content, options);
18285
+ var update = __webpack_require__(13)(content, options);
18463
18286
 
18464
18287
  if(content.locals) module.exports = content.locals;
18465
18288
 
18466
18289
  if(false) {}
18467
18290
 
18468
18291
  /***/ }),
18469
- /* 72 */
18292
+ /* 74 */
18470
18293
  /***/ (function(module, exports, __webpack_require__) {
18471
18294
 
18472
- exports = module.exports = __webpack_require__(10)(false);
18295
+ exports = module.exports = __webpack_require__(12)(false);
18473
18296
  // imports
18474
18297
 
18475
18298
 
@@ -18480,11 +18303,11 @@ exports.push([module.i, ".webamp-desktop{position:absolute;top:0;left:0;right:0;
18480
18303
 
18481
18304
 
18482
18305
  /***/ }),
18483
- /* 73 */
18306
+ /* 75 */
18484
18307
  /***/ (function(module, exports, __webpack_require__) {
18485
18308
 
18486
18309
 
18487
- var content = __webpack_require__(74);
18310
+ var content = __webpack_require__(76);
18488
18311
 
18489
18312
  if(typeof content === 'string') content = [[module.i, content, '']];
18490
18313
 
@@ -18498,17 +18321,17 @@ var options = {"hmr":true}
18498
18321
  options.transform = transform
18499
18322
  options.insertInto = undefined;
18500
18323
 
18501
- var update = __webpack_require__(11)(content, options);
18324
+ var update = __webpack_require__(13)(content, options);
18502
18325
 
18503
18326
  if(content.locals) module.exports = content.locals;
18504
18327
 
18505
18328
  if(false) {}
18506
18329
 
18507
18330
  /***/ }),
18508
- /* 74 */
18331
+ /* 76 */
18509
18332
  /***/ (function(module, exports, __webpack_require__) {
18510
18333
 
18511
- exports = module.exports = __webpack_require__(10)(false);
18334
+ exports = module.exports = __webpack_require__(12)(false);
18512
18335
  // imports
18513
18336
 
18514
18337
 
@@ -18519,10 +18342,10 @@ exports.push([module.i, "#webamp-context-menu .context-menu{left:0;-webkit-user-
18519
18342
 
18520
18343
 
18521
18344
  /***/ }),
18522
- /* 75 */
18345
+ /* 77 */
18523
18346
  /***/ (function(module, exports, __webpack_require__) {
18524
18347
 
18525
- var basePropertyOf = __webpack_require__(76);
18348
+ var basePropertyOf = __webpack_require__(78);
18526
18349
 
18527
18350
  /** Used to map Latin Unicode letters to basic Latin letters. */
18528
18351
  var deburredLetters = {
@@ -18596,7 +18419,7 @@ module.exports = deburrLetter;
18596
18419
 
18597
18420
 
18598
18421
  /***/ }),
18599
- /* 76 */
18422
+ /* 78 */
18600
18423
  /***/ (function(module, exports) {
18601
18424
 
18602
18425
  /**
@@ -18616,10 +18439,10 @@ module.exports = basePropertyOf;
18616
18439
 
18617
18440
 
18618
18441
  /***/ }),
18619
- /* 77 */
18442
+ /* 79 */
18620
18443
  /***/ (function(module, exports, __webpack_require__) {
18621
18444
 
18622
- var baseToString = __webpack_require__(78);
18445
+ var baseToString = __webpack_require__(80);
18623
18446
 
18624
18447
  /**
18625
18448
  * Converts `value` to a string. An empty string is returned for `null`
@@ -18650,13 +18473,13 @@ module.exports = toString;
18650
18473
 
18651
18474
 
18652
18475
  /***/ }),
18653
- /* 78 */
18476
+ /* 80 */
18654
18477
  /***/ (function(module, exports, __webpack_require__) {
18655
18478
 
18656
- var Symbol = __webpack_require__(25),
18657
- arrayMap = __webpack_require__(81),
18658
- isArray = __webpack_require__(82),
18659
- isSymbol = __webpack_require__(83);
18479
+ var Symbol = __webpack_require__(27),
18480
+ arrayMap = __webpack_require__(83),
18481
+ isArray = __webpack_require__(84),
18482
+ isSymbol = __webpack_require__(85);
18660
18483
 
18661
18484
  /** Used as references for various `Number` constants. */
18662
18485
  var INFINITY = 1 / 0;
@@ -18693,10 +18516,10 @@ module.exports = baseToString;
18693
18516
 
18694
18517
 
18695
18518
  /***/ }),
18696
- /* 79 */
18519
+ /* 81 */
18697
18520
  /***/ (function(module, exports, __webpack_require__) {
18698
18521
 
18699
- var freeGlobal = __webpack_require__(80);
18522
+ var freeGlobal = __webpack_require__(82);
18700
18523
 
18701
18524
  /** Detect free variable `self`. */
18702
18525
  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
@@ -18708,7 +18531,7 @@ module.exports = root;
18708
18531
 
18709
18532
 
18710
18533
  /***/ }),
18711
- /* 80 */
18534
+ /* 82 */
18712
18535
  /***/ (function(module, exports, __webpack_require__) {
18713
18536
 
18714
18537
  /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
@@ -18716,10 +18539,10 @@ var freeGlobal = typeof global == 'object' && global && global.Object === Object
18716
18539
 
18717
18540
  module.exports = freeGlobal;
18718
18541
 
18719
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(17)))
18542
+ /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(19)))
18720
18543
 
18721
18544
  /***/ }),
18722
- /* 81 */
18545
+ /* 83 */
18723
18546
  /***/ (function(module, exports) {
18724
18547
 
18725
18548
  /**
@@ -18746,7 +18569,7 @@ module.exports = arrayMap;
18746
18569
 
18747
18570
 
18748
18571
  /***/ }),
18749
- /* 82 */
18572
+ /* 84 */
18750
18573
  /***/ (function(module, exports) {
18751
18574
 
18752
18575
  /**
@@ -18778,11 +18601,11 @@ module.exports = isArray;
18778
18601
 
18779
18602
 
18780
18603
  /***/ }),
18781
- /* 83 */
18604
+ /* 85 */
18782
18605
  /***/ (function(module, exports, __webpack_require__) {
18783
18606
 
18784
- var baseGetTag = __webpack_require__(84),
18785
- isObjectLike = __webpack_require__(87);
18607
+ var baseGetTag = __webpack_require__(86),
18608
+ isObjectLike = __webpack_require__(89);
18786
18609
 
18787
18610
  /** `Object#toString` result references. */
18788
18611
  var symbolTag = '[object Symbol]';
@@ -18813,12 +18636,12 @@ module.exports = isSymbol;
18813
18636
 
18814
18637
 
18815
18638
  /***/ }),
18816
- /* 84 */
18639
+ /* 86 */
18817
18640
  /***/ (function(module, exports, __webpack_require__) {
18818
18641
 
18819
- var Symbol = __webpack_require__(25),
18820
- getRawTag = __webpack_require__(85),
18821
- objectToString = __webpack_require__(86);
18642
+ var Symbol = __webpack_require__(27),
18643
+ getRawTag = __webpack_require__(87),
18644
+ objectToString = __webpack_require__(88);
18822
18645
 
18823
18646
  /** `Object#toString` result references. */
18824
18647
  var nullTag = '[object Null]',
@@ -18847,10 +18670,10 @@ module.exports = baseGetTag;
18847
18670
 
18848
18671
 
18849
18672
  /***/ }),
18850
- /* 85 */
18673
+ /* 87 */
18851
18674
  /***/ (function(module, exports, __webpack_require__) {
18852
18675
 
18853
- var Symbol = __webpack_require__(25);
18676
+ var Symbol = __webpack_require__(27);
18854
18677
 
18855
18678
  /** Used for built-in method references. */
18856
18679
  var objectProto = Object.prototype;
@@ -18899,7 +18722,7 @@ module.exports = getRawTag;
18899
18722
 
18900
18723
 
18901
18724
  /***/ }),
18902
- /* 86 */
18725
+ /* 88 */
18903
18726
  /***/ (function(module, exports) {
18904
18727
 
18905
18728
  /** Used for built-in method references. */
@@ -18927,7 +18750,7 @@ module.exports = objectToString;
18927
18750
 
18928
18751
 
18929
18752
  /***/ }),
18930
- /* 87 */
18753
+ /* 89 */
18931
18754
  /***/ (function(module, exports) {
18932
18755
 
18933
18756
  /**
@@ -18962,11 +18785,11 @@ module.exports = isObjectLike;
18962
18785
 
18963
18786
 
18964
18787
  /***/ }),
18965
- /* 88 */
18788
+ /* 90 */
18966
18789
  /***/ (function(module, exports, __webpack_require__) {
18967
18790
 
18968
18791
 
18969
- var content = __webpack_require__(89);
18792
+ var content = __webpack_require__(91);
18970
18793
 
18971
18794
  if(typeof content === 'string') content = [[module.i, content, '']];
18972
18795
 
@@ -18980,17 +18803,17 @@ var options = {"hmr":true}
18980
18803
  options.transform = transform
18981
18804
  options.insertInto = undefined;
18982
18805
 
18983
- var update = __webpack_require__(11)(content, options);
18806
+ var update = __webpack_require__(13)(content, options);
18984
18807
 
18985
18808
  if(content.locals) module.exports = content.locals;
18986
18809
 
18987
18810
  if(false) {}
18988
18811
 
18989
18812
  /***/ }),
18990
- /* 89 */
18813
+ /* 91 */
18991
18814
  /***/ (function(module, exports, __webpack_require__) {
18992
18815
 
18993
- exports = module.exports = __webpack_require__(10)(false);
18816
+ exports = module.exports = __webpack_require__(12)(false);
18994
18817
  // imports
18995
18818
 
18996
18819
 
@@ -19001,11 +18824,11 @@ exports.push([module.i, "#webamp .mini-time{display:block;height:6px;width:25px}
19001
18824
 
19002
18825
 
19003
18826
  /***/ }),
19004
- /* 90 */
18827
+ /* 92 */
19005
18828
  /***/ (function(module, exports, __webpack_require__) {
19006
18829
 
19007
18830
 
19008
- var content = __webpack_require__(91);
18831
+ var content = __webpack_require__(93);
19009
18832
 
19010
18833
  if(typeof content === 'string') content = [[module.i, content, '']];
19011
18834
 
@@ -19019,17 +18842,17 @@ var options = {"hmr":true}
19019
18842
  options.transform = transform
19020
18843
  options.insertInto = undefined;
19021
18844
 
19022
- var update = __webpack_require__(11)(content, options);
18845
+ var update = __webpack_require__(13)(content, options);
19023
18846
 
19024
18847
  if(content.locals) module.exports = content.locals;
19025
18848
 
19026
18849
  if(false) {}
19027
18850
 
19028
18851
  /***/ }),
19029
- /* 91 */
18852
+ /* 93 */
19030
18853
  /***/ (function(module, exports, __webpack_require__) {
19031
18854
 
19032
- exports = module.exports = __webpack_require__(10)(false);
18855
+ exports = module.exports = __webpack_require__(12)(false);
19033
18856
  // imports
19034
18857
 
19035
18858
 
@@ -19040,11 +18863,11 @@ exports.push([module.i, "#webamp #main-window{position:absolute;height:116px;wid
19040
18863
 
19041
18864
 
19042
18865
  /***/ }),
19043
- /* 92 */
18866
+ /* 94 */
19044
18867
  /***/ (function(module, exports, __webpack_require__) {
19045
18868
 
19046
18869
 
19047
- var content = __webpack_require__(93);
18870
+ var content = __webpack_require__(95);
19048
18871
 
19049
18872
  if(typeof content === 'string') content = [[module.i, content, '']];
19050
18873
 
@@ -19058,17 +18881,17 @@ var options = {"hmr":true}
19058
18881
  options.transform = transform
19059
18882
  options.insertInto = undefined;
19060
18883
 
19061
- var update = __webpack_require__(11)(content, options);
18884
+ var update = __webpack_require__(13)(content, options);
19062
18885
 
19063
18886
  if(content.locals) module.exports = content.locals;
19064
18887
 
19065
18888
  if(false) {}
19066
18889
 
19067
18890
  /***/ }),
19068
- /* 93 */
18891
+ /* 95 */
19069
18892
  /***/ (function(module, exports, __webpack_require__) {
19070
18893
 
19071
- exports = module.exports = __webpack_require__(10)(false);
18894
+ exports = module.exports = __webpack_require__(12)(false);
19072
18895
  // imports
19073
18896
 
19074
18897
 
@@ -19079,11 +18902,11 @@ exports.push([module.i, "#webamp #playlist-window{display:flex;flex-direction:co
19079
18902
 
19080
18903
 
19081
18904
  /***/ }),
19082
- /* 94 */
18905
+ /* 96 */
19083
18906
  /***/ (function(module, exports, __webpack_require__) {
19084
18907
 
19085
18908
 
19086
- var content = __webpack_require__(95);
18909
+ var content = __webpack_require__(97);
19087
18910
 
19088
18911
  if(typeof content === 'string') content = [[module.i, content, '']];
19089
18912
 
@@ -19097,17 +18920,17 @@ var options = {"hmr":true}
19097
18920
  options.transform = transform
19098
18921
  options.insertInto = undefined;
19099
18922
 
19100
- var update = __webpack_require__(11)(content, options);
18923
+ var update = __webpack_require__(13)(content, options);
19101
18924
 
19102
18925
  if(content.locals) module.exports = content.locals;
19103
18926
 
19104
18927
  if(false) {}
19105
18928
 
19106
18929
  /***/ }),
19107
- /* 95 */
18930
+ /* 97 */
19108
18931
  /***/ (function(module, exports, __webpack_require__) {
19109
18932
 
19110
- exports = module.exports = __webpack_require__(10)(false);
18933
+ exports = module.exports = __webpack_require__(12)(false);
19111
18934
  // imports
19112
18935
 
19113
18936
 
@@ -19118,15 +18941,15 @@ exports.push([module.i, "#webamp #equalizer-window{height:116px;width:275px}#web
19118
18941
 
19119
18942
 
19120
18943
  /***/ }),
19121
- /* 96 */
18944
+ /* 98 */
19122
18945
  /***/ (function(module, exports, __webpack_require__) {
19123
18946
 
19124
18947
  "use strict";
19125
18948
 
19126
18949
  Object.defineProperty(exports, "__esModule", { value: true });
19127
18950
  exports.parseAni = void 0;
19128
- var riff_file_1 = __webpack_require__(97);
19129
- var byte_data_1 = __webpack_require__(16);
18951
+ var riff_file_1 = __webpack_require__(99);
18952
+ var byte_data_1 = __webpack_require__(18);
19130
18953
  var DWORD = { bits: 32, be: false, signed: false, fp: false };
19131
18954
  function parseAni(arr) {
19132
18955
  var riff = new riff_file_1.RIFFFile();
@@ -19198,13 +19021,13 @@ exports.parseAni = parseAni;
19198
19021
  //# sourceMappingURL=parser.js.map
19199
19022
 
19200
19023
  /***/ }),
19201
- /* 97 */
19024
+ /* 99 */
19202
19025
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
19203
19026
 
19204
19027
  "use strict";
19205
19028
  __webpack_require__.r(__webpack_exports__);
19206
19029
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RIFFFile", function() { return RIFFFile; });
19207
- /* harmony import */ var byte_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
19030
+ /* harmony import */ var byte_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
19208
19031
  /*
19209
19032
  * Copyright (c) 2017-2019 Rafael da Silva Rocha.
19210
19033
  *
@@ -19448,11 +19271,11 @@ class RIFFFile {
19448
19271
 
19449
19272
 
19450
19273
  /***/ }),
19451
- /* 98 */
19274
+ /* 100 */
19452
19275
  /***/ (function(module, exports, __webpack_require__) {
19453
19276
 
19454
19277
 
19455
- var content = __webpack_require__(99);
19278
+ var content = __webpack_require__(101);
19456
19279
 
19457
19280
  if(typeof content === 'string') content = [[module.i, content, '']];
19458
19281
 
@@ -19466,17 +19289,17 @@ var options = {"hmr":true}
19466
19289
  options.transform = transform
19467
19290
  options.insertInto = undefined;
19468
19291
 
19469
- var update = __webpack_require__(11)(content, options);
19292
+ var update = __webpack_require__(13)(content, options);
19470
19293
 
19471
19294
  if(content.locals) module.exports = content.locals;
19472
19295
 
19473
19296
  if(false) {}
19474
19297
 
19475
19298
  /***/ }),
19476
- /* 99 */
19299
+ /* 101 */
19477
19300
  /***/ (function(module, exports, __webpack_require__) {
19478
19301
 
19479
- exports = module.exports = __webpack_require__(10)(false);
19302
+ exports = module.exports = __webpack_require__(12)(false);
19480
19303
  // imports
19481
19304
 
19482
19305
 
@@ -19487,11 +19310,11 @@ exports.push([module.i, "#webamp{position:absolute;top:0;left:0}#webamp canvas{-
19487
19310
 
19488
19311
 
19489
19312
  /***/ }),
19490
- /* 100 */
19313
+ /* 102 */
19491
19314
  /***/ (function(module, exports, __webpack_require__) {
19492
19315
 
19493
19316
 
19494
- var content = __webpack_require__(101);
19317
+ var content = __webpack_require__(103);
19495
19318
 
19496
19319
  if(typeof content === 'string') content = [[module.i, content, '']];
19497
19320
 
@@ -19505,17 +19328,17 @@ var options = {"hmr":true}
19505
19328
  options.transform = transform
19506
19329
  options.insertInto = undefined;
19507
19330
 
19508
- var update = __webpack_require__(11)(content, options);
19331
+ var update = __webpack_require__(13)(content, options);
19509
19332
 
19510
19333
  if(content.locals) module.exports = content.locals;
19511
19334
 
19512
19335
  if(false) {}
19513
19336
 
19514
19337
  /***/ }),
19515
- /* 101 */
19338
+ /* 103 */
19516
19339
  /***/ (function(module, exports, __webpack_require__) {
19517
19340
 
19518
- exports = module.exports = __webpack_require__(10)(false);
19341
+ exports = module.exports = __webpack_require__(12)(false);
19519
19342
  // imports
19520
19343
 
19521
19344