(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["biblioPlayer"] = factory();
else
root["biblioPlayer"] = factory();
})((typeof self !== 'undefined' ? self : this), function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
/******/ })
/************************************************************************/
/******/ ({
/***/ "00ee":
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__("b622");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};
test[TO_STRING_TAG] = 'z';
module.exports = String(test) === '[object z]';
/***/ }),
/***/ "0366":
/***/ (function(module, exports, __webpack_require__) {
var uncurryThis = __webpack_require__("e330");
var aCallable = __webpack_require__("59ed");
var bind = uncurryThis(uncurryThis.bind);
// optional / simple context binding
module.exports = function (fn, that) {
aCallable(fn);
return that === undefined ? fn : bind ? bind(fn, that) : function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/***/ "06cf":
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("83ab");
var call = __webpack_require__("c65b");
var propertyIsEnumerableModule = __webpack_require__("d1e7");
var createPropertyDescriptor = __webpack_require__("5c6c");
var toIndexedObject = __webpack_require__("fc6a");
var toPropertyKey = __webpack_require__("a04b");
var hasOwn = __webpack_require__("1a2d");
var IE8_DOM_DEFINE = __webpack_require__("0cfb");
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPropertyKey(P);
if (IE8_DOM_DEFINE) try {
return $getOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }
if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
};
/***/ }),
/***/ "07fa":
/***/ (function(module, exports, __webpack_require__) {
var toLength = __webpack_require__("50c4");
// `LengthOfArrayLike` abstract operation
// https://tc39.es/ecma262/#sec-lengthofarraylike
module.exports = function (obj) {
return toLength(obj.length);
};
/***/ }),
/***/ "0a06":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__("c532");
var buildURL = __webpack_require__("30b5");
var InterceptorManager = __webpack_require__("f6b4");
var dispatchRequest = __webpack_require__("5270");
var mergeConfig = __webpack_require__("4a7b");
var validator = __webpack_require__("848b");
var validators = validator.validators;
/**
* Create a new instance of Axios
*
* @param {Object} instanceConfig The default config for the instance
*/
function Axios(instanceConfig) {
this.defaults = instanceConfig;
this.interceptors = {
request: new InterceptorManager(),
response: new InterceptorManager()
};
}
/**
* Dispatch a request
*
* @param {Object} config The config specific for this request (merged with this.defaults)
*/
Axios.prototype.request = function request(config) {
/*eslint no-param-reassign:0*/
// Allow for axios('example/url'[, config]) a la fetch API
if (typeof config === 'string') {
config = arguments[1] || {};
config.url = arguments[0];
} else {
config = config || {};
}
config = mergeConfig(this.defaults, config);
// Set config.method
if (config.method) {
config.method = config.method.toLowerCase();
} else if (this.defaults.method) {
config.method = this.defaults.method.toLowerCase();
} else {
config.method = 'get';
}
var transitional = config.transitional;
if (transitional !== undefined) {
validator.assertOptions(transitional, {
silentJSONParsing: validators.transitional(validators.boolean),
forcedJSONParsing: validators.transitional(validators.boolean),
clarifyTimeoutError: validators.transitional(validators.boolean)
}, false);
}
// filter out skipped interceptors
var requestInterceptorChain = [];
var synchronousRequestInterceptors = true;
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
return;
}
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
});
var responseInterceptorChain = [];
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
});
var promise;
if (!synchronousRequestInterceptors) {
var chain = [dispatchRequest, undefined];
Array.prototype.unshift.apply(chain, requestInterceptorChain);
chain = chain.concat(responseInterceptorChain);
promise = Promise.resolve(config);
while (chain.length) {
promise = promise.then(chain.shift(), chain.shift());
}
return promise;
}
var newConfig = config;
while (requestInterceptorChain.length) {
var onFulfilled = requestInterceptorChain.shift();
var onRejected = requestInterceptorChain.shift();
try {
newConfig = onFulfilled(newConfig);
} catch (error) {
onRejected(error);
break;
}
}
try {
promise = dispatchRequest(newConfig);
} catch (error) {
return Promise.reject(error);
}
while (responseInterceptorChain.length) {
promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
}
return promise;
};
Axios.prototype.getUri = function getUri(config) {
config = mergeConfig(this.defaults, config);
return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
};
// Provide aliases for supported request methods
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
/*eslint func-names:0*/
Axios.prototype[method] = function(url, config) {
return this.request(mergeConfig(config || {}, {
method: method,
url: url,
data: (config || {}).data
}));
};
});
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
/*eslint func-names:0*/
Axios.prototype[method] = function(url, data, config) {
return this.request(mergeConfig(config || {}, {
method: method,
url: url,
data: data
}));
};
});
module.exports = Axios;
/***/ }),
/***/ "0b42":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var isArray = __webpack_require__("e8b5");
var isConstructor = __webpack_require__("68ee");
var isObject = __webpack_require__("861d");
var wellKnownSymbol = __webpack_require__("b622");
var SPECIES = wellKnownSymbol('species');
var Array = global.Array;
// a part of `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray) {
var C;
if (isArray(originalArray)) {
C = originalArray.constructor;
// cross-realm fallback
if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;
else if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return C === undefined ? Array : C;
};
/***/ }),
/***/ "0cfb":
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("83ab");
var fails = __webpack_require__("d039");
var createElement = __webpack_require__("cc12");
// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing
return Object.defineProperty(createElement('div'), 'a', {
get: function () { return 7; }
}).a != 7;
});
/***/ }),
/***/ "0d51":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var String = global.String;
module.exports = function (argument) {
try {
return String(argument);
} catch (error) {
return 'Object';
}
};
/***/ }),
/***/ "0df6":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Syntactic sugar for invoking a function and expanding an array for arguments.
*
* Common use case would be to use `Function.prototype.apply`.
*
* ```js
* function f(x, y, z) {}
* var args = [1, 2, 3];
* f.apply(null, args);
* ```
*
* With `spread` this example can be re-written.
*
* ```js
* spread(function(x, y, z) {})([1, 2, 3]);
* ```
*
* @param {Function} callback
* @returns {Function}
*/
module.exports = function spread(callback) {
return function wrap(arr) {
return callback.apply(null, arr);
};
};
/***/ }),
/***/ "107c":
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__("d039");
var global = __webpack_require__("da84");
// babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError
var $RegExp = global.RegExp;
module.exports = fails(function () {
var re = $RegExp('(?b)', 'g');
return re.exec('b').groups.a !== 'b' ||
'b'.replace(re, '$c') !== 'bc';
});
/***/ }),
/***/ "14c3":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var call = __webpack_require__("c65b");
var anObject = __webpack_require__("825a");
var isCallable = __webpack_require__("1626");
var classof = __webpack_require__("c6b6");
var regexpExec = __webpack_require__("9263");
var TypeError = global.TypeError;
// `RegExpExec` abstract operation
// https://tc39.es/ecma262/#sec-regexpexec
module.exports = function (R, S) {
var exec = R.exec;
if (isCallable(exec)) {
var result = call(exec, R, S);
if (result !== null) anObject(result);
return result;
}
if (classof(R) === 'RegExp') return call(regexpExec, R, S);
throw TypeError('RegExp#exec called on incompatible receiver');
};
/***/ }),
/***/ "1626":
/***/ (function(module, exports) {
// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
module.exports = function (argument) {
return typeof argument == 'function';
};
/***/ }),
/***/ "1a2d":
/***/ (function(module, exports, __webpack_require__) {
var uncurryThis = __webpack_require__("e330");
var toObject = __webpack_require__("7b0b");
var hasOwnProperty = uncurryThis({}.hasOwnProperty);
// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
module.exports = Object.hasOwn || function hasOwn(it, key) {
return hasOwnProperty(toObject(it), key);
};
/***/ }),
/***/ "1af3":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Track_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2d70");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Track_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Track_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
/***/ }),
/***/ "1be4":
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__("d066");
module.exports = getBuiltIn('document', 'documentElement');
/***/ }),
/***/ "1d2b":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function bind(fn, thisArg) {
return function wrap() {
var args = new Array(arguments.length);
for (var i = 0; i < args.length; i++) {
args[i] = arguments[i];
}
return fn.apply(thisArg, args);
};
};
/***/ }),
/***/ "1d80":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var TypeError = global.TypeError;
// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/***/ "1dde":
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__("d039");
var wellKnownSymbol = __webpack_require__("b622");
var V8_VERSION = __webpack_require__("2d00");
var SPECIES = wellKnownSymbol('species');
module.exports = function (METHOD_NAME) {
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/677
return V8_VERSION >= 51 || !fails(function () {
var array = [];
var constructor = array.constructor = {};
constructor[SPECIES] = function () {
return { foo: 1 };
};
return array[METHOD_NAME](Boolean).foo !== 1;
});
};
/***/ }),
/***/ "1e5c":
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
* howler.js v2.2.3
* howlerjs.com
*
* (c) 2013-2020, James Simpson of GoldFire Studios
* goldfirestudios.com
*
* MIT License
*/
(function() {
'use strict';
/** Global Methods **/
/***************************************************************************/
/**
* Create the global controller. All contained methods and properties apply
* to all sounds that are currently playing or will be in the future.
*/
var HowlerGlobal = function() {
this.init();
};
HowlerGlobal.prototype = {
/**
* Initialize the global Howler object.
* @return {Howler}
*/
init: function() {
var self = this || Howler;
// Create a global ID counter.
self._counter = 1000;
// Pool of unlocked HTML5 Audio objects.
self._html5AudioPool = [];
self.html5PoolSize = 10;
// Internal properties.
self._codecs = {};
self._howls = [];
self._muted = false;
self._volume = 1;
self._canPlayEvent = 'canplaythrough';
self._navigator = (typeof window !== 'undefined' && window.navigator) ? window.navigator : null;
// Public properties.
self.masterGain = null;
self.noAudio = false;
self.usingWebAudio = true;
self.autoSuspend = true;
self.ctx = null;
// Set to false to disable the auto audio unlocker.
self.autoUnlock = true;
// Setup the various state values for global tracking.
self._setup();
return self;
},
/**
* Get/set the global volume for all sounds.
* @param {Float} vol Volume from 0.0 to 1.0.
* @return {Howler/Float} Returns self or current volume.
*/
volume: function(vol) {
var self = this || Howler;
vol = parseFloat(vol);
// If we don't have an AudioContext created yet, run the setup.
if (!self.ctx) {
setupAudioContext();
}
if (typeof vol !== 'undefined' && vol >= 0 && vol <= 1) {
self._volume = vol;
// Don't update any of the nodes if we are muted.
if (self._muted) {
return self;
}
// When using Web Audio, we just need to adjust the master gain.
if (self.usingWebAudio) {
self.masterGain.gain.setValueAtTime(vol, Howler.ctx.currentTime);
}
// Loop through and change volume for all HTML5 audio nodes.
for (var i=0; i=0; i--) {
self._howls[i].unload();
}
// Create a new AudioContext to make sure it is fully reset.
if (self.usingWebAudio && self.ctx && typeof self.ctx.close !== 'undefined') {
self.ctx.close();
self.ctx = null;
setupAudioContext();
}
return self;
},
/**
* Check for codec support of specific extension.
* @param {String} ext Audio file extention.
* @return {Boolean}
*/
codecs: function(ext) {
return (this || Howler)._codecs[ext.replace(/^x-/, '')];
},
/**
* Setup various state values for global tracking.
* @return {Howler}
*/
_setup: function() {
var self = this || Howler;
// Keeps track of the suspend/resume state of the AudioContext.
self.state = self.ctx ? self.ctx.state || 'suspended' : 'suspended';
// Automatically begin the 30-second suspend process
self._autoSuspend();
// Check if audio is available.
if (!self.usingWebAudio) {
// No audio is available on this system if noAudio is set to true.
if (typeof Audio !== 'undefined') {
try {
var test = new Audio();
// Check if the canplaythrough event is available.
if (typeof test.oncanplaythrough === 'undefined') {
self._canPlayEvent = 'canplay';
}
} catch(e) {
self.noAudio = true;
}
} else {
self.noAudio = true;
}
}
// Test to make sure audio isn't disabled in Internet Explorer.
try {
var test = new Audio();
if (test.muted) {
self.noAudio = true;
}
} catch (e) {}
// Check for supported codecs.
if (!self.noAudio) {
self._setupCodecs();
}
return self;
},
/**
* Check for browser support for various codecs and cache the results.
* @return {Howler}
*/
_setupCodecs: function() {
var self = this || Howler;
var audioTest = null;
// Must wrap in a try/catch because IE11 in server mode throws an error.
try {
audioTest = (typeof Audio !== 'undefined') ? new Audio() : null;
} catch (err) {
return self;
}
if (!audioTest || typeof audioTest.canPlayType !== 'function') {
return self;
}
var mpegTest = audioTest.canPlayType('audio/mpeg;').replace(/^no$/, '');
// Opera version <33 has mixed MP3 support, so we need to check for and block it.
var ua = self._navigator ? self._navigator.userAgent : '';
var checkOpera = ua.match(/OPR\/([0-6].)/g);
var isOldOpera = (checkOpera && parseInt(checkOpera[0].split('/')[1], 10) < 33);
var checkSafari = ua.indexOf('Safari') !== -1 && ua.indexOf('Chrome') === -1;
var safariVersion = ua.match(/Version\/(.*?) /);
var isOldSafari = (checkSafari && safariVersion && parseInt(safariVersion[1], 10) < 15);
self._codecs = {
mp3: !!(!isOldOpera && (mpegTest || audioTest.canPlayType('audio/mp3;').replace(/^no$/, ''))),
mpeg: !!mpegTest,
opus: !!audioTest.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, ''),
ogg: !!audioTest.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ''),
oga: !!audioTest.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ''),
wav: !!(audioTest.canPlayType('audio/wav; codecs="1"') || audioTest.canPlayType('audio/wav')).replace(/^no$/, ''),
aac: !!audioTest.canPlayType('audio/aac;').replace(/^no$/, ''),
caf: !!audioTest.canPlayType('audio/x-caf;').replace(/^no$/, ''),
m4a: !!(audioTest.canPlayType('audio/x-m4a;') || audioTest.canPlayType('audio/m4a;') || audioTest.canPlayType('audio/aac;')).replace(/^no$/, ''),
m4b: !!(audioTest.canPlayType('audio/x-m4b;') || audioTest.canPlayType('audio/m4b;') || audioTest.canPlayType('audio/aac;')).replace(/^no$/, ''),
mp4: !!(audioTest.canPlayType('audio/x-mp4;') || audioTest.canPlayType('audio/mp4;') || audioTest.canPlayType('audio/aac;')).replace(/^no$/, ''),
weba: !!(!isOldSafari && audioTest.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, '')),
webm: !!(!isOldSafari && audioTest.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, '')),
dolby: !!audioTest.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/, ''),
flac: !!(audioTest.canPlayType('audio/x-flac;') || audioTest.canPlayType('audio/flac;')).replace(/^no$/, '')
};
return self;
},
/**
* Some browsers/devices will only allow audio to be played after a user interaction.
* Attempt to automatically unlock audio on the first user interaction.
* Concept from: http://paulbakaus.com/tutorials/html5/web-audio-on-ios/
* @return {Howler}
*/
_unlockAudio: function() {
var self = this || Howler;
// Only run this if Web Audio is supported and it hasn't already been unlocked.
if (self._audioUnlocked || !self.ctx) {
return;
}
self._audioUnlocked = false;
self.autoUnlock = false;
// Some mobile devices/platforms have distortion issues when opening/closing tabs and/or web views.
// Bugs in the browser (especially Mobile Safari) can cause the sampleRate to change from 44100 to 48000.
// By calling Howler.unload(), we create a new AudioContext with the correct sampleRate.
if (!self._mobileUnloaded && self.ctx.sampleRate !== 44100) {
self._mobileUnloaded = true;
self.unload();
}
// Scratch buffer for enabling iOS to dispose of web audio buffers correctly, as per:
// http://stackoverflow.com/questions/24119684
self._scratchBuffer = self.ctx.createBuffer(1, 1, 22050);
// Call this method on touch start to create and play a buffer,
// then check if the audio actually played to determine if
// audio has now been unlocked on iOS, Android, etc.
var unlock = function(e) {
// Create a pool of unlocked HTML5 Audio objects that can
// be used for playing sounds without user interaction. HTML5
// Audio objects must be individually unlocked, as opposed
// to the WebAudio API which only needs a single activation.
// This must occur before WebAudio setup or the source.onended
// event will not fire.
while (self._html5AudioPool.length < self.html5PoolSize) {
try {
var audioNode = new Audio();
// Mark this Audio object as unlocked to ensure it can get returned
// to the unlocked pool when released.
audioNode._unlocked = true;
// Add the audio node to the pool.
self._releaseHtml5Audio(audioNode);
} catch (e) {
self.noAudio = true;
break;
}
}
// Loop through any assigned audio nodes and unlock them.
for (var i=0; i= 55.
if (typeof self.ctx.resume === 'function') {
self.ctx.resume();
}
// Setup a timeout to check that we are unlocked on the next event loop.
source.onended = function() {
source.disconnect(0);
// Update the unlocked state and prevent this check from happening again.
self._audioUnlocked = true;
// Remove the touch start listener.
document.removeEventListener('touchstart', unlock, true);
document.removeEventListener('touchend', unlock, true);
document.removeEventListener('click', unlock, true);
document.removeEventListener('keydown', unlock, true);
// Let all sounds know that audio has been unlocked.
for (var i=0; i 0 ? sound._seek : self._sprite[sprite][0] / 1000);
var duration = Math.max(0, ((self._sprite[sprite][0] + self._sprite[sprite][1]) / 1000) - seek);
var timeout = (duration * 1000) / Math.abs(sound._rate);
var start = self._sprite[sprite][0] / 1000;
var stop = (self._sprite[sprite][0] + self._sprite[sprite][1]) / 1000;
sound._sprite = sprite;
// Mark the sound as ended instantly so that this async playback
// doesn't get grabbed by another call to play while this one waits to start.
sound._ended = false;
// Update the parameters of the sound.
var setParams = function() {
sound._paused = false;
sound._seek = seek;
sound._start = start;
sound._stop = stop;
sound._loop = !!(sound._loop || self._sprite[sprite][2]);
};
// End the sound instantly if seek is at the end.
if (seek >= stop) {
self._ended(sound);
return;
}
// Begin the actual playback.
var node = sound._node;
if (self._webAudio) {
// Fire this when the sound is ready to play to begin Web Audio playback.
var playWebAudio = function() {
self._playLock = false;
setParams();
self._refreshBuffer(sound);
// Setup the playback params.
var vol = (sound._muted || self._muted) ? 0 : sound._volume;
node.gain.setValueAtTime(vol, Howler.ctx.currentTime);
sound._playStart = Howler.ctx.currentTime;
// Play the sound using the supported method.
if (typeof node.bufferSource.start === 'undefined') {
sound._loop ? node.bufferSource.noteGrainOn(0, seek, 86400) : node.bufferSource.noteGrainOn(0, seek, duration);
} else {
sound._loop ? node.bufferSource.start(0, seek, 86400) : node.bufferSource.start(0, seek, duration);
}
// Start a new timer if none is present.
if (timeout !== Infinity) {
self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout);
}
if (!internal) {
setTimeout(function() {
self._emit('play', sound._id);
self._loadQueue();
}, 0);
}
};
if (Howler.state === 'running' && Howler.ctx.state !== 'interrupted') {
playWebAudio();
} else {
self._playLock = true;
// Wait for the audio context to resume before playing.
self.once('resume', playWebAudio);
// Cancel the end timer.
self._clearTimer(sound._id);
}
} else {
// Fire this when the sound is ready to play to begin HTML5 Audio playback.
var playHtml5 = function() {
node.currentTime = seek;
node.muted = sound._muted || self._muted || Howler._muted || node.muted;
node.volume = sound._volume * Howler.volume();
node.playbackRate = sound._rate;
// Some browsers will throw an error if this is called without user interaction.
try {
var play = node.play();
// Support older browsers that don't support promises, and thus don't have this issue.
if (play && typeof Promise !== 'undefined' && (play instanceof Promise || typeof play.then === 'function')) {
// Implements a lock to prevent DOMException: The play() request was interrupted by a call to pause().
self._playLock = true;
// Set param values immediately.
setParams();
// Releases the lock and executes queued actions.
play
.then(function() {
self._playLock = false;
node._unlocked = true;
if (!internal) {
self._emit('play', sound._id);
} else {
self._loadQueue();
}
})
.catch(function() {
self._playLock = false;
self._emit('playerror', sound._id, 'Playback was unable to start. This is most commonly an issue ' +
'on mobile devices and Chrome where playback was not within a user interaction.');
// Reset the ended and paused values.
sound._ended = true;
sound._paused = true;
});
} else if (!internal) {
self._playLock = false;
setParams();
self._emit('play', sound._id);
}
// Setting rate before playing won't work in IE, so we set it again here.
node.playbackRate = sound._rate;
// If the node is still paused, then we can assume there was a playback issue.
if (node.paused) {
self._emit('playerror', sound._id, 'Playback was unable to start. This is most commonly an issue ' +
'on mobile devices and Chrome where playback was not within a user interaction.');
return;
}
// Setup the end timer on sprites or listen for the ended event.
if (sprite !== '__default' || sound._loop) {
self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout);
} else {
self._endTimers[sound._id] = function() {
// Fire ended on this audio node.
self._ended(sound);
// Clear this listener.
node.removeEventListener('ended', self._endTimers[sound._id], false);
};
node.addEventListener('ended', self._endTimers[sound._id], false);
}
} catch (err) {
self._emit('playerror', sound._id, err);
}
};
// If this is streaming audio, make sure the src is set and load again.
if (node.src === 'data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA') {
node.src = self._src;
node.load();
}
// Play immediately if ready, or wait for the 'canplaythrough'e vent.
var loadedNoReadyState = (window && window.ejecta) || (!node.readyState && Howler._navigator.isCocoonJS);
if (node.readyState >= 3 || loadedNoReadyState) {
playHtml5();
} else {
self._playLock = true;
self._state = 'loading';
var listener = function() {
self._state = 'loaded';
// Begin playback.
playHtml5();
// Clear this listener.
node.removeEventListener(Howler._canPlayEvent, listener, false);
};
node.addEventListener(Howler._canPlayEvent, listener, false);
// Cancel the end timer.
self._clearTimer(sound._id);
}
}
return sound._id;
},
/**
* Pause playback and save current position.
* @param {Number} id The sound ID (empty to pause all in group).
* @return {Howl}
*/
pause: function(id) {
var self = this;
// If the sound hasn't loaded or a play() promise is pending, add it to the load queue to pause when capable.
if (self._state !== 'loaded' || self._playLock) {
self._queue.push({
event: 'pause',
action: function() {
self.pause(id);
}
});
return self;
}
// If no id is passed, get all ID's to be paused.
var ids = self._getSoundIds(id);
for (var i=0; i Returns the group's volume value.
* volume(id) -> Returns the sound id's current volume.
* volume(vol) -> Sets the volume of all sounds in this Howl group.
* volume(vol, id) -> Sets the volume of passed sound id.
* @return {Howl/Number} Returns self or current volume.
*/
volume: function() {
var self = this;
var args = arguments;
var vol, id;
// Determine the values based on arguments.
if (args.length === 0) {
// Return the value of the groups' volume.
return self._volume;
} else if (args.length === 1 || args.length === 2 && typeof args[1] === 'undefined') {
// First check if this is an ID, and if not, assume it is a new volume.
var ids = self._getSoundIds();
var index = ids.indexOf(args[0]);
if (index >= 0) {
id = parseInt(args[0], 10);
} else {
vol = parseFloat(args[0]);
}
} else if (args.length >= 2) {
vol = parseFloat(args[0]);
id = parseInt(args[1], 10);
}
// Update the volume or return the current volume.
var sound;
if (typeof vol !== 'undefined' && vol >= 0 && vol <= 1) {
// If the sound hasn't loaded, add it to the load queue to change volume when capable.
if (self._state !== 'loaded'|| self._playLock) {
self._queue.push({
event: 'volume',
action: function() {
self.volume.apply(self, args);
}
});
return self;
}
// Set the group volume.
if (typeof id === 'undefined') {
self._volume = vol;
}
// Update one or all volumes.
id = self._getSoundIds(id);
for (var i=0; i 0) ? len / steps : len);
var lastTick = Date.now();
// Store the value being faded to.
sound._fadeTo = to;
// Update the volume value on each interval tick.
sound._interval = setInterval(function() {
// Update the volume based on the time since the last tick.
var tick = (Date.now() - lastTick) / len;
lastTick = Date.now();
vol += diff * tick;
// Round to within 2 decimal points.
vol = Math.round(vol * 100) / 100;
// Make sure the volume is in the right bounds.
if (diff < 0) {
vol = Math.max(to, vol);
} else {
vol = Math.min(to, vol);
}
// Change the volume.
if (self._webAudio) {
sound._volume = vol;
} else {
self.volume(vol, sound._id, true);
}
// Set the group's volume.
if (isGroup) {
self._volume = vol;
}
// When the fade is complete, stop it and fire event.
if ((to < from && vol <= to) || (to > from && vol >= to)) {
clearInterval(sound._interval);
sound._interval = null;
sound._fadeTo = null;
self.volume(to, sound._id);
self._emit('fade', sound._id);
}
}, stepLen);
},
/**
* Internal method that stops the currently playing fade when
* a new fade starts, volume is changed or the sound is stopped.
* @param {Number} id The sound id.
* @return {Howl}
*/
_stopFade: function(id) {
var self = this;
var sound = self._soundById(id);
if (sound && sound._interval) {
if (self._webAudio) {
sound._node.gain.cancelScheduledValues(Howler.ctx.currentTime);
}
clearInterval(sound._interval);
sound._interval = null;
self.volume(sound._fadeTo, id);
sound._fadeTo = null;
self._emit('fade', id);
}
return self;
},
/**
* Get/set the loop parameter on a sound. This method can optionally take 0, 1 or 2 arguments.
* loop() -> Returns the group's loop value.
* loop(id) -> Returns the sound id's loop value.
* loop(loop) -> Sets the loop value for all sounds in this Howl group.
* loop(loop, id) -> Sets the loop value of passed sound id.
* @return {Howl/Boolean} Returns self or current loop value.
*/
loop: function() {
var self = this;
var args = arguments;
var loop, id, sound;
// Determine the values for loop and id.
if (args.length === 0) {
// Return the grou's loop value.
return self._loop;
} else if (args.length === 1) {
if (typeof args[0] === 'boolean') {
loop = args[0];
self._loop = loop;
} else {
// Return this sound's loop value.
sound = self._soundById(parseInt(args[0], 10));
return sound ? sound._loop : false;
}
} else if (args.length === 2) {
loop = args[0];
id = parseInt(args[1], 10);
}
// If no id is passed, get all ID's to be looped.
var ids = self._getSoundIds(id);
for (var i=0; i Returns the first sound node's current playback rate.
* rate(id) -> Returns the sound id's current playback rate.
* rate(rate) -> Sets the playback rate of all sounds in this Howl group.
* rate(rate, id) -> Sets the playback rate of passed sound id.
* @return {Howl/Number} Returns self or the current playback rate.
*/
rate: function() {
var self = this;
var args = arguments;
var rate, id;
// Determine the values based on arguments.
if (args.length === 0) {
// We will simply return the current rate of the first node.
id = self._sounds[0]._id;
} else if (args.length === 1) {
// First check if this is an ID, and if not, assume it is a new rate value.
var ids = self._getSoundIds();
var index = ids.indexOf(args[0]);
if (index >= 0) {
id = parseInt(args[0], 10);
} else {
rate = parseFloat(args[0]);
}
} else if (args.length === 2) {
rate = parseFloat(args[0]);
id = parseInt(args[1], 10);
}
// Update the playback rate or return the current value.
var sound;
if (typeof rate === 'number') {
// If the sound hasn't loaded, add it to the load queue to change playback rate when capable.
if (self._state !== 'loaded' || self._playLock) {
self._queue.push({
event: 'rate',
action: function() {
self.rate.apply(self, args);
}
});
return self;
}
// Set the group rate.
if (typeof id === 'undefined') {
self._rate = rate;
}
// Update one or all volumes.
id = self._getSoundIds(id);
for (var i=0; i Returns the first sound node's current seek position.
* seek(id) -> Returns the sound id's current seek position.
* seek(seek) -> Sets the seek position of the first sound node.
* seek(seek, id) -> Sets the seek position of passed sound id.
* @return {Howl/Number} Returns self or the current seek position.
*/
seek: function() {
var self = this;
var args = arguments;
var seek, id;
// Determine the values based on arguments.
if (args.length === 0) {
// We will simply return the current position of the first node.
if (self._sounds.length) {
id = self._sounds[0]._id;
}
} else if (args.length === 1) {
// First check if this is an ID, and if not, assume it is a new seek position.
var ids = self._getSoundIds();
var index = ids.indexOf(args[0]);
if (index >= 0) {
id = parseInt(args[0], 10);
} else if (self._sounds.length) {
id = self._sounds[0]._id;
seek = parseFloat(args[0]);
}
} else if (args.length === 2) {
seek = parseFloat(args[0]);
id = parseInt(args[1], 10);
}
// If there is no ID, bail out.
if (typeof id === 'undefined') {
return 0;
}
// If the sound hasn't loaded, add it to the load queue to seek when capable.
if (typeof seek === 'number' && (self._state !== 'loaded' || self._playLock)) {
self._queue.push({
event: 'seek',
action: function() {
self.seek.apply(self, args);
}
});
return self;
}
// Get the sound.
var sound = self._soundById(id);
if (sound) {
if (typeof seek === 'number' && seek >= 0) {
// Pause the sound and update position for restarting playback.
var playing = self.playing(id);
if (playing) {
self.pause(id, true);
}
// Move the position of the track and cancel timer.
sound._seek = seek;
sound._ended = false;
self._clearTimer(id);
// Update the seek position for HTML5 Audio.
if (!self._webAudio && sound._node && !isNaN(sound._node.duration)) {
sound._node.currentTime = seek;
}
// Seek and emit when ready.
var seekAndEmit = function() {
// Restart the playback if the sound was playing.
if (playing) {
self.play(id, true);
}
self._emit('seek', id);
};
// Wait for the play lock to be unset before emitting (HTML5 Audio).
if (playing && !self._webAudio) {
var emitSeek = function() {
if (!self._playLock) {
seekAndEmit();
} else {
setTimeout(emitSeek, 0);
}
};
setTimeout(emitSeek, 0);
} else {
seekAndEmit();
}
} else {
if (self._webAudio) {
var realTime = self.playing(id) ? Howler.ctx.currentTime - sound._playStart : 0;
var rateSeek = sound._rateSeek ? sound._rateSeek - sound._seek : 0;
return sound._seek + (rateSeek + realTime * Math.abs(sound._rate));
} else {
return sound._node.currentTime;
}
}
}
return self;
},
/**
* Check if a specific sound is currently playing or not (if id is provided), or check if at least one of the sounds in the group is playing or not.
* @param {Number} id The sound id to check. If none is passed, the whole sound group is checked.
* @return {Boolean} True if playing and false if not.
*/
playing: function(id) {
var self = this;
// Check the passed sound ID (if any).
if (typeof id === 'number') {
var sound = self._soundById(id);
return sound ? !sound._paused : false;
}
// Otherwise, loop through all sounds and check if any are playing.
for (var i=0; i= 0) {
Howler._howls.splice(index, 1);
}
// Delete this sound from the cache (if no other Howl is using it).
var remCache = true;
for (i=0; i= 0) {
remCache = false;
break;
}
}
if (cache && remCache) {
delete cache[self._src];
}
// Clear global errors.
Howler.noAudio = false;
// Clear out `self`.
self._state = 'unloaded';
self._sounds = [];
self = null;
return null;
},
/**
* Listen to a custom event.
* @param {String} event Event name.
* @param {Function} fn Listener to call.
* @param {Number} id (optional) Only listen to events for this sound.
* @param {Number} once (INTERNAL) Marks event to fire only once.
* @return {Howl}
*/
on: function(event, fn, id, once) {
var self = this;
var events = self['_on' + event];
if (typeof fn === 'function') {
events.push(once ? {id: id, fn: fn, once: once} : {id: id, fn: fn});
}
return self;
},
/**
* Remove a custom event. Call without parameters to remove all events.
* @param {String} event Event name.
* @param {Function} fn Listener to remove. Leave empty to remove all.
* @param {Number} id (optional) Only remove events for this sound.
* @return {Howl}
*/
off: function(event, fn, id) {
var self = this;
var events = self['_on' + event];
var i = 0;
// Allow passing just an event and ID.
if (typeof fn === 'number') {
id = fn;
fn = null;
}
if (fn || id) {
// Loop through event store and remove the passed function.
for (i=0; i=0; i--) {
// Only fire the listener if the correct ID is used.
if (!events[i].id || events[i].id === id || event === 'load') {
setTimeout(function(fn) {
fn.call(this, id, msg);
}.bind(self, events[i].fn), 0);
// If this event was setup with `once`, remove it.
if (events[i].once) {
self.off(event, events[i].fn, events[i].id);
}
}
}
// Pass the event type into load queue so that it can continue stepping.
self._loadQueue(event);
return self;
},
/**
* Queue of actions initiated before the sound has loaded.
* These will be called in sequence, with the next only firing
* after the previous has finished executing (even if async like play).
* @return {Howl}
*/
_loadQueue: function(event) {
var self = this;
if (self._queue.length > 0) {
var task = self._queue[0];
// Remove this task if a matching event was passed.
if (task.event === event) {
self._queue.shift();
self._loadQueue();
}
// Run the task if no event type is passed.
if (!event) {
task.action();
}
}
return self;
},
/**
* Fired when playback ends at the end of the duration.
* @param {Sound} sound The sound object to work with.
* @return {Howl}
*/
_ended: function(sound) {
var self = this;
var sprite = sound._sprite;
// If we are using IE and there was network latency we may be clipping
// audio before it completes playing. Lets check the node to make sure it
// believes it has completed, before ending the playback.
if (!self._webAudio && sound._node && !sound._node.paused && !sound._node.ended && sound._node.currentTime < sound._stop) {
setTimeout(self._ended.bind(self, sound), 100);
return self;
}
// Should this sound loop?
var loop = !!(sound._loop || self._sprite[sprite][2]);
// Fire the ended event.
self._emit('end', sound._id);
// Restart the playback for HTML5 Audio loop.
if (!self._webAudio && loop) {
self.stop(sound._id, true).play(sound._id);
}
// Restart this timer if on a Web Audio loop.
if (self._webAudio && loop) {
self._emit('play', sound._id);
sound._seek = sound._start || 0;
sound._rateSeek = 0;
sound._playStart = Howler.ctx.currentTime;
var timeout = ((sound._stop - sound._start) * 1000) / Math.abs(sound._rate);
self._endTimers[sound._id] = setTimeout(self._ended.bind(self, sound), timeout);
}
// Mark the node as paused.
if (self._webAudio && !loop) {
sound._paused = true;
sound._ended = true;
sound._seek = sound._start || 0;
sound._rateSeek = 0;
self._clearTimer(sound._id);
// Clean up the buffer source.
self._cleanBuffer(sound._node);
// Attempt to auto-suspend AudioContext if no sounds are still playing.
Howler._autoSuspend();
}
// When using a sprite, end the track.
if (!self._webAudio && !loop) {
self.stop(sound._id, true);
}
return self;
},
/**
* Clear the end timer for a sound playback.
* @param {Number} id The sound ID.
* @return {Howl}
*/
_clearTimer: function(id) {
var self = this;
if (self._endTimers[id]) {
// Clear the timeout or remove the ended listener.
if (typeof self._endTimers[id] !== 'function') {
clearTimeout(self._endTimers[id]);
} else {
var sound = self._soundById(id);
if (sound && sound._node) {
sound._node.removeEventListener('ended', self._endTimers[id], false);
}
}
delete self._endTimers[id];
}
return self;
},
/**
* Return the sound identified by this ID, or return null.
* @param {Number} id Sound ID
* @return {Object} Sound object or null.
*/
_soundById: function(id) {
var self = this;
// Loop through all sounds and find the one with this ID.
for (var i=0; i=0; i--) {
if (cnt <= limit) {
return;
}
if (self._sounds[i]._ended) {
// Disconnect the audio source when using Web Audio.
if (self._webAudio && self._sounds[i]._node) {
self._sounds[i]._node.disconnect(0);
}
// Remove sounds until we have the pool size.
self._sounds.splice(i, 1);
cnt--;
}
}
},
/**
* Get all ID's from the sounds pool.
* @param {Number} id Only return one ID if one is passed.
* @return {Array} Array of IDs.
*/
_getSoundIds: function(id) {
var self = this;
if (typeof id === 'undefined') {
var ids = [];
for (var i=0; i= 0;
if (Howler._scratchBuffer && node.bufferSource) {
node.bufferSource.onended = null;
node.bufferSource.disconnect(0);
if (isIOS) {
try { node.bufferSource.buffer = Howler._scratchBuffer; } catch(e) {}
}
}
node.bufferSource = null;
return self;
},
/**
* Set the source to a 0-second silence to stop any downloading (except in IE).
* @param {Object} node Audio node to clear.
*/
_clearSound: function(node) {
var checkIE = /MSIE |Trident\//.test(Howler._navigator && Howler._navigator.userAgent);
if (!checkIE) {
node.src = 'data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA';
}
}
};
/** Single Sound Methods **/
/***************************************************************************/
/**
* Setup the sound object, which each node attached to a Howl group is contained in.
* @param {Object} howl The Howl parent group.
*/
var Sound = function(howl) {
this._parent = howl;
this.init();
};
Sound.prototype = {
/**
* Initialize a new Sound object.
* @return {Sound}
*/
init: function() {
var self = this;
var parent = self._parent;
// Setup the default parameters.
self._muted = parent._muted;
self._loop = parent._loop;
self._volume = parent._volume;
self._rate = parent._rate;
self._seek = 0;
self._paused = true;
self._ended = true;
self._sprite = '__default';
// Generate a unique ID for this sound.
self._id = ++Howler._counter;
// Add itself to the parent's pool.
parent._sounds.push(self);
// Create the new node.
self.create();
return self;
},
/**
* Create and setup a new sound object, whether HTML5 Audio or Web Audio.
* @return {Sound}
*/
create: function() {
var self = this;
var parent = self._parent;
var volume = (Howler._muted || self._muted || self._parent._muted) ? 0 : self._volume;
if (parent._webAudio) {
// Create the gain node for controlling volume (the source will connect to this).
self._node = (typeof Howler.ctx.createGain === 'undefined') ? Howler.ctx.createGainNode() : Howler.ctx.createGain();
self._node.gain.setValueAtTime(volume, Howler.ctx.currentTime);
self._node.paused = true;
self._node.connect(Howler.masterGain);
} else if (!Howler.noAudio) {
// Get an unlocked Audio object from the pool.
self._node = Howler._obtainHtml5Audio();
// Listen for errors (http://dev.w3.org/html5/spec-author-view/spec.html#mediaerror).
self._errorFn = self._errorListener.bind(self);
self._node.addEventListener('error', self._errorFn, false);
// Listen for 'canplaythrough' event to let us know the sound is ready.
self._loadFn = self._loadListener.bind(self);
self._node.addEventListener(Howler._canPlayEvent, self._loadFn, false);
// Listen for the 'ended' event on the sound to account for edge-case where
// a finite sound has a duration of Infinity.
self._endFn = self._endListener.bind(self);
self._node.addEventListener('ended', self._endFn, false);
// Setup the new audio node.
self._node.src = parent._src;
self._node.preload = parent._preload === true ? 'auto' : parent._preload;
self._node.volume = volume * Howler.volume();
// Begin loading the source.
self._node.load();
}
return self;
},
/**
* Reset the parameters of this sound to the original state (for recycle).
* @return {Sound}
*/
reset: function() {
var self = this;
var parent = self._parent;
// Reset all of the parameters of this sound.
self._muted = parent._muted;
self._loop = parent._loop;
self._volume = parent._volume;
self._rate = parent._rate;
self._seek = 0;
self._rateSeek = 0;
self._paused = true;
self._ended = true;
self._sprite = '__default';
// Generate a new ID so that it isn't confused with the previous sound.
self._id = ++Howler._counter;
return self;
},
/**
* HTML5 Audio error listener callback.
*/
_errorListener: function() {
var self = this;
// Fire an error event and pass back the code.
self._parent._emit('loaderror', self._id, self._node.error ? self._node.error.code : 0);
// Clear the event listener.
self._node.removeEventListener('error', self._errorFn, false);
},
/**
* HTML5 Audio canplaythrough listener callback.
*/
_loadListener: function() {
var self = this;
var parent = self._parent;
// Round up the duration to account for the lower precision in HTML5 Audio.
parent._duration = Math.ceil(self._node.duration * 10) / 10;
// Setup a sprite if none is defined.
if (Object.keys(parent._sprite).length === 0) {
parent._sprite = {__default: [0, parent._duration * 1000]};
}
if (parent._state !== 'loaded') {
parent._state = 'loaded';
parent._emit('load');
parent._loadQueue();
}
// Clear the event listener.
self._node.removeEventListener(Howler._canPlayEvent, self._loadFn, false);
},
/**
* HTML5 Audio ended listener callback.
*/
_endListener: function() {
var self = this;
var parent = self._parent;
// Only handle the `ended`` event if the duration is Infinity.
if (parent._duration === Infinity) {
// Update the parent duration to match the real audio duration.
// Round up the duration to account for the lower precision in HTML5 Audio.
parent._duration = Math.ceil(self._node.duration * 10) / 10;
// Update the sprite that corresponds to the real duration.
if (parent._sprite.__default[1] === Infinity) {
parent._sprite.__default[1] = parent._duration * 1000;
}
// Run the regular ended method.
parent._ended(self);
}
// Clear the event listener since the duration is now correct.
self._node.removeEventListener('ended', self._endFn, false);
}
};
/** Helper Methods **/
/***************************************************************************/
var cache = {};
/**
* Buffer a sound from URL, Data URI or cache and decode to audio source (Web Audio API).
* @param {Howl} self
*/
var loadBuffer = function(self) {
var url = self._src;
// Check if the buffer has already been cached and use it instead.
if (cache[url]) {
// Set the duration from the cache.
self._duration = cache[url].duration;
// Load the sound into this Howl.
loadSound(self);
return;
}
if (/^data:[^;]+;base64,/.test(url)) {
// Decode the base64 data URI without XHR, since some browsers don't support it.
var data = atob(url.split(',')[1]);
var dataView = new Uint8Array(data.length);
for (var i=0; i 0) {
cache[self._src] = buffer;
loadSound(self, buffer);
} else {
error();
}
};
// Decode the buffer into an audio source.
if (typeof Promise !== 'undefined' && Howler.ctx.decodeAudioData.length === 1) {
Howler.ctx.decodeAudioData(arraybuffer).then(success).catch(error);
} else {
Howler.ctx.decodeAudioData(arraybuffer, success, error);
}
}
/**
* Sound is now loaded, so finish setting everything up and fire the loaded event.
* @param {Howl} self
* @param {Object} buffer The decoded buffer sound source.
*/
var loadSound = function(self, buffer) {
// Set the duration.
if (buffer && !self._duration) {
self._duration = buffer.duration;
}
// Setup a sprite if none is defined.
if (Object.keys(self._sprite).length === 0) {
self._sprite = {__default: [0, self._duration * 1000]};
}
// Fire the loaded event.
if (self._state !== 'loaded') {
self._state = 'loaded';
self._emit('load');
self._loadQueue();
}
};
/**
* Setup the audio context when available, or switch to HTML5 Audio mode.
*/
var setupAudioContext = function() {
// If we have already detected that Web Audio isn't supported, don't run this step again.
if (!Howler.usingWebAudio) {
return;
}
// Check if we are using Web Audio and setup the AudioContext if we are.
try {
if (typeof AudioContext !== 'undefined') {
Howler.ctx = new AudioContext();
} else if (typeof webkitAudioContext !== 'undefined') {
Howler.ctx = new webkitAudioContext();
} else {
Howler.usingWebAudio = false;
}
} catch(e) {
Howler.usingWebAudio = false;
}
// If the audio context creation still failed, set using web audio to false.
if (!Howler.ctx) {
Howler.usingWebAudio = false;
}
// Check if a webview is being used on iOS8 or earlier (rather than the browser).
// If it is, disable Web Audio as it causes crashing.
var iOS = (/iP(hone|od|ad)/.test(Howler._navigator && Howler._navigator.platform));
var appVersion = Howler._navigator && Howler._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
var version = appVersion ? parseInt(appVersion[1], 10) : null;
if (iOS && version && version < 9) {
var safari = /safari/.test(Howler._navigator && Howler._navigator.userAgent.toLowerCase());
if (Howler._navigator && !safari) {
Howler.usingWebAudio = false;
}
}
// Create and expose the master GainNode when using Web Audio (useful for plugins or advanced usage).
if (Howler.usingWebAudio) {
Howler.masterGain = (typeof Howler.ctx.createGain === 'undefined') ? Howler.ctx.createGainNode() : Howler.ctx.createGain();
Howler.masterGain.gain.setValueAtTime(Howler._muted ? 0 : Howler._volume, Howler.ctx.currentTime);
Howler.masterGain.connect(Howler.ctx.destination);
}
// Re-run the setup on Howler.
Howler._setup();
};
// Add support for AMD (Asynchronous Module Definition) libraries such as require.js.
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
return {
Howler: Howler,
Howl: Howl
};
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
// Add support for CommonJS libraries such as browserify.
if (true) {
exports.Howler = Howler;
exports.Howl = Howl;
}
// Add to global in Node.js (for testing, etc).
if (typeof global !== 'undefined') {
global.HowlerGlobal = HowlerGlobal;
global.Howler = Howler;
global.Howl = Howl;
global.Sound = Sound;
} else if (typeof window !== 'undefined') { // Define globally in case AMD is not available or unused.
window.HowlerGlobal = HowlerGlobal;
window.Howler = Howler;
window.Howl = Howl;
window.Sound = Sound;
}
})();
/*!
* Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
*
* howler.js v2.2.3
* howlerjs.com
*
* (c) 2013-2020, James Simpson of GoldFire Studios
* goldfirestudios.com
*
* MIT License
*/
(function() {
'use strict';
// Setup default properties.
HowlerGlobal.prototype._pos = [0, 0, 0];
HowlerGlobal.prototype._orientation = [0, 0, -1, 0, 1, 0];
/** Global Methods **/
/***************************************************************************/
/**
* Helper method to update the stereo panning position of all current Howls.
* Future Howls will not use this value unless explicitly set.
* @param {Number} pan A value of -1.0 is all the way left and 1.0 is all the way right.
* @return {Howler/Number} Self or current stereo panning value.
*/
HowlerGlobal.prototype.stereo = function(pan) {
var self = this;
// Stop right here if not using Web Audio.
if (!self.ctx || !self.ctx.listener) {
return self;
}
// Loop through all Howls and update their stereo panning.
for (var i=self._howls.length-1; i>=0; i--) {
self._howls[i].stereo(pan);
}
return self;
};
/**
* Get/set the position of the listener in 3D cartesian space. Sounds using
* 3D position will be relative to the listener's position.
* @param {Number} x The x-position of the listener.
* @param {Number} y The y-position of the listener.
* @param {Number} z The z-position of the listener.
* @return {Howler/Array} Self or current listener position.
*/
HowlerGlobal.prototype.pos = function(x, y, z) {
var self = this;
// Stop right here if not using Web Audio.
if (!self.ctx || !self.ctx.listener) {
return self;
}
// Set the defaults for optional 'y' & 'z'.
y = (typeof y !== 'number') ? self._pos[1] : y;
z = (typeof z !== 'number') ? self._pos[2] : z;
if (typeof x === 'number') {
self._pos = [x, y, z];
if (typeof self.ctx.listener.positionX !== 'undefined') {
self.ctx.listener.positionX.setTargetAtTime(self._pos[0], Howler.ctx.currentTime, 0.1);
self.ctx.listener.positionY.setTargetAtTime(self._pos[1], Howler.ctx.currentTime, 0.1);
self.ctx.listener.positionZ.setTargetAtTime(self._pos[2], Howler.ctx.currentTime, 0.1);
} else {
self.ctx.listener.setPosition(self._pos[0], self._pos[1], self._pos[2]);
}
} else {
return self._pos;
}
return self;
};
/**
* Get/set the direction the listener is pointing in the 3D cartesian space.
* A front and up vector must be provided. The front is the direction the
* face of the listener is pointing, and up is the direction the top of the
* listener is pointing. Thus, these values are expected to be at right angles
* from each other.
* @param {Number} x The x-orientation of the listener.
* @param {Number} y The y-orientation of the listener.
* @param {Number} z The z-orientation of the listener.
* @param {Number} xUp The x-orientation of the top of the listener.
* @param {Number} yUp The y-orientation of the top of the listener.
* @param {Number} zUp The z-orientation of the top of the listener.
* @return {Howler/Array} Returns self or the current orientation vectors.
*/
HowlerGlobal.prototype.orientation = function(x, y, z, xUp, yUp, zUp) {
var self = this;
// Stop right here if not using Web Audio.
if (!self.ctx || !self.ctx.listener) {
return self;
}
// Set the defaults for optional 'y' & 'z'.
var or = self._orientation;
y = (typeof y !== 'number') ? or[1] : y;
z = (typeof z !== 'number') ? or[2] : z;
xUp = (typeof xUp !== 'number') ? or[3] : xUp;
yUp = (typeof yUp !== 'number') ? or[4] : yUp;
zUp = (typeof zUp !== 'number') ? or[5] : zUp;
if (typeof x === 'number') {
self._orientation = [x, y, z, xUp, yUp, zUp];
if (typeof self.ctx.listener.forwardX !== 'undefined') {
self.ctx.listener.forwardX.setTargetAtTime(x, Howler.ctx.currentTime, 0.1);
self.ctx.listener.forwardY.setTargetAtTime(y, Howler.ctx.currentTime, 0.1);
self.ctx.listener.forwardZ.setTargetAtTime(z, Howler.ctx.currentTime, 0.1);
self.ctx.listener.upX.setTargetAtTime(xUp, Howler.ctx.currentTime, 0.1);
self.ctx.listener.upY.setTargetAtTime(yUp, Howler.ctx.currentTime, 0.1);
self.ctx.listener.upZ.setTargetAtTime(zUp, Howler.ctx.currentTime, 0.1);
} else {
self.ctx.listener.setOrientation(x, y, z, xUp, yUp, zUp);
}
} else {
return or;
}
return self;
};
/** Group Methods **/
/***************************************************************************/
/**
* Add new properties to the core init.
* @param {Function} _super Core init method.
* @return {Howl}
*/
Howl.prototype.init = (function(_super) {
return function(o) {
var self = this;
// Setup user-defined default properties.
self._orientation = o.orientation || [1, 0, 0];
self._stereo = o.stereo || null;
self._pos = o.pos || null;
self._pannerAttr = {
coneInnerAngle: typeof o.coneInnerAngle !== 'undefined' ? o.coneInnerAngle : 360,
coneOuterAngle: typeof o.coneOuterAngle !== 'undefined' ? o.coneOuterAngle : 360,
coneOuterGain: typeof o.coneOuterGain !== 'undefined' ? o.coneOuterGain : 0,
distanceModel: typeof o.distanceModel !== 'undefined' ? o.distanceModel : 'inverse',
maxDistance: typeof o.maxDistance !== 'undefined' ? o.maxDistance : 10000,
panningModel: typeof o.panningModel !== 'undefined' ? o.panningModel : 'HRTF',
refDistance: typeof o.refDistance !== 'undefined' ? o.refDistance : 1,
rolloffFactor: typeof o.rolloffFactor !== 'undefined' ? o.rolloffFactor : 1
};
// Setup event listeners.
self._onstereo = o.onstereo ? [{fn: o.onstereo}] : [];
self._onpos = o.onpos ? [{fn: o.onpos}] : [];
self._onorientation = o.onorientation ? [{fn: o.onorientation}] : [];
// Complete initilization with howler.js core's init function.
return _super.call(this, o);
};
})(Howl.prototype.init);
/**
* Get/set the stereo panning of the audio source for this sound or all in the group.
* @param {Number} pan A value of -1.0 is all the way left and 1.0 is all the way right.
* @param {Number} id (optional) The sound ID. If none is passed, all in group will be updated.
* @return {Howl/Number} Returns self or the current stereo panning value.
*/
Howl.prototype.stereo = function(pan, id) {
var self = this;
// Stop right here if not using Web Audio.
if (!self._webAudio) {
return self;
}
// If the sound hasn't loaded, add it to the load queue to change stereo pan when capable.
if (self._state !== 'loaded') {
self._queue.push({
event: 'stereo',
action: function() {
self.stereo(pan, id);
}
});
return self;
}
// Check for PannerStereoNode support and fallback to PannerNode if it doesn't exist.
var pannerType = (typeof Howler.ctx.createStereoPanner === 'undefined') ? 'spatial' : 'stereo';
// Setup the group's stereo panning if no ID is passed.
if (typeof id === 'undefined') {
// Return the group's stereo panning if no parameters are passed.
if (typeof pan === 'number') {
self._stereo = pan;
self._pos = [pan, 0, 0];
} else {
return self._stereo;
}
}
// Change the streo panning of one or all sounds in group.
var ids = self._getSoundIds(id);
for (var i=0; i Returns the group's values.
* pannerAttr(id) -> Returns the sound id's values.
* pannerAttr(o) -> Set's the values of all sounds in this Howl group.
* pannerAttr(o, id) -> Set's the values of passed sound id.
*
* Attributes:
* coneInnerAngle - (360 by default) A parameter for directional audio sources, this is an angle, in degrees,
* inside of which there will be no volume reduction.
* coneOuterAngle - (360 by default) A parameter for directional audio sources, this is an angle, in degrees,
* outside of which the volume will be reduced to a constant value of `coneOuterGain`.
* coneOuterGain - (0 by default) A parameter for directional audio sources, this is the gain outside of the
* `coneOuterAngle`. It is a linear value in the range `[0, 1]`.
* distanceModel - ('inverse' by default) Determines algorithm used to reduce volume as audio moves away from
* listener. Can be `linear`, `inverse` or `exponential.
* maxDistance - (10000 by default) The maximum distance between source and listener, after which the volume
* will not be reduced any further.
* refDistance - (1 by default) A reference distance for reducing volume as source moves further from the listener.
* This is simply a variable of the distance model and has a different effect depending on which model
* is used and the scale of your coordinates. Generally, volume will be equal to 1 at this distance.
* rolloffFactor - (1 by default) How quickly the volume reduces as source moves from listener. This is simply a
* variable of the distance model and can be in the range of `[0, 1]` with `linear` and `[0, ∞]`
* with `inverse` and `exponential`.
* panningModel - ('HRTF' by default) Determines which spatialization algorithm is used to position audio.
* Can be `HRTF` or `equalpower`.
*
* @return {Howl/Object} Returns self or current panner attributes.
*/
Howl.prototype.pannerAttr = function() {
var self = this;
var args = arguments;
var o, id, sound;
// Stop right here if not using Web Audio.
if (!self._webAudio) {
return self;
}
// Determine the values based on arguments.
if (args.length === 0) {
// Return the group's panner attribute values.
return self._pannerAttr;
} else if (args.length === 1) {
if (typeof args[0] === 'object') {
o = args[0];
// Set the grou's panner attribute values.
if (typeof id === 'undefined') {
if (!o.pannerAttr) {
o.pannerAttr = {
coneInnerAngle: o.coneInnerAngle,
coneOuterAngle: o.coneOuterAngle,
coneOuterGain: o.coneOuterGain,
distanceModel: o.distanceModel,
maxDistance: o.maxDistance,
refDistance: o.refDistance,
rolloffFactor: o.rolloffFactor,
panningModel: o.panningModel
};
}
self._pannerAttr = {
coneInnerAngle: typeof o.pannerAttr.coneInnerAngle !== 'undefined' ? o.pannerAttr.coneInnerAngle : self._coneInnerAngle,
coneOuterAngle: typeof o.pannerAttr.coneOuterAngle !== 'undefined' ? o.pannerAttr.coneOuterAngle : self._coneOuterAngle,
coneOuterGain: typeof o.pannerAttr.coneOuterGain !== 'undefined' ? o.pannerAttr.coneOuterGain : self._coneOuterGain,
distanceModel: typeof o.pannerAttr.distanceModel !== 'undefined' ? o.pannerAttr.distanceModel : self._distanceModel,
maxDistance: typeof o.pannerAttr.maxDistance !== 'undefined' ? o.pannerAttr.maxDistance : self._maxDistance,
refDistance: typeof o.pannerAttr.refDistance !== 'undefined' ? o.pannerAttr.refDistance : self._refDistance,
rolloffFactor: typeof o.pannerAttr.rolloffFactor !== 'undefined' ? o.pannerAttr.rolloffFactor : self._rolloffFactor,
panningModel: typeof o.pannerAttr.panningModel !== 'undefined' ? o.pannerAttr.panningModel : self._panningModel
};
}
} else {
// Return this sound's panner attribute values.
sound = self._soundById(parseInt(args[0], 10));
return sound ? sound._pannerAttr : self._pannerAttr;
}
} else if (args.length === 2) {
o = args[0];
id = parseInt(args[1], 10);
}
// Update the values of the specified sounds.
var ids = self._getSoundIds(id);
for (var i=0; i= 200 && status < 300;
},
headers: {
common: {
'Accept': 'application/json, text/plain, */*'
}
}
};
utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
defaults.headers[method] = {};
});
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
});
module.exports = defaults;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362")))
/***/ }),
/***/ "2d00":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var userAgent = __webpack_require__("342f");
var process = global.process;
var Deno = global.Deno;
var versions = process && process.versions || Deno && Deno.version;
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split('.');
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
// but their correct versions are not interesting for us
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
}
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
// so check `userAgent` even if `.v8` exists, but 0
if (!version && userAgent) {
match = userAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = userAgent.match(/Chrome\/(\d+)/);
if (match) version = +match[1];
}
}
module.exports = version;
/***/ }),
/***/ "2d70":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "2d83":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var enhanceError = __webpack_require__("387f");
/**
* Create an Error with the specified message, config, error code, request and response.
*
* @param {string} message The error message.
* @param {Object} config The config.
* @param {string} [code] The error code (for example, 'ECONNABORTED').
* @param {Object} [request] The request.
* @param {Object} [response] The response.
* @returns {Error} The created error.
*/
module.exports = function createError(message, config, code, request, response) {
var error = new Error(message);
return enhanceError(error, config, code, request, response);
};
/***/ }),
/***/ "2e67":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function isCancel(value) {
return !!(value && value.__CANCEL__);
};
/***/ }),
/***/ "30b5":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__("c532");
function encode(val) {
return encodeURIComponent(val).
replace(/%3A/gi, ':').
replace(/%24/g, '$').
replace(/%2C/gi, ',').
replace(/%20/g, '+').
replace(/%5B/gi, '[').
replace(/%5D/gi, ']');
}
/**
* Build a URL by appending params to the end
*
* @param {string} url The base of the url (e.g., http://www.google.com)
* @param {object} [params] The params to be appended
* @returns {string} The formatted url
*/
module.exports = function buildURL(url, params, paramsSerializer) {
/*eslint no-param-reassign:0*/
if (!params) {
return url;
}
var serializedParams;
if (paramsSerializer) {
serializedParams = paramsSerializer(params);
} else if (utils.isURLSearchParams(params)) {
serializedParams = params.toString();
} else {
var parts = [];
utils.forEach(params, function serialize(val, key) {
if (val === null || typeof val === 'undefined') {
return;
}
if (utils.isArray(val)) {
key = key + '[]';
} else {
val = [val];
}
utils.forEach(val, function parseValue(v) {
if (utils.isDate(v)) {
v = v.toISOString();
} else if (utils.isObject(v)) {
v = JSON.stringify(v);
}
parts.push(encode(key) + '=' + encode(v));
});
});
serializedParams = parts.join('&');
}
if (serializedParams) {
var hashmarkIndex = url.indexOf('#');
if (hashmarkIndex !== -1) {
url = url.slice(0, hashmarkIndex);
}
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
}
return url;
};
/***/ }),
/***/ "342f":
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__("d066");
module.exports = getBuiltIn('navigator', 'userAgent') || '';
/***/ }),
/***/ "36d7":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "37e8":
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("83ab");
var definePropertyModule = __webpack_require__("9bf2");
var anObject = __webpack_require__("825a");
var toIndexedObject = __webpack_require__("fc6a");
var objectKeys = __webpack_require__("df75");
// `Object.defineProperties` method
// https://tc39.es/ecma262/#sec-object.defineproperties
// eslint-disable-next-line es/no-object-defineproperties -- safe
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var props = toIndexedObject(Properties);
var keys = objectKeys(Properties);
var length = keys.length;
var index = 0;
var key;
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
return O;
};
/***/ }),
/***/ "387f":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Update an Error with the specified config, error code, and response.
*
* @param {Error} error The error to update.
* @param {Object} config The config.
* @param {string} [code] The error code (for example, 'ECONNABORTED').
* @param {Object} [request] The request.
* @param {Object} [response] The response.
* @returns {Error} The error.
*/
module.exports = function enhanceError(error, config, code, request, response) {
error.config = config;
if (code) {
error.code = code;
}
error.request = request;
error.response = response;
error.isAxiosError = true;
error.toJSON = function toJSON() {
return {
// Standard
message: this.message,
name: this.name,
// Microsoft
description: this.description,
number: this.number,
// Mozilla
fileName: this.fileName,
lineNumber: this.lineNumber,
columnNumber: this.columnNumber,
stack: this.stack,
// Axios
config: this.config,
code: this.code,
status: this.response && this.response.status ? this.response.status : null
};
};
return error;
};
/***/ }),
/***/ "3934":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__("c532");
module.exports = (
utils.isStandardBrowserEnv() ?
// Standard browser envs have full support of the APIs needed to test
// whether the request URL is of the same origin as current location.
(function standardBrowserEnv() {
var msie = /(msie|trident)/i.test(navigator.userAgent);
var urlParsingNode = document.createElement('a');
var originURL;
/**
* Parse a URL to discover it's components
*
* @param {String} url The URL to be parsed
* @returns {Object}
*/
function resolveURL(url) {
var href = url;
if (msie) {
// IE needs attribute set twice to normalize properties
urlParsingNode.setAttribute('href', href);
href = urlParsingNode.href;
}
urlParsingNode.setAttribute('href', href);
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
return {
href: urlParsingNode.href,
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
host: urlParsingNode.host,
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
hostname: urlParsingNode.hostname,
port: urlParsingNode.port,
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
urlParsingNode.pathname :
'/' + urlParsingNode.pathname
};
}
originURL = resolveURL(window.location.href);
/**
* Determine if a URL shares the same origin as the current location
*
* @param {String} requestURL The URL to test
* @returns {boolean} True if URL shares the same origin, otherwise false
*/
return function isURLSameOrigin(requestURL) {
var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
return (parsed.protocol === originURL.protocol &&
parsed.host === originURL.host);
};
})() :
// Non standard browser envs (web workers, react-native) lack needed support.
(function nonStandardBrowserEnv() {
return function isURLSameOrigin() {
return true;
};
})()
);
/***/ }),
/***/ "3a9b":
/***/ (function(module, exports, __webpack_require__) {
var uncurryThis = __webpack_require__("e330");
module.exports = uncurryThis({}.isPrototypeOf);
/***/ }),
/***/ "4362":
/***/ (function(module, exports, __webpack_require__) {
exports.nextTick = function nextTick(fn) {
var args = Array.prototype.slice.call(arguments);
args.shift();
setTimeout(function () {
fn.apply(null, args);
}, 0);
};
exports.platform = exports.arch =
exports.execPath = exports.title = 'browser';
exports.pid = 1;
exports.browser = true;
exports.env = {};
exports.argv = [];
exports.binding = function (name) {
throw new Error('No such module. (Possibly not yet loaded)')
};
(function () {
var cwd = '/';
var path;
exports.cwd = function () { return cwd };
exports.chdir = function (dir) {
if (!path) path = __webpack_require__("df7c");
cwd = path.resolve(dir, cwd);
};
})();
exports.exit = exports.kill =
exports.umask = exports.dlopen =
exports.uptime = exports.memoryUsage =
exports.uvCounters = function() {};
exports.features = {};
/***/ }),
/***/ "44ad":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var uncurryThis = __webpack_require__("e330");
var fails = __webpack_require__("d039");
var classof = __webpack_require__("c6b6");
var Object = global.Object;
var split = uncurryThis(''.split);
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins -- safe
return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classof(it) == 'String' ? split(it, '') : Object(it);
} : Object;
/***/ }),
/***/ "466d":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = __webpack_require__("c65b");
var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var anObject = __webpack_require__("825a");
var toLength = __webpack_require__("50c4");
var toString = __webpack_require__("577e");
var requireObjectCoercible = __webpack_require__("1d80");
var getMethod = __webpack_require__("dc4a");
var advanceStringIndex = __webpack_require__("8aa5");
var regExpExec = __webpack_require__("14c3");
// @@match logic
fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
return [
// `String.prototype.match` method
// https://tc39.es/ecma262/#sec-string.prototype.match
function match(regexp) {
var O = requireObjectCoercible(this);
var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);
return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));
},
// `RegExp.prototype[@@match]` method
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
function (string) {
var rx = anObject(this);
var S = toString(string);
var res = maybeCallNative(nativeMatch, rx, S);
if (res.done) return res.value;
if (!rx.global) return regExpExec(rx, S);
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
var A = [];
var n = 0;
var result;
while ((result = regExpExec(rx, S)) !== null) {
var matchStr = toString(result[0]);
A[n] = matchStr;
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
n++;
}
return n === 0 ? null : A;
}
];
});
/***/ }),
/***/ "467f":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var createError = __webpack_require__("2d83");
/**
* Resolve or reject a Promise based on response status.
*
* @param {Function} resolve A function that resolves the promise.
* @param {Function} reject A function that rejects the promise.
* @param {object} response The response.
*/
module.exports = function settle(resolve, reject, response) {
var validateStatus = response.config.validateStatus;
if (!response.status || !validateStatus || validateStatus(response.status)) {
resolve(response);
} else {
reject(createError(
'Request failed with status code ' + response.status,
response.config,
null,
response.request,
response
));
}
};
/***/ }),
/***/ "485a":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var call = __webpack_require__("c65b");
var isCallable = __webpack_require__("1626");
var isObject = __webpack_require__("861d");
var TypeError = global.TypeError;
// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
module.exports = function (input, pref) {
var fn, val;
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ "4930":
/***/ (function(module, exports, __webpack_require__) {
/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__("2d00");
var fails = __webpack_require__("d039");
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
var symbol = Symbol();
// Chrome 38 Symbol has incorrect toString conversion
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
});
/***/ }),
/***/ "4a7b":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__("c532");
/**
* Config-specific merge-function which creates a new config-object
* by merging two configuration objects together.
*
* @param {Object} config1
* @param {Object} config2
* @returns {Object} New object resulting from merging config2 to config1
*/
module.exports = function mergeConfig(config1, config2) {
// eslint-disable-next-line no-param-reassign
config2 = config2 || {};
var config = {};
function getMergedValue(target, source) {
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
return utils.merge(target, source);
} else if (utils.isPlainObject(source)) {
return utils.merge({}, source);
} else if (utils.isArray(source)) {
return source.slice();
}
return source;
}
// eslint-disable-next-line consistent-return
function mergeDeepProperties(prop) {
if (!utils.isUndefined(config2[prop])) {
return getMergedValue(config1[prop], config2[prop]);
} else if (!utils.isUndefined(config1[prop])) {
return getMergedValue(undefined, config1[prop]);
}
}
// eslint-disable-next-line consistent-return
function valueFromConfig2(prop) {
if (!utils.isUndefined(config2[prop])) {
return getMergedValue(undefined, config2[prop]);
}
}
// eslint-disable-next-line consistent-return
function defaultToConfig2(prop) {
if (!utils.isUndefined(config2[prop])) {
return getMergedValue(undefined, config2[prop]);
} else if (!utils.isUndefined(config1[prop])) {
return getMergedValue(undefined, config1[prop]);
}
}
// eslint-disable-next-line consistent-return
function mergeDirectKeys(prop) {
if (prop in config2) {
return getMergedValue(config1[prop], config2[prop]);
} else if (prop in config1) {
return getMergedValue(undefined, config1[prop]);
}
}
var mergeMap = {
'url': valueFromConfig2,
'method': valueFromConfig2,
'data': valueFromConfig2,
'baseURL': defaultToConfig2,
'transformRequest': defaultToConfig2,
'transformResponse': defaultToConfig2,
'paramsSerializer': defaultToConfig2,
'timeout': defaultToConfig2,
'timeoutMessage': defaultToConfig2,
'withCredentials': defaultToConfig2,
'adapter': defaultToConfig2,
'responseType': defaultToConfig2,
'xsrfCookieName': defaultToConfig2,
'xsrfHeaderName': defaultToConfig2,
'onUploadProgress': defaultToConfig2,
'onDownloadProgress': defaultToConfig2,
'decompress': defaultToConfig2,
'maxContentLength': defaultToConfig2,
'maxBodyLength': defaultToConfig2,
'transport': defaultToConfig2,
'httpAgent': defaultToConfig2,
'httpsAgent': defaultToConfig2,
'cancelToken': defaultToConfig2,
'socketPath': defaultToConfig2,
'responseEncoding': defaultToConfig2,
'validateStatus': mergeDirectKeys
};
utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
var merge = mergeMap[prop] || mergeDeepProperties;
var configValue = merge(prop);
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
});
return config;
};
/***/ }),
/***/ "4d64":
/***/ (function(module, exports, __webpack_require__) {
var toIndexedObject = __webpack_require__("fc6a");
var toAbsoluteIndex = __webpack_require__("23cb");
var lengthOfArrayLike = __webpack_require__("07fa");
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = lengthOfArrayLike(O);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare -- NaN check
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare -- NaN check
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
module.exports = {
// `Array.prototype.includes` method
// https://tc39.es/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.es/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
/***/ }),
/***/ "4de4":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__("23e7");
var $filter = __webpack_require__("b727").filter;
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
// `Array.prototype.filter` method
// https://tc39.es/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
filter: function filter(callbackfn /* , thisArg */) {
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "4f5e":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Timer_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("36d7");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Timer_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Timer_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Timer_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Timer_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ "50c4":
/***/ (function(module, exports, __webpack_require__) {
var toIntegerOrInfinity = __webpack_require__("5926");
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
/***/ }),
/***/ "5270":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__("c532");
var transformData = __webpack_require__("c401");
var isCancel = __webpack_require__("2e67");
var defaults = __webpack_require__("2444");
var Cancel = __webpack_require__("7a77");
/**
* Throws a `Cancel` if cancellation has been requested.
*/
function throwIfCancellationRequested(config) {
if (config.cancelToken) {
config.cancelToken.throwIfRequested();
}
if (config.signal && config.signal.aborted) {
throw new Cancel('canceled');
}
}
/**
* Dispatch a request to the server using the configured adapter.
*
* @param {object} config The config that is to be used for the request
* @returns {Promise} The Promise to be fulfilled
*/
module.exports = function dispatchRequest(config) {
throwIfCancellationRequested(config);
// Ensure headers exist
config.headers = config.headers || {};
// Transform request data
config.data = transformData.call(
config,
config.data,
config.headers,
config.transformRequest
);
// Flatten headers
config.headers = utils.merge(
config.headers.common || {},
config.headers[config.method] || {},
config.headers
);
utils.forEach(
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
function cleanHeaderConfig(method) {
delete config.headers[method];
}
);
var adapter = config.adapter || defaults.adapter;
return adapter(config).then(function onAdapterResolution(response) {
throwIfCancellationRequested(config);
// Transform response data
response.data = transformData.call(
config,
response.data,
response.headers,
config.transformResponse
);
return response;
}, function onAdapterRejection(reason) {
if (!isCancel(reason)) {
throwIfCancellationRequested(config);
// Transform response data
if (reason && reason.response) {
reason.response.data = transformData.call(
config,
reason.response.data,
reason.response.headers,
config.transformResponse
);
}
}
return Promise.reject(reason);
});
};
/***/ }),
/***/ "5692":
/***/ (function(module, exports, __webpack_require__) {
var IS_PURE = __webpack_require__("c430");
var store = __webpack_require__("c6cd");
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.19.3',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "56ef":
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__("d066");
var uncurryThis = __webpack_require__("e330");
var getOwnPropertyNamesModule = __webpack_require__("241c");
var getOwnPropertySymbolsModule = __webpack_require__("7418");
var anObject = __webpack_require__("825a");
var concat = uncurryThis([].concat);
// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
var keys = getOwnPropertyNamesModule.f(anObject(it));
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
};
/***/ }),
/***/ "577e":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var classof = __webpack_require__("f5df");
var String = global.String;
module.exports = function (argument) {
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
return String(argument);
};
/***/ }),
/***/ "5926":
/***/ (function(module, exports) {
var ceil = Math.ceil;
var floor = Math.floor;
// `ToIntegerOrInfinity` abstract operation
// https://tc39.es/ecma262/#sec-tointegerorinfinity
module.exports = function (argument) {
var number = +argument;
// eslint-disable-next-line no-self-compare -- safe
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
};
/***/ }),
/***/ "59ed":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var isCallable = __webpack_require__("1626");
var tryToString = __webpack_require__("0d51");
var TypeError = global.TypeError;
// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
if (isCallable(argument)) return argument;
throw TypeError(tryToString(argument) + ' is not a function');
};
/***/ }),
/***/ "5c6c":
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "5cce":
/***/ (function(module, exports) {
module.exports = {
"version": "0.24.0"
};
/***/ }),
/***/ "5e77":
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("83ab");
var hasOwn = __webpack_require__("1a2d");
var FunctionPrototype = Function.prototype;
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
var EXISTS = hasOwn(FunctionPrototype, 'name');
// additional protection from minified / mangled / dropped function names
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
module.exports = {
EXISTS: EXISTS,
PROPER: PROPER,
CONFIGURABLE: CONFIGURABLE
};
/***/ }),
/***/ "5f02":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Determines whether the payload is an error thrown by Axios
*
* @param {*} payload The value to test
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
*/
module.exports = function isAxiosError(payload) {
return (typeof payload === 'object') && (payload.isAxiosError === true);
};
/***/ }),
/***/ "6547":
/***/ (function(module, exports, __webpack_require__) {
var uncurryThis = __webpack_require__("e330");
var toIntegerOrInfinity = __webpack_require__("5926");
var toString = __webpack_require__("577e");
var requireObjectCoercible = __webpack_require__("1d80");
var charAt = uncurryThis(''.charAt);
var charCodeAt = uncurryThis(''.charCodeAt);
var stringSlice = uncurryThis(''.slice);
var createMethod = function (CONVERT_TO_STRING) {
return function ($this, pos) {
var S = toString(requireObjectCoercible($this));
var position = toIntegerOrInfinity(pos);
var size = S.length;
var first, second;
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
first = charCodeAt(S, position);
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
? CONVERT_TO_STRING
? charAt(S, position)
: first
: CONVERT_TO_STRING
? stringSlice(S, position, position + 2)
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
};
};
module.exports = {
// `String.prototype.codePointAt` method
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
codeAt: createMethod(false),
// `String.prototype.at` method
// https://github.com/mathiasbynens/String.prototype.at
charAt: createMethod(true)
};
/***/ }),
/***/ "65f0":
/***/ (function(module, exports, __webpack_require__) {
var arraySpeciesConstructor = __webpack_require__("0b42");
// `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
};
/***/ }),
/***/ "68ee":
/***/ (function(module, exports, __webpack_require__) {
var uncurryThis = __webpack_require__("e330");
var fails = __webpack_require__("d039");
var isCallable = __webpack_require__("1626");
var classof = __webpack_require__("f5df");
var getBuiltIn = __webpack_require__("d066");
var inspectSource = __webpack_require__("8925");
var noop = function () { /* empty */ };
var empty = [];
var construct = getBuiltIn('Reflect', 'construct');
var constructorRegExp = /^\s*(?:class|function)\b/;
var exec = uncurryThis(constructorRegExp.exec);
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
var isConstructorModern = function (argument) {
if (!isCallable(argument)) return false;
try {
construct(noop, empty, argument);
return true;
} catch (error) {
return false;
}
};
var isConstructorLegacy = function (argument) {
if (!isCallable(argument)) return false;
switch (classof(argument)) {
case 'AsyncFunction':
case 'GeneratorFunction':
case 'AsyncGeneratorFunction': return false;
// we can't check .prototype since constructors produced by .bind haven't it
} return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
};
// `IsConstructor` abstract operation
// https://tc39.es/ecma262/#sec-isconstructor
module.exports = !construct || fails(function () {
var called;
return isConstructorModern(isConstructorModern.call)
|| !isConstructorModern(Object)
|| !isConstructorModern(function () { called = true; })
|| called;
}) ? isConstructorLegacy : isConstructorModern;
/***/ }),
/***/ "69f3":
/***/ (function(module, exports, __webpack_require__) {
var NATIVE_WEAK_MAP = __webpack_require__("7f9a");
var global = __webpack_require__("da84");
var uncurryThis = __webpack_require__("e330");
var isObject = __webpack_require__("861d");
var createNonEnumerableProperty = __webpack_require__("9112");
var hasOwn = __webpack_require__("1a2d");
var shared = __webpack_require__("c6cd");
var sharedKey = __webpack_require__("f772");
var hiddenKeys = __webpack_require__("d012");
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var TypeError = global.TypeError;
var WeakMap = global.WeakMap;
var set, get, has;
var enforce = function (it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
} return state;
};
};
if (NATIVE_WEAK_MAP || shared.state) {
var store = shared.state || (shared.state = new WeakMap());
var wmget = uncurryThis(store.get);
var wmhas = uncurryThis(store.has);
var wmset = uncurryThis(store.set);
set = function (it, metadata) {
if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
wmset(store, it, metadata);
return metadata;
};
get = function (it) {
return wmget(store, it) || {};
};
has = function (it) {
return wmhas(store, it);
};
} else {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
metadata.facade = it;
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return hasOwn(it, STATE) ? it[STATE] : {};
};
has = function (it) {
return hasOwn(it, STATE);
};
}
module.exports = {
set: set,
get: get,
has: has,
enforce: enforce,
getterFor: getterFor
};
/***/ }),
/***/ "6eeb":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var isCallable = __webpack_require__("1626");
var hasOwn = __webpack_require__("1a2d");
var createNonEnumerableProperty = __webpack_require__("9112");
var setGlobal = __webpack_require__("ce4e");
var inspectSource = __webpack_require__("8925");
var InternalStateModule = __webpack_require__("69f3");
var CONFIGURABLE_FUNCTION_NAME = __webpack_require__("5e77").CONFIGURABLE;
var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');
(module.exports = function (O, key, value, options) {
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
var name = options && options.name !== undefined ? options.name : key;
var state;
if (isCallable(value)) {
if (String(name).slice(0, 7) === 'Symbol(') {
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
}
if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
createNonEnumerableProperty(value, 'name', name);
}
state = enforceInternalState(value);
if (!state.source) {
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
}
}
if (O === global) {
if (simple) O[key] = value;
else setGlobal(key, value);
return;
} else if (!unsafe) {
delete O[key];
} else if (!noTargetGet && O[key]) {
simple = true;
}
if (simple) O[key] = value;
else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
return isCallable(this) && getInternalState(this).source || inspectSource(this);
});
/***/ }),
/***/ "7418":
/***/ (function(module, exports) {
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ "74c9":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Player_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("9fd8");
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Player_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_9_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_9_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_9_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_9_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Player_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */
/***/ }),
/***/ "7839":
/***/ (function(module, exports) {
// IE8- don't enum bug keys
module.exports = [
'constructor',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toLocaleString',
'toString',
'valueOf'
];
/***/ }),
/***/ "7a77":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* A `Cancel` is an object that is thrown when an operation is canceled.
*
* @class
* @param {string=} message The message.
*/
function Cancel(message) {
this.message = message;
}
Cancel.prototype.toString = function toString() {
return 'Cancel' + (this.message ? ': ' + this.message : '');
};
Cancel.prototype.__CANCEL__ = true;
module.exports = Cancel;
/***/ }),
/***/ "7aac":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__("c532");
module.exports = (
utils.isStandardBrowserEnv() ?
// Standard browser envs support document.cookie
(function standardBrowserEnv() {
return {
write: function write(name, value, expires, path, domain, secure) {
var cookie = [];
cookie.push(name + '=' + encodeURIComponent(value));
if (utils.isNumber(expires)) {
cookie.push('expires=' + new Date(expires).toGMTString());
}
if (utils.isString(path)) {
cookie.push('path=' + path);
}
if (utils.isString(domain)) {
cookie.push('domain=' + domain);
}
if (secure === true) {
cookie.push('secure');
}
document.cookie = cookie.join('; ');
},
read: function read(name) {
var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return (match ? decodeURIComponent(match[3]) : null);
},
remove: function remove(name) {
this.write(name, '', Date.now() - 86400000);
}
};
})() :
// Non standard browser env (web workers, react-native) lack needed support.
(function nonStandardBrowserEnv() {
return {
write: function write() {},
read: function read() { return null; },
remove: function remove() {}
};
})()
);
/***/ }),
/***/ "7b0b":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var requireObjectCoercible = __webpack_require__("1d80");
var Object = global.Object;
// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
return Object(requireObjectCoercible(argument));
};
/***/ }),
/***/ "7c73":
/***/ (function(module, exports, __webpack_require__) {
/* global ActiveXObject -- old IE, WSH */
var anObject = __webpack_require__("825a");
var defineProperties = __webpack_require__("37e8");
var enumBugKeys = __webpack_require__("7839");
var hiddenKeys = __webpack_require__("d012");
var html = __webpack_require__("1be4");
var documentCreateElement = __webpack_require__("cc12");
var sharedKey = __webpack_require__("f772");
var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');
var EmptyConstructor = function () { /* empty */ };
var scriptTag = function (content) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
activeXDocument.write(scriptTag(''));
activeXDocument.close();
var temp = activeXDocument.parentWindow.Object;
activeXDocument = null; // avoid memory leak
return temp;
};
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement('iframe');
var JS = 'java' + SCRIPT + ':';
var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
};
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
try {
activeXDocument = new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = typeof document != 'undefined'
? document.domain && activeXDocument
? NullProtoObjectViaActiveX(activeXDocument) // old IE
: NullProtoObjectViaIFrame()
: NullProtoObjectViaActiveX(activeXDocument); // WSH
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
};
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
// https://tc39.es/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
EmptyConstructor[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = NullProtoObject();
return Properties === undefined ? result : defineProperties(result, Properties);
};
/***/ }),
/***/ "7f9a":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var isCallable = __webpack_require__("1626");
var inspectSource = __webpack_require__("8925");
var WeakMap = global.WeakMap;
module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
/***/ }),
/***/ "825a":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var isObject = __webpack_require__("861d");
var String = global.String;
var TypeError = global.TypeError;
// `Assert: Type(argument) is Object`
module.exports = function (argument) {
if (isObject(argument)) return argument;
throw TypeError(String(argument) + ' is not an object');
};
/***/ }),
/***/ "83ab":
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__("d039");
// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});
/***/ }),
/***/ "83b9":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isAbsoluteURL = __webpack_require__("d925");
var combineURLs = __webpack_require__("e683");
/**
* Creates a new URL by combining the baseURL with the requestedURL,
* only when the requestedURL is not already an absolute URL.
* If the requestURL is absolute, this function returns the requestedURL untouched.
*
* @param {string} baseURL The base URL
* @param {string} requestedURL Absolute or relative URL to combine
* @returns {string} The combined full path
*/
module.exports = function buildFullPath(baseURL, requestedURL) {
if (baseURL && !isAbsoluteURL(requestedURL)) {
return combineURLs(baseURL, requestedURL);
}
return requestedURL;
};
/***/ }),
/***/ "8418":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toPropertyKey = __webpack_require__("a04b");
var definePropertyModule = __webpack_require__("9bf2");
var createPropertyDescriptor = __webpack_require__("5c6c");
module.exports = function (object, key, value) {
var propertyKey = toPropertyKey(key);
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
else object[propertyKey] = value;
};
/***/ }),
/***/ "848b":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var VERSION = __webpack_require__("5cce").version;
var validators = {};
// eslint-disable-next-line func-names
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
validators[type] = function validator(thing) {
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
};
});
var deprecatedWarnings = {};
/**
* Transitional option validator
* @param {function|boolean?} validator - set to false if the transitional option has been removed
* @param {string?} version - deprecated version / removed since version
* @param {string?} message - some message with additional info
* @returns {function}
*/
validators.transitional = function transitional(validator, version, message) {
function formatMessage(opt, desc) {
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
}
// eslint-disable-next-line func-names
return function(value, opt, opts) {
if (validator === false) {
throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
}
if (version && !deprecatedWarnings[opt]) {
deprecatedWarnings[opt] = true;
// eslint-disable-next-line no-console
console.warn(
formatMessage(
opt,
' has been deprecated since v' + version + ' and will be removed in the near future'
)
);
}
return validator ? validator(value, opt, opts) : true;
};
};
/**
* Assert object's properties type
* @param {object} options
* @param {object} schema
* @param {boolean?} allowUnknown
*/
function assertOptions(options, schema, allowUnknown) {
if (typeof options !== 'object') {
throw new TypeError('options must be an object');
}
var keys = Object.keys(options);
var i = keys.length;
while (i-- > 0) {
var opt = keys[i];
var validator = schema[opt];
if (validator) {
var value = options[opt];
var result = value === undefined || validator(value, opt, options);
if (result !== true) {
throw new TypeError('option ' + opt + ' must be ' + result);
}
continue;
}
if (allowUnknown !== true) {
throw Error('Unknown option ' + opt);
}
}
}
module.exports = {
assertOptions: assertOptions,
validators: validators
};
/***/ }),
/***/ "861d":
/***/ (function(module, exports, __webpack_require__) {
var isCallable = __webpack_require__("1626");
module.exports = function (it) {
return typeof it == 'object' ? it !== null : isCallable(it);
};
/***/ }),
/***/ "8875":
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
// MIT license
// source: https://github.com/amiller-gh/currentScript-polyfill
// added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
(function (root, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {}
}(typeof self !== 'undefined' ? self : this, function () {
function getCurrentScript () {
var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
// for chrome
if (!descriptor && 'currentScript' in document && document.currentScript) {
return document.currentScript
}
// for other browsers with native support for currentScript
if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
return document.currentScript
}
// IE 8-10 support script readyState
// IE 11+ & Firefox support stack trace
try {
throw new Error();
}
catch (err) {
// Find the second match for the "at" string to get file src url from stack.
var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
scriptLocation = (stackDetails && stackDetails[1]) || false,
line = (stackDetails && stackDetails[2]) || false,
currentLocation = document.location.href.replace(document.location.hash, ''),
pageSource,
inlineScriptSourceRegExp,
inlineScriptSource,
scripts = document.getElementsByTagName('script'); // Live NodeList collection
if (scriptLocation === currentLocation) {
pageSource = document.documentElement.outerHTML;
inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*